From: "Peter Milliken" <peterm@resmed.com.au>
Subject: Re: dabbrev not to create a new window
Date: Thu, 31 Oct 2002 08:06:30 +1100 [thread overview]
Message-ID: <WQXv9.21940$Sr6.657957@ozemail.com.au> (raw)
In-Reply-To: 2e8670bb.0210301024.2781645a@posting.google.com
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
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
next prev parent reply other threads:[~2002-10-30 21:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-30 18:24 dabbrev not to create a new window Dan Cardamore
2002-10-30 21:06 ` Peter Milliken [this message]
[not found] ` <peterm@resmed.com.au>
2002-10-31 14:00 ` Peter S Galbraith
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='WQXv9.21940$Sr6.657957@ozemail.com.au' \
--to=peterm@resmed.com.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).