emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: wdired.el 1.7 --- Rename files editing their names in dired buffers


From: Miles Bader
Subject: Re: wdired.el 1.7 --- Rename files editing their names in dired buffers
Date: 07 Nov 2001 17:09:26 +0900

Juan Leon Lahoz Garcia <address@hidden> writes:
> Maybe a option could be to add certain property to the beginning of
> each file with a filename in it.

Or just put a property with the old filename covering each filename.

  e.g., (put-text-property FN-START FN-END 'old-file-name OLD-FILE-NAME)

Since new insertions etc., will inherit this property (you'll have to
fiddle to get the edges working correctly), these properties should
remain as contiguous regions when the user is done editing, and finding
them should be a snap:

  (let (beg end)
    (setq end (point-min))
    (while (setq beg (next-single-property-change end 'old-file-name))
      (setq end (next-single-property-change pos 'old-file-name))
      (rename-file (get-text-property beg 'old-file-name)
                   (buffer-substring-no-properties beg end))))

-Miles
-- 
Occam's razor split hairs so well, I bought the whole argument!



reply via email to

[Prev in Thread] Current Thread [Next in Thread]