From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: dkcombs@panix.com (David Combs) Newsgroups: gmane.emacs.help Subject: "\":Converting "dired-do-rename-regexp" into a "query-replace"? Date: 29 Jan 2010 18:26:35 -0500 Organization: PANIX -- Public Access Networks Corp. Message-ID: NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1264808448 8342 80.91.229.12 (29 Jan 2010 23:40:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 29 Jan 2010 23:40:48 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jan 30 00:40:46 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Nb0SD-0003iS-Td for geh-help-gnu-emacs@m.gmane.org; Sat, 30 Jan 2010 00:40:46 +0100 Original-Received: from localhost ([127.0.0.1]:55070 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nb0SD-0006HH-Dp for geh-help-gnu-emacs@m.gmane.org; Fri, 29 Jan 2010 18:40:45 -0500 Original-Path: news.stanford.edu!usenet.stanford.edu!news.glorb.com!news2.glorb.com!nx02.iad01.newshosting.com!newshosting.com!198.186.190.251.MISMATCH!news-out.readnews.com!transit4.readnews.com!panix!panix1.panix.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 20 Original-NNTP-Posting-Host: panix1.panix.com Original-X-Trace: reader1.panix.com 1264807595 2153 166.84.1.1 (29 Jan 2010 23:26:35 GMT) Original-X-Complaints-To: abuse@panix.com Original-NNTP-Posting-Date: Fri, 29 Jan 2010 23:26:35 +0000 (UTC) Original-Xref: news.stanford.edu gnu.emacs.help:176499 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:71569 Archived-At: Subj: "\\":Converting "dired-do-rename-regexp" into a "query-replace"? I need to turn this: (dired-do-rename-regexp "Lendman_1_\\([0-9][0-9]\\)\\([0-9][0-9]\\)\\([0-9][0-9]\\)_100000.mp3" "\\3\\1\\2-S.L.mp3") into: (query-replace-regexp "FROMPAT" "TO-STRING" nil (if (and transient-mark-mode mark-active) (region-beginning)) (if (and transient-mark-mode mark-active) (region-end))) (the dired one works fine; now I want to adjust the regexps, but test them in an ascii file, not as file-names in dired.) So, once I did that, how to convert it BACK into the dired-form>? Thanks! David