emacs-devel
[Top][All Lists]
Advanced

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

Prepend an indicator to the minibuffer prompt to show you can use comple


From: Drew Adams
Subject: Prepend an indicator to the minibuffer prompt to show you can use completion
Date: Sun, 13 Aug 2006 12:38:50 -0700

Minor feature suggestion, for after the release:

Prepend a one-character indicator, with a face that stands out, to the
minibuffer prompt, whenever completion is possible.

I do this in my own code, and I think it helps orient users. It's not always
obvious, when a function reads input, whether completion is available. This
makes it obvious, at the minor cost of an additional character or two in the
prompt.

For example, in Emacs 20 and 21, when you use `i' in Info, completion is not
available; in Emacs 22, completion is available. There is nothing in the UI
that indicates whether completion is available - you either know it or you
don't, or you try hitting TAB to see if completion is possible. Users
already used to the older, non-completion behavior can miss out, until they
somehow become aware that completion is available for index lookup. If you
have an old habit, you might not think of trying TAB.

Knowing whether completion is available can change the way you interact with
Emacs. Not knowing it is available can mean that you miss out on a quick way
of inputting something.

I just add a space character to the beginning of the prompt, highlighting
it, whenever completion is available. I add another space with no
highlighting, to separate this indicator from the prompt per se.

(I also use Miles's minibuf-depth.el (or mbuf-depth.el), BTW, to indicate
recursive minibuffer depth, and the two indications play well together.)

An additional subtlety can help a little more: I prepend a different
character (`=') and highlight it in a different color, whenever completion
requires a match.

In sum:

* When must-match completing, `=' is prepended and highlighted one way.

* When completing otherwise, ` ' is prepended and highlighted another way.

* When not completing, nothing is prepended.

Users can turn off this feature, if they prefer, by just customizing the
prefix strings to "".






reply via email to

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