all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Yuri Khan <yuri.v.khan@gmail.com>, Juri Linkov <juri@linkov.net>
Cc: Eli Zaretskii <eliz@gnu.org>, Emacs developers <emacs-devel@gnu.org>
Subject: RE: UP and DOWN with multi-line minibuffer history
Date: Tue, 15 Dec 2015 22:29:31 -0800 (PST)	[thread overview]
Message-ID: <431ab481-a87d-43d6-a17b-d29ba3a556b5@default> (raw)
In-Reply-To: <CAP_d_8UYgkgcVJsQ9WEYKw3YPOpwP==c5a3qmQ1EqxUiQe0u8Q@mail.gmail.com>

> 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	other threads:[~2015-12-16  6:29 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-12 14:19 UP and DOWN with multi-line minibuffer history Eli Zaretskii
2015-12-12 15:03 ` Dmitry Gutov
2015-12-12 23:04   ` John Wiegley
2015-12-12 22:47 ` Eric Hanchrow
2015-12-12 23:20 ` Juri Linkov
2015-12-13 15:24   ` Eli Zaretskii
2015-12-14  0:07     ` Juri Linkov
2015-12-14  3:39       ` Eli Zaretskii
2015-12-14 23:45         ` Juri Linkov
2015-12-15  3:37           ` Eli Zaretskii
2015-12-16  0:32             ` Juri Linkov
2015-12-16  1:33               ` Dmitry Gutov
2015-12-17  0:45                 ` Juri Linkov
2015-12-16  2:02               ` Yuri Khan
2015-12-16  6:29                 ` Drew Adams [this message]
2015-12-17  0:49                 ` Juri Linkov
2015-12-15  3:43         ` Dmitry Gutov
2015-12-15 15:45           ` Eli Zaretskii
2015-12-14  9:25     ` David Kastrup
2015-12-14 16:00       ` Eli Zaretskii
2015-12-14 16:41         ` David Kastrup
2015-12-14 17:03           ` Eli Zaretskii
     [not found] <CABr8ebZDmnsCKyBnzU3sSDHefJ2_3uC4Omwg=N4qQ8h80vTxpw@mail.gmail.com>
2015-12-13  3:31 ` Eli Zaretskii
2015-12-13  5:38   ` Anders Lindgren

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=431ab481-a87d-43d6-a17b-d29ba3a556b5@default \
    --to=drew.adams@oracle.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=juri@linkov.net \
    --cc=yuri.v.khan@gmail.com \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.