Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!gatech!bbn!gateway!utrccm!ecb From: ecb@utrccm (ecb) Newsgroups: comp.emacs Subject: filename completion for anywhere in Emacs Message-ID: <8904261203.AA05747@utrccm.SMC.UTC.COM> Date: 26 Apr 89 12:03:56 GMT References: <8904252006.AA04083@utrccm.SMC.UTC.COM> Sender: news@bbn.COM Organization: BBN news/mail gateway Lines: 43 I wrote: > Paul Davis writes: > > Here is the first of many bits of lisp code I'll mail in the next few > > days (I'm leaving this job, and may as well get stuff out for > > posterity, if not for function: Datronics Inc. here I come ... ) > > > > This one provides the function shell-filename-complete, which I > > globally bind to M-`, and which will expand the filename before point > > anywhere in Emacs. Its so named because I use it mostly in shell-mode. > > It does have one problem: unlike minibufer completions, which always > > throw away the *Completions* buffer after use, this one leaves it > > around. I don't know how to fix this, but you're welcome to try. Let > > me know if you succeed. > > I "fixed" it by putting the line: > > (kill-buffer "*Help*") > > at the end of shell-filename-complete, thusly: > > (message "Making completion list...") > (let ((list (all-completions partial-name completion-list))) > (with-output-to-temp-buffer "*Help*" > (display-completion-list list)) > (message "Making completion list... done"))))) > (progn > (message "No such file or directory") > (ding)))) > (kill-buffer "*Help*")) > > Seems to work, but I'm not a > Lisp hacker. Can anyone tell me if I did something silly and/or dangerous? Never mind. Bud Boman United Technologies Research Center MS 129-47 Silver Lane East Hartford, CT 06118 (203) 727-7128 ecb@utrccm.smc.utc.com