From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: Fwd: Re: Easy way to rename files sequentially? Date: Mon, 03 Dec 2007 11:38:10 +0100 Message-ID: <85prxogj1p.fsf@lola.goethe.zz> References: <87hcj87l5d.fsf@localhorst.mine.nu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1196678337 1006 80.91.229.12 (3 Dec 2007 10:38:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 3 Dec 2007 10:38:57 +0000 (UTC) Cc: David Hansen , emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 03 11:39:05 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 1Iz8hd-0000yK-JF for ged-emacs-devel@m.gmane.org; Mon, 03 Dec 2007 11:39:05 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Iz8hM-0003c3-2I for ged-emacs-devel@m.gmane.org; Mon, 03 Dec 2007 05:38:48 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Iz8gX-0002il-A1 for emacs-devel@gnu.org; Mon, 03 Dec 2007 05:37:57 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Iz8gW-0002hM-ET for emacs-devel@gnu.org; Mon, 03 Dec 2007 05:37:56 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Iz8gW-0002h8-3y for emacs-devel@gnu.org; Mon, 03 Dec 2007 05:37:56 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Iz8gV-0002lt-Qs for emacs-devel@gnu.org; Mon, 03 Dec 2007 05:37:55 -0500 Original-Received: from localhost ([127.0.0.1] helo=lola.goethe.zz) by fencepost.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Iz8gP-0000sr-MI; Mon, 03 Dec 2007 05:37:49 -0500 Original-Received: by lola.goethe.zz (Postfix, from userid 1002) id 0CD011C4D3AA; Mon, 3 Dec 2007 11:38:10 +0100 (CET) In-Reply-To: (Richard Stallman's message of "Mon, 03 Dec 2007 01:11:01 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) 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:84562 Archived-At: Richard Stallman writes: > Has anyone looked at this? > > From: Eli Zaretskii > Subject: Re: Easy way to rename files sequentially? > Newsgroups: gmane.emacs.help > To: help-gnu-emacs@gnu.org > Date: Mon, 26 Nov 2007 22:40:47 +0200 > >> From: David Hansen >> Date: Mon, 26 Nov 2007 18:26:02 +0000 >> >> \# isn't working in `dired-do-rename-regexp' > > That sounds like a bug (or missing feature) to me: > dired-do-rename-regexp is supposed to be 100% compatible with > query-replace-regexp, as far as regexp replacement goes. The regexp magic from query-replace-regexp is implemented in a two-step process: first the interactive form translates such elements into a replacement list of a specific form rather than a replacement string, and then perform-replace works using this list. The generated list (and the code processing it) heavily relies on working in a buffer whereas dired-do-rename-regexp basically works on a string. Making the additional magic available generally instead of just to query-replace-regexp itself would require some amount of work, not least of all because one would need to design a reasonable interface for this functionality which is, at the current point of time, more or less a hack inside of replace.el. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum