Received: (at submit) by debbugs.gnu.org; 9 Aug 2010 14:50:29 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Aug 09 10:50:29 2010 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1OiTgL-0007Wb-79 for submit <at> debbugs.gnu.org; Mon, 09 Aug 2010 10:50:29 -0400 Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from <thierry.volpiatto@HIDDEN>) id 1OiTgJ-0007WW-05 for submit <at> debbugs.gnu.org; Mon, 09 Aug 2010 10:50:27 -0400 Received: from lists.gnu.org ([199.232.76.165]:58275) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from <thierry.volpiatto@HIDDEN>) id 1OiTgy-0006Po-MX for submit <at> debbugs.gnu.org; Mon, 09 Aug 2010 10:51:08 -0400 Received: from [140.186.70.92] (port=54130 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OiTgu-0006sp-9b for bug-gnu-emacs@HIDDEN; Mon, 09 Aug 2010 10:51:08 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from <thierry.volpiatto@HIDDEN>) id 1OiTgs-0004su-Uf for bug-gnu-emacs@HIDDEN; Mon, 09 Aug 2010 10:51:04 -0400 Received: from mail-wy0-f169.google.com ([74.125.82.169]:41474) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from <thierry.volpiatto@HIDDEN>) id 1OiTgs-0004sg-QW for bug-gnu-emacs@HIDDEN; Mon, 09 Aug 2010 10:51:02 -0400 Received: by wyg36 with SMTP id 36so11262943wyg.0 for <bug-gnu-emacs@HIDDEN>; Mon, 09 Aug 2010 07:51:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject :organization:references:date:in-reply-to:message-id:user-agent :mime-version:content-type; bh=kEm3kPwAUOIk/z1k60wzIg0LjlAh/z1XR1j0qYVb7ic=; b=NzGBgZwjmzxAo2Bd4f75xdpxJ+y4GVHCd5bTiMEGnPTjS7m/GL36UMb5HpcI132/RO 3zWp7BY8GtF8kezQ8xkq8UmN5solZJ+Z6++nM3e5IAe36R9aiuiTVx74jXPXbcWatL1e bz5KePGmC2YK0gLG3yno/NySOZv5PCuliCo4c= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:organization:references:date:in-reply-to :message-id:user-agent:mime-version:content-type; b=J9lks4YX5eZxAq6PTrhXDOp31lYGiMCzTDCNhxznZpM/8VSQkowqA3VZMrVDKUkr8O Avo6TveCWoNLURzgWzUnqZ0Sx/HyqAAmHV0I8FKhNg/A9V2tRDCrvRdEq1RSmyieIk8v ikSg4fK6xAHHhH0xTR41mAKL+U9olz+tjZnB4= Received: by 10.227.144.2 with SMTP id x2mr13951053wbu.76.1281365461272; Mon, 09 Aug 2010 07:51:01 -0700 (PDT) Received: from tux.homenetwork (173.77.197-77.rev.gaoland.net [77.197.77.173]) by mx.google.com with ESMTPS id l55sm2612293weq.17.2010.08.09.07.50.59 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 09 Aug 2010 07:51:00 -0700 (PDT) From: Thierry Volpiatto <thierry.volpiatto@HIDDEN> To: "Drew Adams" <drew.adams@HIDDEN> Subject: Re: bug#6823: 24.0.50; Wdired or Dired enhancement Organization: ThierryVolpiatto References: <C88DA2F83AA2412B90A418B52D30C68E@HIDDEN> <87pqxs5o7s.fsf@HIDDEN> <2F0E9BE0383248998DD1960E32677585@HIDDEN> Date: Mon, 09 Aug 2010 16:48:26 +0200 In-Reply-To: <2F0E9BE0383248998DD1960E32677585@HIDDEN> (Drew Adams's message of "Mon, 9 Aug 2010 07:16:01 -0700") Message-ID: <87lj8fj0zp.fsf@HIDDEN> User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -5.4 (-----) X-Debbugs-Envelope-To: submit Cc: bug-gnu-emacs@HIDDEN X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Sender: debbugs-submit-bounces <at> debbugs.gnu.org Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org X-Spam-Score: -5.4 (-----) "Drew Adams" <drew.adams@HIDDEN> writes: >> > AFAIK the best you can do now is to use Wdired and perform >> > query-replace with some fancy replacement expression. >> > We should offer something simpler for the common task of >> > renaming a sequence of files. >> >> We have have two tools to achieve this, wdired-change-to-wdired-mode, >> and query-replace-regexp used with \, and \# in the >> replacement regexp. > > That's exactly what I meant by "use Wdired and perform query-replace with some > fancy replacement expression." Ah! yes sorry. > I know that a user can do it. What I suggest is that we also "offer something > simpler for the common task of renaming a sequence of files." > > A Windows user need not be familiar with Lisp sexps (and especially arcane > incantations using `\,' and \#). It's great to have that capability, but we > should also offer something simpler for the common, simple case. Maybe have a special command for wdired that start wdired-mode but provide a special regexp template for this case to give to query-replace. What is good with wdired+query-replace is we can undo if regexp is wrong until we find a good regexp. >> You can use also this function:(You may have to run it two >> times in some rare cases) >> >> (defun serial-rename (dir ext name start)... > > I haven't tried it, but from the doc string, it sounds like the kind of thing I > had in mind. > > The doc for Dired should mention such a command (which should be bound to a > key), and it should mention that you can do fancier, more flexible replacement > using query-replace with `\,', `\#', etc. > This command (serial-rename) is not part of emacs, it's just a little command of my config i use sometime to rename quickly my photos. However i prefer wdired/query-replace-regexp. -- Thierry Volpiatto Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997
owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN
:bug#6823
; Package emacs
.
Full text available.Received: (at submit) by debbugs.gnu.org; 9 Aug 2010 14:15:37 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Aug 09 10:15:37 2010 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1OiT8b-0007Fg-91 for submit <at> debbugs.gnu.org; Mon, 09 Aug 2010 10:15:37 -0400 Received: from mx10.gnu.org ([199.232.76.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from <drew.adams@HIDDEN>) id 1OiT8a-0007Fa-Ld for submit <at> debbugs.gnu.org; Mon, 09 Aug 2010 10:15:37 -0400 Received: from lists.gnu.org ([199.232.76.165]:37871) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from <drew.adams@HIDDEN>) id 1OiT9G-0006DT-21 for submit <at> debbugs.gnu.org; Mon, 09 Aug 2010 10:16:18 -0400 Received: from [140.186.70.92] (port=39259 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OiT9E-00076T-Ho for bug-gnu-emacs@HIDDEN; Mon, 09 Aug 2010 10:16:17 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from <drew.adams@HIDDEN>) id 1OiT9C-0006cL-4G for bug-gnu-emacs@HIDDEN; Mon, 09 Aug 2010 10:16:16 -0400 Received: from rcsinet10.oracle.com ([148.87.113.121]:62635) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from <drew.adams@HIDDEN>) id 1OiT9B-0006bx-UC for bug-gnu-emacs@HIDDEN; Mon, 09 Aug 2010 10:16:14 -0400 Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id o79EG7E1029063 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 9 Aug 2010 14:16:09 GMT Received: from acsmt355.oracle.com (acsmt355.oracle.com [141.146.40.155]) by acsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o795ADjm017202; Mon, 9 Aug 2010 14:16:06 GMT Received: from abhmt018.oracle.com by acsmt354.oracle.com with ESMTP id 479151421281363365; Mon, 09 Aug 2010 07:16:05 -0700 Received: from dradamslap1 (/10.159.243.183) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 09 Aug 2010 07:16:05 -0700 From: "Drew Adams" <drew.adams@HIDDEN> To: "'Thierry Volpiatto'" <thierry.volpiatto@HIDDEN>, <bug-gnu-emacs@HIDDEN> References: <C88DA2F83AA2412B90A418B52D30C68E@HIDDEN> <87pqxs5o7s.fsf@HIDDEN> Subject: RE: bug#6823: 24.0.50; Wdired or Dired enhancement Date: Mon, 9 Aug 2010 07:16:01 -0700 Message-ID: <2F0E9BE0383248998DD1960E32677585@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 Thread-Index: Acs3iVEMzcHBTgLgTRSymA3rNJ9d2gAQvb9A In-Reply-To: <87pqxs5o7s.fsf@HIDDEN> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5931 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -6.3 (------) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Sender: debbugs-submit-bounces <at> debbugs.gnu.org Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org X-Spam-Score: -6.3 (------) > > AFAIK the best you can do now is to use Wdired and perform > > query-replace with some fancy replacement expression. > > We should offer something simpler for the common task of > > renaming a sequence of files. > > We have have two tools to achieve this, wdired-change-to-wdired-mode, > and query-replace-regexp used with \, and \# in the > replacement regexp. That's exactly what I meant by "use Wdired and perform query-replace with some fancy replacement expression." I know that a user can do it. What I suggest is that we also "offer something simpler for the common task of renaming a sequence of files." A Windows user need not be familiar with Lisp sexps (and especially arcane incantations using `\,' and \#). It's great to have that capability, but we should also offer something simpler for the common, simple case. > You can use also this function:(You may have to run it two > times in some rare cases) > > (defun serial-rename (dir ext name start)... I haven't tried it, but from the doc string, it sounds like the kind of thing I had in mind. The doc for Dired should mention such a command (which should be bound to a key), and it should mention that you can do fancier, more flexible replacement using query-replace with `\,', `\#', etc.
owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN
:bug#6823
; Package emacs
.
Full text available.Received: (at 6823) by debbugs.gnu.org; 9 Aug 2010 14:03:09 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Aug 09 10:03:09 2010 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1OiSwW-00079m-Hq for submit <at> debbugs.gnu.org; Mon, 09 Aug 2010 10:03:08 -0400 Received: from rcsinet10.oracle.com ([148.87.113.121]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from <drew.adams@HIDDEN>) id 1OiSwU-00079P-Is for 6823 <at> debbugs.gnu.org; Mon, 09 Aug 2010 10:03:06 -0400 Received: from rcsinet15.oracle.com (rcsinet15.oracle.com [148.87.113.117]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id o79E3itJ022154 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 9 Aug 2010 14:03:46 GMT Received: from acsmt355.oracle.com (acsmt355.oracle.com [141.146.40.155]) by rcsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o796QHsF003834; Mon, 9 Aug 2010 14:03:44 GMT Received: from abhmt002.oracle.com by acsmt354.oracle.com with ESMTP id 499012561281362555; Mon, 09 Aug 2010 07:02:35 -0700 Received: from dradamslap1 (/10.159.243.183) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 09 Aug 2010 07:02:33 -0700 From: "Drew Adams" <drew.adams@HIDDEN> To: "'Eli Zaretskii'" <eliz@HIDDEN> References: <C88DA2F83AA2412B90A418B52D30C68E@HIDDEN> <83y6cgv6d8.fsf@HIDDEN> Subject: RE: bug#6823: 24.0.50; Wdired or Dired enhancement Date: Mon, 9 Aug 2010 07:02:30 -0700 Message-ID: <61BEBFF918EF4FB699D6D68F76DB49DC@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 Thread-Index: Acs3btr6Yx5geVWyTkSeprPgDH4dYgAW6O3A In-Reply-To: <83y6cgv6d8.fsf@HIDDEN> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5931 X-Spam-Score: -6.3 (------) X-Debbugs-Envelope-To: 6823 Cc: 6823 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Sender: debbugs-submit-bounces <at> debbugs.gnu.org Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org X-Spam-Score: -6.3 (------) > > Emacs sorely needs one or more commands that let you rename the > > marked files as a sequence (following a pattern). > > Doesn't the "% R" command in Dired use query-replace under the hood? > If so, doesn't it already allow to include Lisp expressions in the > replacement that are eval'ed? That kind of thing is what I had in mind when I said (though I mentioned Wdired, not Dired): >> AFAIK the best you can do now is to use Wdired and perform >> query-replace with some fancy replacement expression The Windows behavior does not require any use of a fancy replacement expression (Lisp). Again, we can do better than Windows does, and it is good to also offer fancy replacement (e.g. Lisp sexps). But we should also offer something as simple as Windows does, and not _require_ users who want to do this kind of common renaming to work their way through Lisp replacement sexps (no matter how simple the sexp might be). In addition, we should probably advertise this renaming better (even %R in Dired), in the Dired/Wdired doc. If %R is the best we can do for now, then perhaps add a very simple, short example to illustrate the kind of renaming I mentioned.
owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN
:bug#6823
; Package emacs
.
Full text available.Received: (at submit) by debbugs.gnu.org; 9 Aug 2010 06:10:13 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Aug 09 02:10:13 2010 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1OiLYq-0002zW-TK for submit <at> debbugs.gnu.org; Mon, 09 Aug 2010 02:10:13 -0400 Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from <geb-bug-gnu-emacs@HIDDEN>) id 1OiLYo-0002zP-SP for submit <at> debbugs.gnu.org; Mon, 09 Aug 2010 02:10:11 -0400 Received: from lists.gnu.org ([199.232.76.165]:44726) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from <geb-bug-gnu-emacs@HIDDEN>) id 1OiLZT-00025u-Jt for submit <at> debbugs.gnu.org; Mon, 09 Aug 2010 02:10:51 -0400 Received: from [140.186.70.92] (port=49738 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OiLZS-00037C-2e for bug-gnu-emacs@HIDDEN; Mon, 09 Aug 2010 02:10:51 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_RP_MATCHES_RCVD, T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from <geb-bug-gnu-emacs@HIDDEN>) id 1OiLZQ-00025e-Rc for bug-gnu-emacs@HIDDEN; Mon, 09 Aug 2010 02:10:49 -0400 Received: from lo.gmane.org ([80.91.229.12]:56885) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from <geb-bug-gnu-emacs@HIDDEN>) id 1OiLZQ-00025Z-MB for bug-gnu-emacs@HIDDEN; Mon, 09 Aug 2010 02:10:48 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from <geb-bug-gnu-emacs@HIDDEN>) id 1OiLZP-0006IP-8v for bug-gnu-emacs@HIDDEN; Mon, 09 Aug 2010 08:10:47 +0200 Received: from 173.77.197-77.rev.gaoland.net ([77.197.77.173]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for <bug-gnu-emacs@HIDDEN>; Mon, 09 Aug 2010 08:10:47 +0200 Received: from thierry.volpiatto by 173.77.197-77.rev.gaoland.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for <bug-gnu-emacs@HIDDEN>; Mon, 09 Aug 2010 08:10:47 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@HIDDEN From: Thierry Volpiatto <thierry.volpiatto@HIDDEN> Subject: Re: bug#6823: 24.0.50; Wdired or Dired enhancement Date: Mon, 09 Aug 2010 08:08:10 +0200 Organization: ThierryVolpiatto Lines: 25 Message-ID: <87lj8g5ned.fsf@HIDDEN> References: <C88DA2F83AA2412B90A418B52D30C68E@HIDDEN> <83y6cgv6d8.fsf@HIDDEN> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@HIDDEN X-Gmane-NNTP-Posting-Host: 173.77.197-77.rev.gaoland.net User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:3vwz6jWy34W/Be+a3p9mt/UcGQA= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -5.3 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Sender: debbugs-submit-bounces <at> debbugs.gnu.org Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org X-Spam-Score: -5.3 (-----) Eli Zaretskii <eliz@HIDDEN> writes: >> From: "Drew Adams" <drew.adams@HIDDEN> >> Date: Sat, 7 Aug 2010 11:37:43 -0700 >> Cc: >> >> Emacs sorely needs one or more commands that let you rename the >> marked files as a sequence (following a pattern). > > Doesn't the "% R" command in Dired use query-replace under the hood? > If so, doesn't it already allow to include Lisp expressions in the > replacement that are eval'ed? It seem "%R" rename only files matching regexp to newname but doesn't allow the use of "\," and "\#" in the regexp replacement like query-replace-regexp does. > > > -- Thierry Volpiatto Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997
owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN
:bug#6823
; Package emacs
.
Full text available.Received: (at submit) by debbugs.gnu.org; 9 Aug 2010 05:52:42 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Aug 09 01:52:42 2010 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1OiLHu-0002rk-DZ for submit <at> debbugs.gnu.org; Mon, 09 Aug 2010 01:52:42 -0400 Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from <geb-bug-gnu-emacs@HIDDEN>) id 1OiLHr-0002rf-UL for submit <at> debbugs.gnu.org; Mon, 09 Aug 2010 01:52:40 -0400 Received: from lists.gnu.org ([199.232.76.165]:38715) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from <geb-bug-gnu-emacs@HIDDEN>) id 1OiLIW-00021Z-F2 for submit <at> debbugs.gnu.org; Mon, 09 Aug 2010 01:53:20 -0400 Received: from [140.186.70.92] (port=36756 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OiLIV-0001A7-1y for bug-gnu-emacs@HIDDEN; Mon, 09 Aug 2010 01:53:20 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_RP_MATCHES_RCVD, T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from <geb-bug-gnu-emacs@HIDDEN>) id 1OiLIT-0008IF-J5 for bug-gnu-emacs@HIDDEN; Mon, 09 Aug 2010 01:53:18 -0400 Received: from lo.gmane.org ([80.91.229.12]:41422) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from <geb-bug-gnu-emacs@HIDDEN>) id 1OiLIT-0008He-9U for bug-gnu-emacs@HIDDEN; Mon, 09 Aug 2010 01:53:17 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from <geb-bug-gnu-emacs@HIDDEN>) id 1OiLIP-000229-Lr for bug-gnu-emacs@HIDDEN; Mon, 09 Aug 2010 07:53:13 +0200 Received: from 173.77.197-77.rev.gaoland.net ([77.197.77.173]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for <bug-gnu-emacs@HIDDEN>; Mon, 09 Aug 2010 07:53:13 +0200 Received: from thierry.volpiatto by 173.77.197-77.rev.gaoland.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for <bug-gnu-emacs@HIDDEN>; Mon, 09 Aug 2010 07:53:13 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@HIDDEN From: Thierry Volpiatto <thierry.volpiatto@HIDDEN> Subject: Re: bug#6823: 24.0.50; Wdired or Dired enhancement Date: Mon, 09 Aug 2010 07:50:31 +0200 Organization: ThierryVolpiatto Lines: 69 Message-ID: <87pqxs5o7s.fsf@HIDDEN> References: <C88DA2F83AA2412B90A418B52D30C68E@HIDDEN> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@HIDDEN X-Gmane-NNTP-Posting-Host: 173.77.197-77.rev.gaoland.net User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:11gQiYPvHiPdMYzoeCrPrpu7uSg= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -5.3 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Sender: debbugs-submit-bounces <at> debbugs.gnu.org Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org X-Spam-Score: -5.3 (-----) Hi Drew, "Drew Adams" <drew.adams@HIDDEN> writes: > Emacs sorely needs one or more commands that let you rename the > marked files as a sequence (following a pattern). > > See MS Windows for an example (but we could do better): > > 1. You sort the file list the way you want, to put the files you want to > act on in the right order. Especially with libraries such as Francis > Wright's `dired-sort-menu.el', you can sort Dired in many different > ways. > > 2. You mark the files you want to rename. (In Windows you select them.) > > 3. You invoke a rename command, and enter a pattern for the new names. > The pattern includes an optional starting index, which is a whole > number. In Windows you put the index in parens, which are included in > the file names. Example: `new name (100)'. The marked files are named > `new name (100)', `new name (101)'... > > Obviously, in Emacs we could provide for better patterns and > substitutions than this. But AFAIK today we offer nothing like this. > > If you have 1000 family photo files you want to rename to something like > `2010 Summer Vacation (1000)', `2010 Summer Vacation (1001)' etc. (or > even just `1000', `1001'...), then AFAIK the best you can do now is to > use Wdired and perform query-replace with some fancy replacement > expression. We should offer something simpler for the common task of > renaming a sequence of files. We have have two tools to achieve this, wdired-change-to-wdired-mode, and query-replace-regexp used with \, and \# in the replacement regexp. ,---- | E.g: (in dired) | C-x C-q | C-M-% | ==> [A-Za-z0-9]*.jpg | ==> 2010-summer-vaccation-\,(format "1%03d" \#).jpg `---- You can use also this function:(You may have to run it two times in some rare cases) ,---- | (defun serial-rename (dir ext name start) | "rename all the files of DIR matching regex EXT with the name NAME \ | starting to number START - ex: file01.jpg" | (interactive "Ddir: \nsExt(no dot): \nsName: \nnStart: ") | (find-file dir) | (let* ((ls-dir (file-expand-wildcards (format "*.%s" ext) t)) | (new-ls-dir (loop with len = (length ls-dir) | repeat len for count from start | for fnum = (if (< start 10) "0%s" "%s") | collect (concat dir name (format fnum count) "." ext)))) | (loop for i in ls-dir for index from 0 | for new-name = (nth index new-ls-dir) | unless (file-exists-p new-name) do (rename-file i new-name))) | (revert-buffer nil t nil)) `---- -- Thierry Volpiatto Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997
owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN
:bug#6823
; Package emacs
.
Full text available.Received: (at 6823) by debbugs.gnu.org; 9 Aug 2010 02:58:37 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 08 22:58:37 2010 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1OiIZR-0001mR-1a for submit <at> debbugs.gnu.org; Sun, 08 Aug 2010 22:58:37 -0400 Received: from mtaout21.012.net.il ([80.179.55.169]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from <eliz@HIDDEN>) id 1OiIZO-0001mM-Cl for 6823 <at> debbugs.gnu.org; Sun, 08 Aug 2010 22:58:35 -0400 Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0L6V008006S3HT00@HIDDEN> for 6823 <at> debbugs.gnu.org; Mon, 09 Aug 2010 05:59:14 +0300 (IDT) Received: from HOME-C4E4A596F7 ([77.126.102.143]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0L6V007B66YPIBD0@HIDDEN>; Mon, 09 Aug 2010 05:59:14 +0300 (IDT) Date: Mon, 09 Aug 2010 05:59:15 +0300 From: Eli Zaretskii <eliz@HIDDEN> Subject: Re: bug#6823: 24.0.50; Wdired or Dired enhancement In-reply-to: <C88DA2F83AA2412B90A418B52D30C68E@HIDDEN> X-012-Sender: halo1@HIDDEN To: Drew Adams <drew.adams@HIDDEN> Message-id: <83y6cgv6d8.fsf@HIDDEN> References: <C88DA2F83AA2412B90A418B52D30C68E@HIDDEN> X-Spam-Score: -2.0 (--) X-Debbugs-Envelope-To: 6823 Cc: 6823 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: Eli Zaretskii <eliz@HIDDEN> List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Sender: debbugs-submit-bounces <at> debbugs.gnu.org Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org X-Spam-Score: -2.0 (--) > From: "Drew Adams" <drew.adams@HIDDEN> > Date: Sat, 7 Aug 2010 11:37:43 -0700 > Cc: > > Emacs sorely needs one or more commands that let you rename the > marked files as a sequence (following a pattern). Doesn't the "% R" command in Dired use query-replace under the hood? If so, doesn't it already allow to include Lisp expressions in the replacement that are eval'ed?
owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN
:bug#6823
; Package emacs
.
Full text available.Received: (at submit) by debbugs.gnu.org; 8 Aug 2010 17:14:44 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 08 13:14:43 2010 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1Oi9SN-0002nK-9y for submit <at> debbugs.gnu.org; Sun, 08 Aug 2010 13:14:43 -0400 Received: from mx10.gnu.org ([199.232.76.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from <drew.adams@HIDDEN>) id 1Oi9SL-0002nB-GI for submit <at> debbugs.gnu.org; Sun, 08 Aug 2010 13:14:42 -0400 Received: from lists.gnu.org ([199.232.76.165]:53543) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from <drew.adams@HIDDEN>) id 1Oi9T2-0000gq-Kq for submit <at> debbugs.gnu.org; Sun, 08 Aug 2010 13:15:24 -0400 Received: from [140.186.70.92] (port=51246 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oi9Ss-0002FJ-Sv for bug-gnu-emacs@HIDDEN; Sun, 08 Aug 2010 13:15:20 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from <drew.adams@HIDDEN>) id 1OhoHk-0002x8-Bn for bug-gnu-emacs@HIDDEN; Sat, 07 Aug 2010 14:38:21 -0400 Received: from rcsinet10.oracle.com ([148.87.113.121]:23060) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from <drew.adams@HIDDEN>) id 1OhoHk-0002uN-1j for bug-gnu-emacs@HIDDEN; Sat, 07 Aug 2010 14:38:20 -0400 Received: from rcsinet13.oracle.com (rcsinet13.oracle.com [148.87.113.125]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id o77IcH2s029650 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for <bug-gnu-emacs@HIDDEN>; Sat, 7 Aug 2010 18:38:18 GMT Received: from acsmt353.oracle.com (acsmt353.oracle.com [141.146.40.153]) by rcsinet13.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o77IcG15012338 for <bug-gnu-emacs@HIDDEN>; Sat, 7 Aug 2010 18:38:16 GMT Received: from abhmt001.oracle.com by acsmt355.oracle.com with ESMTP id 495230911281206260; Sat, 07 Aug 2010 11:37:40 -0700 Received: from dradamslap1 (/10.159.221.167) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 07 Aug 2010 11:37:40 -0700 From: "Drew Adams" <drew.adams@HIDDEN> To: <bug-gnu-emacs@HIDDEN> Subject: 24.0.50; Wdired or Dired enhancement Date: Sat, 7 Aug 2010 11:37:43 -0700 Message-ID: <C88DA2F83AA2412B90A418B52D30C68E@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 Thread-Index: Acs2X58BjaTzFeCvTWOUGELA7om2IQ== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5931 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Sender: debbugs-submit-bounces <at> debbugs.gnu.org Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org X-Spam-Score: -6.3 (------) Emacs sorely needs one or more commands that let you rename the marked files as a sequence (following a pattern). See MS Windows for an example (but we could do better): 1. You sort the file list the way you want, to put the files you want to act on in the right order. Especially with libraries such as Francis Wright's `dired-sort-menu.el', you can sort Dired in many different ways. 2. You mark the files you want to rename. (In Windows you select them.) 3. You invoke a rename command, and enter a pattern for the new names. The pattern includes an optional starting index, which is a whole number. In Windows you put the index in parens, which are included in the file names. Example: `new name (100)'. The marked files are named `new name (100)', `new name (101)'... Obviously, in Emacs we could provide for better patterns and substitutions than this. But AFAIK today we offer nothing like this. If you have 1000 family photo files you want to rename to something like `2010 Summer Vacation (1000)', `2010 Summer Vacation (1001)' etc. (or even just `1000', `1001'...), then AFAIK the best you can do now is to use Wdired and perform query-replace with some fancy replacement expression. We should offer something simpler for the common task of renaming a sequence of files. In GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600) of 2010-08-02 on 3249CTO Windowing system distributor `Microsoft Corp.', version 5.1.2600 configured using `configure --with-gcc (4.4) --no-opt --cflags -Ic:/xpm/include'
"Drew Adams" <drew.adams@HIDDEN>
:bug-gnu-emacs@HIDDEN
.
Full text available.owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN
:bug#6823
; Package emacs
.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.