From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.help Subject: RE: grep-at-point Date: Wed, 11 Jan 2017 15:42:19 -0800 (PST) Message-ID: <095e9c72-201e-4309-9c07-a6b1fbbb5561@default> References: <20170111094846.122e7235@gauss> <42a1b0b4-b8c2-4eda-a70a-0442c059bb3c@default> <20170111132923.3e18d91f@gauss> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1484178240 11209 195.159.176.226 (11 Jan 2017 23:44:00 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 11 Jan 2017 23:44:00 +0000 (UTC) Cc: Help GNU Emacs To: Joe Riel Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jan 12 00:43:56 2017 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cRSYT-0001Wt-EC for geh-help-gnu-emacs@m.gmane.org; Thu, 12 Jan 2017 00:43:45 +0100 Original-Received: from localhost ([::1]:58223 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cRSYX-0000IJ-U4 for geh-help-gnu-emacs@m.gmane.org; Wed, 11 Jan 2017 18:43:49 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47111) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cRSXE-0007zT-0f for help-gnu-emacs@gnu.org; Wed, 11 Jan 2017 18:42:28 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cRSXA-0006Pr-Ti for help-gnu-emacs@gnu.org; Wed, 11 Jan 2017 18:42:28 -0500 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:34139) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cRSXA-0006OR-Mb for help-gnu-emacs@gnu.org; Wed, 11 Jan 2017 18:42:24 -0500 Original-Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v0BNgMco011011 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 11 Jan 2017 23:42:22 GMT Original-Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id v0BNgMfv027209 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 11 Jan 2017 23:42:22 GMT Original-Received: from abhmp0002.oracle.com (abhmp0002.oracle.com [141.146.116.8]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id v0BNgLtv004335; Wed, 11 Jan 2017 23:42:21 GMT In-Reply-To: <20170111132923.3e18d91f@gauss> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 12.0.6753.5000 (x86)] X-Source-IP: aserv0022.oracle.com [141.146.126.234] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] [fuzzy] X-Received-From: 141.146.126.69 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:112107 Archived-At: > > 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. >=20 > 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.