From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Mathias Dahl" Newsgroups: gmane.emacs.devel Subject: Re: yank-match.el -- yank matches for a regexp from kill-ring Date: Tue, 17 Jul 2007 20:44:26 +0200 Message-ID: <7dbe73ed0707171144s646421ete52a1c13ab637e61@mail.gmail.com> References: <87bqedqltf.fsf@red-bean.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1184697945 9840 80.91.229.12 (17 Jul 2007 18:45:45 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 17 Jul 2007 18:45:45 +0000 (UTC) Cc: Emacs-Devel To: "Karl Fogel" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 17 20:45:43 2007 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 1IAs3B-0000eo-Ur for ged-emacs-devel@m.gmane.org; Tue, 17 Jul 2007 20:45:34 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IAs3B-0005Tv-9c for ged-emacs-devel@m.gmane.org; Tue, 17 Jul 2007 14:45:33 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IAs2B-0004t8-Rv for emacs-devel@gnu.org; Tue, 17 Jul 2007 14:44:31 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IAs2A-0004sI-5c for emacs-devel@gnu.org; Tue, 17 Jul 2007 14:44:31 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IAs2A-0004sD-36 for emacs-devel@gnu.org; Tue, 17 Jul 2007 14:44:30 -0400 Original-Received: from mu-out-0910.google.com ([209.85.134.191]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IAs29-0003rY-9d for emacs-devel@gnu.org; Tue, 17 Jul 2007 14:44:29 -0400 Original-Received: by mu-out-0910.google.com with SMTP id g7so1978990muf for ; Tue, 17 Jul 2007 11:44:27 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=sTSpF0SeiKMSfERAOOHU+I/Vqn18B8zDR+wPJDgN/+gac8G5Hvd/XqiCJCf1oxXST8modg2uCiRK1K4DRplxyr3UrLmKuqPJnXbZOByH9G/+/iCVvGEDZg/ZSOCaRJxKVAuiQx6wq3JLJXW1VHiId+ujvwAAg+43VrPyqz7rYkc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=TEAt2ss4TTs7kikNMPqRxA4Fsoypqwt6AuJYpqO3rueDt6GzKHE+ft/DDmMYqq35Zfm9sMkNUImZYbys2AtsI5It4CWInqjAXL63uvVQsUSLkS9NaMD9LtKbizLI7YpSDX4Zz0jeSrbxaBvZy4DTgGw7mnfdjT3jkFyrVGgiqW8= Original-Received: by 10.82.189.6 with SMTP id m6mr850135buf.1184697866991; Tue, 17 Jul 2007 11:44:26 -0700 (PDT) Original-Received: by 10.82.117.9 with HTTP; Tue, 17 Jul 2007 11:44:26 -0700 (PDT) In-Reply-To: <87bqedqltf.fsf@red-bean.com> Content-Disposition: inline X-detected-kernel: Linux 2.6 (newer, 2) 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:75009 Archived-At: > ... > (defun yank-match (re) > "Yank the first item in the kill-ring that contains a match for RE > \(a regular expression\). Set point and mark just as \\[yank] does. > > Repeated invocations with no intervening commands will run > successively through the matches for RE in the kill-ring, > replacing the previously-yanked text with the new match each > time, without prompting for a new regular expression, > ... This sounds very handy. I cannot say I have been longing for such a command, but now that I know it exist I will probably find uses for it. Taking advantage of what is in the kill ring is something I have mostly underestimated. There isn't any other way to do this in standard Emacs, is it?