emacs-devel
[Top][All Lists]
Advanced

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

RE: UP and DOWN with multi-line minibuffer history


From: Drew Adams
Subject: RE: UP and DOWN with multi-line minibuffer history
Date: Tue, 15 Dec 2015 22:29:31 -0800 (PST)

> Other software also has pull-down histories, so one doesn’t have to
> scroll the history while looking at it through a mailbox slit. You
> pull down the history, select an item you want, press Enter, and it
> gets copied into the input box where you can edit it before executing
> again.

Yes, it is too bad that in Emacs the history is invisible that way
(seeing at most one item at a time).  It's a peep show.

> In Emacs UI conventions, it might work like this:
> 
> * Pressing some special key while in minibuffer would open a temporary
>   buffer showing the history and place the point in it.
> * The item containing the point would be optionally highlighted with a face.
> * The user would then move the point to the desired item.
> * Pressing Enter would copy the item containing the point into the
>   minibuffer and bury or kill the history buffer.
> * Attempting any editing command would copy the item containing the
>   point into the minibuffer, bury or kill the history buffer, and
>   perform the editing command in the minibuffer.
> * Pressing C-g would just bury or kill the history buffer without
>   modifying the minibuffer contents.

FWIW, that's pretty much how completing against the input history works
in Icicles.

> * Pressing some special key while in minibuffer would open a temporary
>   buffer showing the history and place the point in it.

`M-o' does that (for any minibuffer input, not just for input read with 
completion).  It opens temporary buffer *Completions* with the list of
past inputs.  You can sort them in various orders, including latest use.

`M-o' lets you use completion or cycling to insert a history item (or
several) in the minibuffer.
  
> * The item containing the point would be optionally highlighted with
>   a face.

Yes, the "current" history item is highlighted.  (You can think of point
in *Completions* as being at the current item, but it is not.  Point in
*Completions* is really irrelevant.)

> * The user would then move the point to the desired item.

You can cycle among the items.  Or complete to one.  Or combine
completing (to narrow the candidates) and cycling.  Or choose one
withthe mouse.  Current-item highlighting tracks when you cycle
(like "moving point").

> * Pressing Enter would copy the item containing the point into the 
>   minibuffer

Yes, `RET' appends the current candidate to the current minibuffer
content.  (`M-k' erases the minibuffer.)

An inserted history item is followed by a space, by default.
 With a prefix arg <= 0, no space is appended.
 With a prefix arg >=0, each inserted item is wrapped in "...".

(You can also use `M-o' as a multi-command, so one invocation lets
you insert any number of history items, even multiple times, and
in this case you can also use a prefix arg on individual items, to
append them individually with or without spaces and "..." wrappers.)

> * Attempting any editing command would copy the item containing the
>   point into the minibuffer, bury or kill the history buffer, and
>   perform the editing command in the minibuffer.

Nah.  Any editing command/key acts normally in the minibuffer, to
edit its contents.  (Icicles is even more vanilla than vanilla, in
preserving editing keys.  `?', `SPC', and `C-j' are self-inserting,
for instance.)

> * Pressing C-g would just bury or kill the history buffer without
>   modifying the minibuffer contents.

Yes.  `C-g' cancels completion.  You can continue to use the minibuffer.

http://www.emacswiki.org/emacs/Icicles_-_History_Enhancements#M-o



reply via email to

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