unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* dired renaming files: replacing mutliple whitespaces with underscores
@ 2007-04-30 10:27 Patrick Drechsler
  2007-04-30 11:16 ` Thien-Thi Nguyen
  0 siblings, 1 reply; 3+ messages in thread
From: Patrick Drechsler @ 2007-04-30 10:27 UTC (permalink / raw)
  To: help-gnu-emacs

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?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: dired renaming files: replacing mutliple whitespaces with underscores
  2007-04-30 10:27 dired renaming files: replacing mutliple whitespaces with underscores Patrick Drechsler
@ 2007-04-30 11:16 ` Thien-Thi Nguyen
  2007-04-30 11:55   ` Patrick Drechsler
  0 siblings, 1 reply; 3+ messages in thread
From: Thien-Thi Nguyen @ 2007-04-30 11:16 UTC (permalink / raw)
  To: help-gnu-emacs

() Patrick Drechsler <patrick@pdrechsler.de>
() Mon, 30 Apr 2007 12:27:48 +0200

   better way [...] ?

perhaps wdired-mode (via command wdired-change-to-wdired-mode).

thi

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: dired renaming files: replacing mutliple whitespaces with underscores
  2007-04-30 11:16 ` Thien-Thi Nguyen
@ 2007-04-30 11:55   ` Patrick Drechsler
  0 siblings, 0 replies; 3+ messages in thread
From: Patrick Drechsler @ 2007-04-30 11:55 UTC (permalink / raw)
  To: help-gnu-emacs

Thien-Thi Nguyen <ttn@gnuvola.org> writes:

> () Patrick Drechsler <patrick@pdrechsler.de>
> () Mon, 30 Apr 2007 12:27:48 +0200
>
>    better way [...] ?
>
> perhaps wdired-mode (via command wdired-change-to-wdired-mode).

thanks a lot! This is a lot simpler than trying to find a regexp...

Cheers

Patrick
-- 
"It's called a shovel... I've seen gardeners use them. 
You stick the sharp end in the ground. Then it gets a bit technical."
Terry Pratchett, Reaper Man

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-04-30 11:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-30 10:27 dired renaming files: replacing mutliple whitespaces with underscores Patrick Drechsler
2007-04-30 11:16 ` Thien-Thi Nguyen
2007-04-30 11:55   ` Patrick Drechsler

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).