help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dabbrev not to create a new window


From: Peter Milliken
Subject: Re: dabbrev not to create a new window
Date: Thu, 31 Oct 2002 08:06:30 +1100

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" <dan@hld.ca> wrote in message
2e8670bb.0210301024.2781645a@posting.google.com">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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]