unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Patrick Drechsler <patrick@pdrechsler.de>
To: help-gnu-emacs@gnu.org
Subject: dired renaming files: replacing mutliple whitespaces with underscores
Date: Mon, 30 Apr 2007 12:27:48 +0200	[thread overview]
Message-ID: <877irup36j.fsf@pdrechsler.de> (raw)

Hi,

could somebody point me in the right direction on replacing multiple
whitespaces in filenames with underscores using dired?

% m \(.*[ ].*\)+\..+ RET  ; mark all files with spaces
% R [ ] RET _ RET         ; replace space with underscore

The drawback is that one has to repeat this many times for file names
wich have multiple whitespaces.

Is there better way of doing this with dired (or dired-x, dired+)?

TIA

Patrick

BTW: I'm using Emacs23 from CVS.
-- 
Snoopy: My life has no purpose. My life has no direction, no aim, no
meaning. And yet I'm happy. I can't figure it out! What am I doing
right?

             reply	other threads:[~2007-04-30 10:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-30 10:27 Patrick Drechsler [this message]
2007-04-30 11:16 ` dired renaming files: replacing mutliple whitespaces with underscores Thien-Thi Nguyen
2007-04-30 11:55   ` Patrick Drechsler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877irup36j.fsf@pdrechsler.de \
    --to=patrick@pdrechsler.de \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).