From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: jari.aalto@poboxes.com (Jari Aalto+mail.emacs) Newsgroups: gmane.emacs.help Subject: Re: how to make dired-do-rename more friendly? Date: Sun, 25 Jan 2004 21:17:21 +0200 Organization: Private Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1075058303 4248 80.91.224.253 (25 Jan 2004 19:18:23 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 25 Jan 2004 19:18:23 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jan 25 20:18:20 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Akpm0-0005ZS-00 for ; Sun, 25 Jan 2004 20:18:20 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1Akpjs-0004Ed-0D for geh-help-gnu-emacs@m.gmane.org; Sun, 25 Jan 2004 14:16:08 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!news-FFM2.ecrc.net!uio.no!newsfeed.kolumbus.fi!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 36 Original-NNTP-Posting-Host: a110t7.elisa.omakaista.fi Original-X-Trace: phys-news1.kolumbus.fi 1075057556 3161 81.197.3.110 (25 Jan 2004 19:05:56 GMT) Original-X-Complaints-To: abuse@kolumbus.fi Original-NNTP-Posting-Date: Sun, 25 Jan 2004 19:05:56 +0000 (UTC) User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/20.7 (windows-nt) (i386-*-nt5.0.2195) Cancel-Lock: sha1:+djI4Vj0YIILwFlCgnMlPqUkb38= Original-Xref: shelby.stanford.edu gnu.emacs.help:120400 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:16345 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:16345 * Thu 2003-11-20 Harry Putnam gnu.emacs.help * | "leo" writes: | | I picked this code up in this group long ago... no longer remember | its author. But it does what you describe. I use it all the time. | | WARNING: Being one of the lisp impaired... I'm not sure what all this | does USE AT YOUR OWN RISK. | | (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))) :-) This code is from advice collection library (tinyadvice.el) For more information http://tiny-tools.sourceforge.net/ Jari