From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Peter Milliken" Newsgroups: gmane.emacs.help Subject: Re: dabbrev not to create a new window Date: Thu, 31 Oct 2002 08:06:30 +1100 Organization: OzEmail Ltd, Australia Sender: help-gnu-emacs-admin@gnu.org Message-ID: References: <2e8670bb.0210301024.2781645a@posting.google.com> NNTP-Posting-Host: main.gmane.org X-Trace: main.gmane.org 1036012337 16877 80.91.224.249 (30 Oct 2002 21:12:17 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 30 Oct 2002 21:12:17 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18708O-0004O4-00 for ; Wed, 30 Oct 2002 22:12:16 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 18707k-0002ph-00; Wed, 30 Oct 2002 16:11:36 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!bloom-beacon.mit.edu!newsswitch.lcs.mit.edu!newsfeed.cwix.com!news1.optus.net.au!optus!snewsf0.syd.ops.aspac.uu.net!ozemail.com.au!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 48 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Original-NNTP-Posting-Host: 203.15.64.10 Original-X-Trace: ozemail.com.au 1036011958 203.15.64.10 (Thu, 31 Oct 2002 08:05:58 EST) Original-NNTP-Posting-Date: Thu, 31 Oct 2002 08:05:58 EST Original-Distribution: world Original-Xref: shelby.stanford.edu gnu.emacs.help:106586 Original-To: help-gnu-emacs@gnu.org Errors-To: help-gnu-emacs-admin@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.help:3137 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:3137 Hi Dan, In the days when I was much younger and (hopefully :-)) more foolish, I decided to write something that did what dabbrev does - I didn't know that dabbrev or anything like it existed (or perhaps I was just disatisfied with the UI and decided to write my own? I really can't remember, it was so long ago :-)). So I wrote a small routine that provides word completion at point (as does dabbrev). When there is more than one possible match it displays all possible completions in a separate buffer - the window of which is a maximum of half the screen and is minimised in size if there are less completions available i.e. if there are 3 possible completions then the window is 3 lines high. You navigate up and down the possible selections (it uses a single column rather than multiple columns like dabbrev does) and 'select' using the 's' key or whatever key was bound to the "expand" command. Once you have made your selection (you can 'q' quit out of it) the buffer/window is deleted and you have your original screen layout back again. It makes it search "case sensitive" as well i.e. if you type "Te" and there are words in the file "testcode", "Test" and "TEST", then only the last two will be displayed as possible completions, whereas if you type "te" and ask for a completion then it will display all three possible choices. Other people have found it useful, you might also. It can be found on the Emacs Wiki site at http://www.emacswiki.org/elisp/expand-a-word.el. Goodluck, Peter "Dan Cardamore" wrote in message news:2e8670bb.0210301024.2781645a@posting.google.com... > I'm using dabbrev and I'd like to have it show me the possible > completions without splitting my window in half. Currently it does > this and puts the possible completions in the bottom half of the > screen. Once I've chosen one, that screen stays there rather than > closing. > > I'd prefer to have it go away once I'm done, and have it take as > little space as possible rather than always taking 50% of the screen. > > Does anyone know how to do this? > > Thanks, > > Dan