From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Miles Bader Newsgroups: gmane.emacs.devel Subject: Re: query-replace-interactive not documented Date: Sat, 12 Jun 2004 20:46:34 -0400 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <20040613004634.GA28042@fencepost> References: <20040528.181649.25475113.wl@gnu.org> <200405291737.i4THbPJ06689@raven.dms.auburn.edu> <873c5jug73.fsf@mail.jurta.org> <87oenqa4lu.fsf@mail.jurta.org> <873c51w5rq.fsf@mail.jurta.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1087087646 32644 80.91.224.253 (13 Jun 2004 00:47:26 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 13 Jun 2004 00:47:26 +0000 (UTC) Cc: Juri Linkov , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Sun Jun 13 02:47:20 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BZJ9b-0001A5-00 for ; Sun, 13 Jun 2004 02:47:19 +0200 Original-Received: from lists.gnu.org ([199.232.76.165]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BZJ9b-0008Kp-00 for ; Sun, 13 Jun 2004 02:47:19 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BZJAP-0000pO-BA for emacs-devel@quimby.gnus.org; Sat, 12 Jun 2004 20:48:09 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1BZJAM-0000pE-I5 for emacs-devel@gnu.org; Sat, 12 Jun 2004 20:48:06 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1BZJAL-0000ou-T0 for emacs-devel@gnu.org; Sat, 12 Jun 2004 20:48:06 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BZJAL-0000ok-Oe for emacs-devel@gnu.org; Sat, 12 Jun 2004 20:48:05 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BZJ8z-0005Wj-Hr for emacs-devel@gnu.org; Sat, 12 Jun 2004 20:46:41 -0400 Original-Received: from miles by fencepost.gnu.org with local (Exim 4.34) id 1BZJ8s-0000Wc-TI; Sat, 12 Jun 2004 20:46:35 -0400 Original-To: Richard Stallman Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.28i Blat: Foop X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:24900 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:24900 On Sat, Jun 12, 2004 at 08:01:20PM -0400, Richard Stallman wrote: > What do you think about documenting `query-replace-regexp-eval' > in the Emacs manual even without a keybinding? > > The reason I did not document it before is that I'm not sure it is > really very useful. I never use it. How many people here actually > use it? I use it -- not everyday, but for some problems, it can be invaluable. When I found out about this function I was elated; it replaces various less-flexible ad-hoc elisp code I had, and for the cases where you need it, it's actually very succinct. E.g., when I have some C defines: #define X 0x001 /* bla blah */ #define Y 0x002 ... and I rearrange the cases or do something that screws up the values, it's much easier to use a region-limited `query-replace-regexp-eval' replacing "0x[0-9a-f]*" with (format "0x%04x" (lsh 1 replace-count)) than to do it by hand. -Miles -- I'm beginning to think that life is just one long Yoko Ono album; no rhyme or reason, just a lot of incoherent shrieks and then it's over. --Ian Wolff