From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.help Subject: RE: Use text in emacs buffer to populate command window Date: Mon, 18 Feb 2013 10:41:46 -0800 Message-ID: References: <1361211922783-278645.post@n5.nabble.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1361212922 32643 80.91.229.3 (18 Feb 2013 18:42:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 18 Feb 2013 18:42:02 +0000 (UTC) To: "'acomber'" , Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Feb 18 19:42:24 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1U7VfU-00038f-1R for geh-help-gnu-emacs@m.gmane.org; Mon, 18 Feb 2013 19:42:24 +0100 Original-Received: from localhost ([::1]:48009 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U7Vf9-0003aI-Vm for geh-help-gnu-emacs@m.gmane.org; Mon, 18 Feb 2013 13:42:03 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:34585) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U7Vey-0003Li-M6 for Help-gnu-emacs@gnu.org; Mon, 18 Feb 2013 13:41:58 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U7Vex-0007JW-6A for Help-gnu-emacs@gnu.org; Mon, 18 Feb 2013 13:41:52 -0500 Original-Received: from userp1040.oracle.com ([156.151.31.81]:31447) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U7Vew-0007JN-VG for Help-gnu-emacs@gnu.org; Mon, 18 Feb 2013 13:41:51 -0500 Original-Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93]) by userp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r1IIfmuQ010747 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 18 Feb 2013 18:41:49 GMT Original-Received: from acsmt358.oracle.com (acsmt358.oracle.com [141.146.40.158]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r1IIflGW019588 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 18 Feb 2013 18:41:48 GMT Original-Received: from abhmt120.oracle.com (abhmt120.oracle.com [141.146.116.72]) by acsmt358.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id r1IIflXR019107; Mon, 18 Feb 2013 12:41:47 -0600 Original-Received: from dradamslap1 (/130.35.178.8) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 18 Feb 2013 10:41:47 -0800 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <1361211922783-278645.post@n5.nabble.com> Thread-Index: Ac4OBVjuTFT+aSaXQnuocBMqQov5bgAAQA7Q X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: ucsinet21.oracle.com [156.151.31.93] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 156.151.31.81 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 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-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:89150 Archived-At: > If I run a search in emacs I can C-s then c-w repeatedly to > search for text under the current cursor position. But if I use > a diffierent command I can't always use C-w. eg I use m-x > highlight-regexp I want to also grab the text under the cursor. > How do I do that? If the command itself doesn't provide something at point as a default value (retrievable using `M-n') then you're out of luck at that point. But: 1. You can of course select the text you want to inser first, before invoking the command that reads input, then use `C-y' when the command prompts you for input. 2. If you use Icicles, then you can _always_ grab text at or near the cursor and insert it in the minibuffer, using `M-.'. http://www.emacswiki.org/emacs/Icicles_-_Inserting_Text_from_Cursor You can configure what `M-.' does, including what kinds of things it can insert and whether successive `M-.' should insert successive things of the same kind (like `C-w' does for Isearch) or cycle among different kinds of thing.