From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: yank-match.el -- yank matches for a regexp from kill-ring Date: Sun, 02 Mar 2008 19:59:05 +0200 Organization: JURTA Message-ID: <87zlthatxy.fsf@jurta.org> References: <87bqedqltf.fsf@red-bean.com> <873ar9xfps.fsf@red-bean.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1204482441 30448 80.91.229.12 (2 Mar 2008 18:27:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 2 Mar 2008 18:27:21 +0000 (UTC) Cc: emacs-devel@gnu.org To: Karl Fogel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Mar 02 19:27:47 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JVsuY-0005I1-Gm for ged-emacs-devel@m.gmane.org; Sun, 02 Mar 2008 19:27:46 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JVsu1-0006QB-MO for ged-emacs-devel@m.gmane.org; Sun, 02 Mar 2008 13:27:13 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JVstw-0006PT-NJ for emacs-devel@gnu.org; Sun, 02 Mar 2008 13:27:08 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JVstu-0006OA-Or for emacs-devel@gnu.org; Sun, 02 Mar 2008 13:27:08 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JVstu-0006Nx-In for emacs-devel@gnu.org; Sun, 02 Mar 2008 13:27:06 -0500 Original-Received: from relay02.kiev.sovam.com ([62.64.120.197]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JVstu-0003ON-Ap for emacs-devel@gnu.org; Sun, 02 Mar 2008 13:27:06 -0500 Original-Received: from [83.170.232.243] (helo=smtp.svitonline.com) by relay02.kiev.sovam.com with esmtp (Exim 4.67) (envelope-from ) id 1JVstq-0005bl-H1; Sun, 02 Mar 2008 20:27:02 +0200 In-Reply-To: <873ar9xfps.fsf@red-bean.com> (Karl Fogel's message of "Sun, 02 Mar 2008 11:17:51 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (x86_64-unknown-linux-gnu) X-Scanner-Signature: 69470ef176344869aa12c1af2e75e870 X-DrWeb-checked: yes X-SpamTest-Envelope-From: juri@jurta.org X-SpamTest-Group-ID: 00000000 X-SpamTest-Header: Not Detected X-SpamTest-Info: Profiles 2347 [Mar 2 2008] X-SpamTest-Info: helo_type=3 X-SpamTest-Info: {HEADERS: header Content-Type found without required header Content-Transfer-Encoding} X-SpamTest-Method: none X-SpamTest-Rate: 11 X-SpamTest-Status: Not detected X-SpamTest-Status-Extended: not_detected X-SpamTest-Version: SMTP-Filter Version 3.0.0 [0278], KAS30/Release X-detected-kernel: by monty-python.gnu.org: FreeBSD 6.x (1) 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:91083 Archived-At: > Rather than stuffing it into simple.el, I guess I'd create a new file > yank-match.el (suggestions for other destinations welcome). May I make some remarks? Usually a good function is harder to find in a separate small file. Also it is more difficult to incorporate a separate file into the core functionality. But this would be useful: when I tried using your `yank-match' at the first try it yanked the first match but I needed one of the next matches. Then I typed M-y to cycle next matches, but this method failed. I think just like a sequence of `C-y M-y M-y M-y' cycles the kill-ring it would be good to do the same for `yank-match' as `M-x yank-match RET regexp RET M-y M-y' to cycle matches from the kill-ring. BTW, I have a command for similar purposes: (defun insert-yank-from-kill-ring (string) "Insert the selected item from the kill-ring in the minibuffer history. Use minibuffer navigation and search commands to browse the kill-ring in the minibuffer history." (interactive (list (read-string "Yank from kill-ring: " nil 'kill-ring))) (insert-for-yank string)) Comparing to your approach, it has one drawback: multi-line elements in the kill-ring will resize the minibuffer, but in other respects those are complementing approaches. -- Juri Linkov http://www.jurta.org/emacs/