From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: key to yank text at point into minibuffer? Date: Sun, 12 Feb 2006 09:22:48 -0800 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1139765824 7404 80.91.229.2 (12 Feb 2006 17:37:04 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 12 Feb 2006 17:37:04 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Feb 12 18:37:02 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1F8L9h-00039A-1J for ged-emacs-devel@m.gmane.org; Sun, 12 Feb 2006 18:37:01 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F8L9g-0004wB-H3 for ged-emacs-devel@m.gmane.org; Sun, 12 Feb 2006 12:37:00 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1F8KxR-0000i2-39 for emacs-devel@gnu.org; Sun, 12 Feb 2006 12:24:21 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1F8Kwk-0007sF-U2 for emacs-devel@gnu.org; Sun, 12 Feb 2006 12:23:42 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F8KwF-00075t-LN for emacs-devel@gnu.org; Sun, 12 Feb 2006 12:23:07 -0500 Original-Received: from [141.146.126.228] (helo=agminet01.oracle.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.52) id 1F8L0W-0005ot-0w for emacs-devel@gnu.org; Sun, 12 Feb 2006 12:27:32 -0500 Original-Received: from rgmsgw300.us.oracle.com (rgmsgw300.us.oracle.com [138.1.186.49]) by agminet01.oracle.com (Switch-3.1.7/Switch-3.1.7) with ESMTP id k1CHN4BT011325 for ; Sun, 12 Feb 2006 11:23:05 -0600 Original-Received: from rgmsgw300.us.oracle.com (localhost [127.0.0.1]) by rgmsgw300.us.oracle.com (Switch-3.1.7/Switch-3.1.7) with ESMTP id k1CHN4RO006544 for ; Sun, 12 Feb 2006 10:23:04 -0700 Original-Received: from dradamslap (dhcp-amer-whq-csvpn-gw3-141-144-81-71.vpn.oracle.com [141.144.81.71]) by rgmsgw300.us.oracle.com (Switch-3.1.7/Switch-3.1.7) with SMTP id k1CHN3nM006533 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) for ; Sun, 12 Feb 2006 10:23:04 -0700 Original-To: X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) In-Reply-To: Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506 X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:50408 Archived-At: Anyway, as a poor-man's replacement for some of the ffap functionality, I added a minibuffer key (I use `M-.') to all minibuffer maps. This command just yanks the symbol name at point into the minibuffer, replacing what was there. ... Any interest in adding such a feature? I like the idea. I use C-w in isearch a lot, and this is similar. Yes. `C-w' in isearch was one inspiration for this; the other was ffap. But there is no need, I think, for the analog of isearch's repeated `C-w' yanking successive words. That's one reason I instead use repeating to employ alternative text-grabbing functions. I cannot see many cases I would use it right now, but I think it would be useful when doing C-h f and when the word to the left of point is just a partial function name. For example, if point is just after `string-match' and I do C-h f I get string-match suggested as default value. That is good. Sometimes I start writing a function name but I don't know the whole name. In those cases C-h f will not help me at all, even if I have written the first characters of the function name. In that case, this M-. key would have been useful to me. Yes. However: . Cursor after (complete function name) "string-match" `C-h f' already proposes `string-match' as the default. The proposal is useful in cases where the default value is *not* the text at point. . Wrt the case of a partial name like "string-ma": yes, this would help. (You also have `ESC-TAB' (`lisp-complete-symbol').) I am curious, what do you use this for? Uh, as I said, to pick up a file name or URL (or other name) in a buffer, for use as minibuffer input. I use it as a poor-man's ffap. Example: You're in a SQL script on a line like "@some-long-file-name.sql". You use `C-x 4 f M-.' to pull that text into the minibuffer, to visit that file. This saves you selecting the text and pasting it into the minibuffer; that's all. This example also points out the "poor-man" aspect: the symbol name at point is not exactly what you want here, because it includes the `@', which you must then delete. And if the script didn't explicitly include ".sql" in the file name, then you would need to add that in the minibuffer (perhaps via completion). In many cases, this mechanism gives you exactly the text you need; in some cases you must tweak what it gives you.