help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: how to make dired-do-rename more friendly?


From: Harry Putnam
Subject: Re: how to make dired-do-rename more friendly?
Date: Thu, 20 Nov 2003 12:06:19 -0600
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux)

Harry Putnam <reader@newsguy.com> writes:

>   (defadvice dired-mark-read-file-name (around tiad act)
>     "Instead of asking directory, offer full filename for editing.
>   This advice is enabled only upon request."
>     (if (and dir (string-match "/" dir))
>         (setq dir (dired-get-filename)))
>     ad-do-it)
>                  
>   (defadvice dired-do-rename  (around joc-tiad-dired-rename act)
>     "Offer editing the current filename.
>   Without this advice you don't get the old filename for editing.
>   Activates advice 'dired-mark-read-file-name 'my 'around during call."
>     (let* ((ADVICE 'dired-mark-read-file-name))
>       (ad-enable-advice ADVICE 'around 'tiad)
>       (ad-activate ADVICE)
>       ad-do-it
>       (ad-disable-advice ADVICE 'around 'tiad)
>       (ad-activate ADVICE)))

OOOPs a couple of ringers slipped in there.  These last two are
something else.

>   (require 'macro)
>   (put 'narrow-to-region 'disabled nil)






reply via email to

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