From: Eli Zaretskii Date: Sat, 12 Dec 2015 14:49:47 +0000 (+0200) Subject: Document the new bindings of and in the minibuffer X-Git-Tag: emacs-25.0.90~482 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=625a5df83414b49a82da8cc47a91aa1758fd71d4;p=emacs.git Document the new bindings of and in the minibuffer * doc/emacs/mini.texi (Minibuffer History): Describe the new bindings of and in the minibuffer. --- diff --git a/doc/emacs/mini.texi b/doc/emacs/mini.texi index ed339a967a4..869e06424ad 100644 --- a/doc/emacs/mini.texi +++ b/doc/emacs/mini.texi @@ -588,13 +588,17 @@ argument into the minibuffer: @table @kbd @item M-p -@itemx @key{UP} Move to the previous item in the minibuffer history, an earlier argument (@code{previous-history-element}). @item M-n -@itemx @key{DOWN} Move to the next item in the minibuffer history (@code{next-history-element}). +@item @key{UP} +@itemx @key{DOWN} +Like @kbd{M-p} and @kbd{M-n}, but move to the previous or next line of +a multi-line item before going to the previous history item +(@code{previous-line-or-history-element} and +@code{next-line-or-history-element}) . @item M-r @var{regexp} @key{RET} Move to an earlier item in the minibuffer history that matches @var{regexp} (@code{previous-matching-history-element}). @@ -609,13 +613,13 @@ Move to a later item in the minibuffer history that matches @kindex DOWN @r{(minibuffer history)} @findex next-history-element @findex previous-history-element - While in the minibuffer, @kbd{M-p} or @key{UP} -(@code{previous-history-element}) moves through the minibuffer history -list, one item at a time. Each @kbd{M-p} fetches an earlier item from -the history list into the minibuffer, replacing its existing contents. -Typing @kbd{M-n} or @key{DOWN} (@code{next-history-element}) moves -through the minibuffer history list in the opposite direction, -fetching later entries into the minibuffer. + While in the minibuffer, @kbd{M-p} (@code{previous-history-element}) +moves through the minibuffer history list, one item at a time. Each +@kbd{M-p} fetches an earlier item from the history list into the +minibuffer, replacing its existing contents. Typing @kbd{M-n} +(@code{next-history-element}) moves through the minibuffer history +list in the opposite direction, fetching later entries into the +minibuffer. If you type @kbd{M-n} in the minibuffer when there are no later entries in the minibuffer history (e.g., if you haven't previously @@ -623,6 +627,14 @@ typed @kbd{M-p}), Emacs tries fetching from a list of default arguments: values that you are likely to enter. You can think of this as moving through the ``future history''. +@findex previous-line-or-history-element +@findex next-line-or-history-element + The arrow keys @kbd{@key{UP}} and @kbd{@key{DOWN}} work like +@kbd{M-p} and @kbd{M-n}, but if the current history item is longer +than a single line, they allow you to move to the previous or next +line of the current history item before going to the previous or next +history item. + If you edit the text inserted by the @kbd{M-p} or @kbd{M-n} minibuffer history commands, this does not change its entry in the history list. However, the edited argument does go at the end of the diff --git a/etc/NEWS b/etc/NEWS index 383b4917686..d65e9dd6fa6 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -492,11 +492,15 @@ match the current input. ** Minibuffer -*** You can use and keys to move point in the multi-line -minibuffer just as in an ordinary buffer. Only when point moves over ++++ +*** You can use and arrow keys to move through history by lines. +The new commands `next-line-or-history-element' and +`previous-line-or-history-element', bound to and in the +minibuffer, allow by-line movement through minibuffer history, +similarly to an ordinary buffer. Only when point moves over the bottom/top of the minibuffer it goes to the next/previous history -element. The new commands bound to and in the minibuffer: -`next-line-or-history-element' and `previous-line-or-history-element'. +element. `M-p' and `M-n' still move directly to previous/next history +item as before. ** Search and Replace