help-gnu-emacs
[Top][All Lists]
Advanced

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

RE: grep-at-point


From: Drew Adams
Subject: RE: grep-at-point
Date: Wed, 11 Jan 2017 15:42:19 -0800 (PST)

> > Doesn't `M-x grep RET M-n' give you what you want?  If point
> > is on a Lisp symbol then `M-n' yanks it as the default value.
> 
> It does.  I wasn't aware that grep set a special history list.
> Nice.

It's not a history list.  `M-n' for minibuffer input (with or
without completion) yanks a default value provided by the
command (e.g. `grep') - or several default values, one by one,
if repeated.

It is only if you use `M-n' after you have used `M-p' (which
goes backward in the history list) that `M-n' goes forward
in the history list (and then into the defaults list, when
the history is exhausted in the forward direction).

Think of the list of default values as being prepended to the
history list, and of the starting position being the "origin"
point between the two lists.  If you use `M-p' from the origin
you go backward, into the history.  If you use `M-n' you go
forward, into the list of defaults.



reply via email to

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