[slime-devel] Automatically remove *Completions* buffer

After doing symbol completion with M-TAB in *inferior-lisp*, the *Completions* buffer remains open if it had previously been activated. Is it possible to make *Completions* disappear as soon as a unique symbol is selected? Paolo -- Paolo Amoroso <amoroso@mclink.it>

Paolo Amoroso <amoroso@mclink.it> writes:
After doing symbol completion with M-TAB in *inferior-lisp*, the *Completions* buffer remains open if it had previously been activated. Is it possible to make *Completions* disappear as soon as a unique symbol is selected?
It certainly sounds plausible. Do you know of any other modes that do this? We're already getting in trouble for some of the ways we change the window layout so I want to be careful about how we handle it :-) -Luke

Luke Gorrie writes:
Paolo Amoroso <amoroso@mclink.it> writes:
After doing symbol completion with M-TAB in *inferior-lisp*, the *Completions* buffer remains open if it had previously been activated. Is it possible to make *Completions* disappear as soon as a unique symbol is selected?
It certainly sounds plausible. Do you know of any other modes that do this?
The only example that comes to mind is the file completion buffer you get when doing `find-file' (C-x C-f). Paolo -- Why Lisp? http://alu.cliki.net/RtL%20Highlight%20Film

Automatically remove *Completions* buffer
From: Paolo Amoroso <amoroso@mclink.it> Reply to: Paolo Amoroso Date: Sat, 25 Oct 2003 18:26:22 +0200 Organization: Paolo Amoroso - Milano, ITALY Newsgroups: gmane.lisp.slime.devel Followup to: newsgroup After doing symbol completion with M-TAB in *inferior-lisp*, the *Completions* buffer remains open if it had previously been activated. Is it possible to make *Completions* disappear as soon as a unique symbol is selected?
I agree with Paolo, this would be very nice, and of course not just in *inferior-lisp*, but in source buffers, too. The following patch does this, in a very crude way. It is definitely not fit for people using their mice to chose a completion. diff -a -u -r1.61 slime.el --- slime.el 29 Oct 2003 23:41:55 -0000 1.61 +++ slime.el 31 Oct 2003 10:36:55 -0000 @@ -1815,8 +1815,10 @@ (t (message "Making completion list...") (let ((list (all-completions prefix completions-alist nil))) - (slime-with-output-to-temp-buffer "*Completions*" - (display-completion-list list))) + (save-window-excursion + (slime-with-output-to-temp-buffer "*Completions*" + (display-completion-list list)) + (sit-for 30))) ;adjust to your tastes (message "Making completion list...done"))))) (defun slime-completing-read-internal (string default-package flag) Andras

[Sorry for that ugly message: this is what happens when gnus refuses to post and I think I'll try lynx :-(. Combined with cut and paste it's a recipe for disaster. But I give it another try anyway. By the way, if somebody knows how to make gnus behave and not tell me this: Couldn't send message via news: 441 No valid newsgroups in "gmane.lisp.slime.devel" I'm open to suggestions :-)]
After doing symbol completion with M-TAB in *inferior-lisp*, the *Completions* buffer remains open if it had previously been activated. Is it possible to make *Completions* disappear as soon as a unique symbol is selected?
I agree with Paolo, this would be very nice, and of course not just in *inferior-lisp*, but in source buffers, too. The following patch does this, in a very crude way. It is definitely not fit for people using their mice to chose a completion. diff -a -u -r1.61 slime.el --- slime.el 29 Oct 2003 23:41:55 -0000 1.61 +++ slime.el 31 Oct 2003 20:29:43 -0000 @@ -1815,8 +1815,10 @@ (t (message "Making completion list...") (let ((list (all-completions prefix completions-alist nil))) - (slime-with-output-to-temp-buffer "*Completions*" - (display-completion-list list))) + (save-window-excursion + (slime-with-output-to-temp-buffer "*Completions*" + (display-completion-list list)) + (sit-for 30))) ;adjust to your tastes (message "Making completion list...done"))))) (defun slime-completing-read-internal (string default-package flag) Andras
participants (3)
-
asimon@math.bme.hu
-
Luke Gorrie
-
Paolo Amoroso