From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nick Sandow Newsgroups: gmane.emacs.help Subject: Re: Insert word at point in minibuffer Date: Mon, 18 Aug 2008 17:20:02 -0700 Message-ID: <48AA11B2.8090507@internode.on.net> References: <48A60768.8040403@example.com> <48A71CFF.4070306@internode.on.net> <009901c8ff6b$687fab00$0200a8c0@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="------------070805030303030101030709" X-Trace: ger.gmane.org 1219044024 15450 80.91.229.12 (18 Aug 2008 07:20:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 18 Aug 2008 07:20:24 +0000 (UTC) Cc: help-gnu-emacs@gnu.org, 'The Badger' To: Drew Adams Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Aug 18 09:21:15 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KUz3C-0007gD-HT for geh-help-gnu-emacs@m.gmane.org; Mon, 18 Aug 2008 09:21:14 +0200 Original-Received: from localhost ([127.0.0.1]:58639 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KUz2F-0005Kp-HJ for geh-help-gnu-emacs@m.gmane.org; Mon, 18 Aug 2008 03:20:15 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KUz1u-0005IF-Nn for help-gnu-emacs@gnu.org; Mon, 18 Aug 2008 03:19:54 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KUz1s-0005Gw-5c for help-gnu-emacs@gnu.org; Mon, 18 Aug 2008 03:19:53 -0400 Original-Received: from [199.232.76.173] (port=50904 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KUz1s-0005Gj-0c for help-gnu-emacs@gnu.org; Mon, 18 Aug 2008 03:19:52 -0400 Original-Received: from mx20.gnu.org ([199.232.41.8]:44736) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KUz1s-0008T4-5z for help-gnu-emacs@gnu.org; Mon, 18 Aug 2008 03:19:52 -0400 Original-Received: from bld-mail07.adl2.internode.on.net ([203.16.214.71] helo=mail.internode.on.net) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KUz1m-0003BT-7h for help-gnu-emacs@gnu.org; Mon, 18 Aug 2008 03:19:47 -0400 Original-Received: from [192.168.4.105] (unverified [59.167.83.3]) by mail.internode.on.net (SurgeMail 3.8f2) with ESMTP id 41751758-1849793 for multiple; Mon, 18 Aug 2008 16:49:20 +0930 (CST) User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) In-Reply-To: <009901c8ff6b$687fab00$0200a8c0@us.oracle.com> X-detected-kernel: by mx20.gnu.org: Linux 2.6 (newer, 3) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:56743 Archived-At: This is a multi-part message in MIME format. --------------070805030303030101030709 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Drew Adams wrote: >> yank into the minibuffer the word at point. >> >> Really, what I want to know is, can this be done "out of the >> box" in Emacs? >> > > > 1. I don't believe that Emacs has anything that lets you do this out of the box. > > There have been discussions in emacs-devel@gnu.org about providing such a > facility - see, for instance, > http://lists.gnu.org/archive/html/emacs-devel/2006-02/msg01074.html. But nothing > has come of it so far, AFAIK. > > > 2. Sometimes commands provide some text at or near the cursor as the default > value, which can be inserted in the minibuffer using `M-n'. > > The OP mentioned `query-replace', for instance. The versions of commands such as > `query-replace' provided by library `replace+.el' do this - see > http://www.emacswiki.org/cgi-bin/wiki/ReplacePlus. Library ffap.el does this for > file names and URLs at point - see > http://www.emacswiki.org/cgi-bin/wiki/FindFileAtPoint. > > > 3. The code you sent generalizes this idea, letting you insert some text at > point into the minibuffer at any time. > > Icicles does this too, but you can also repeat the key (`M-.') to retrieve and > insert additional bits of text (e.g. words, filenames, etc.) successively, or > you can repeat it to retrieve alternative kinds of thing (words, filenames, > etc.) at point. See > http://www.emacswiki.org/cgi-bin/wiki/Icicles_-_Inserting_Text_from_Cursor. > > > Thanks for some useful links. I will definitely check out replace+.el and icicles. Icicles in particular seems to offer a lot of functionality and thus may take some time to digest. Will any of this stuff end up in Emacs itself? It seems to me some things - such as M-x query-replace suggesting a default where currently it does not - are just plain good ideas. cheers --------------070805030303030101030709 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Drew Adams wrote:
yank into the minibuffer the word at point.

Really, what I want to know is, can this be done "out of the 
box" in Emacs?
    


1. I don't believe that Emacs has anything that lets you do this out of the box.

There have been discussions in emacs-devel@gnu.org about providing such a
facility - see, for instance,
http://lists.gnu.org/archive/html/emacs-devel/2006-02/msg01074.html. But nothing
has come of it so far, AFAIK.


2. Sometimes commands provide some text at or near the cursor as the default
value, which can be inserted in the minibuffer using `M-n'.

The OP mentioned `query-replace', for instance. The versions of commands such as
`query-replace' provided by library `replace+.el' do this - see
http://www.emacswiki.org/cgi-bin/wiki/ReplacePlus. Library ffap.el does this for
file names and URLs at point - see
http://www.emacswiki.org/cgi-bin/wiki/FindFileAtPoint.


3. The code you sent generalizes this idea, letting you insert some text at
point into the minibuffer at any time.

Icicles does this too, but you can also repeat the key (`M-.') to retrieve and
insert additional bits of text (e.g. words, filenames, etc.) successively, or
you can repeat it to retrieve alternative kinds of thing (words, filenames,
etc.) at point. See
http://www.emacswiki.org/cgi-bin/wiki/Icicles_-_Inserting_Text_from_Cursor.


  
Thanks for some useful links.  I will definitely check out replace+.el and icicles.  Icicles in particular seems to offer a lot of functionality and thus may take some time to digest.

Will any of this stuff end up in Emacs itself?  It seems to me some things - such as M-x query-replace suggesting a default where currently it does not - are just plain good ideas.

cheers

--------------070805030303030101030709--