From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Harry Putnam Newsgroups: gmane.emacs.help Subject: Re: how to make dired-do-rename more friendly? Date: Thu, 20 Nov 2003 12:06:19 -0600 Organization: Still searching... 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 1069352531 32122 80.91.224.253 (20 Nov 2003 18:22:11 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 20 Nov 2003 18:22:11 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Nov 20 19:22:07 2003 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 1AMtRO-0003wD-00 for ; Thu, 20 Nov 2003 19:22:07 +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 1AMuNv-0006Ur-S1 for geh-help-gnu-emacs@m.gmane.org; Thu, 20 Nov 2003 14:22:35 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AMuMt-0005wn-KO for help-gnu-emacs@gnu.org; Thu, 20 Nov 2003 14:21:31 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AMuGl-0002h5-Lt for help-gnu-emacs@gnu.org; Thu, 20 Nov 2003 14:15:42 -0500 Original-Received: from [80.91.224.249] (helo=main.gmane.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AMu9d-0000Fn-EW for help-gnu-emacs@gnu.org; Thu, 20 Nov 2003 14:07:49 -0500 Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1AMtCB-0000Nk-00 for ; Thu, 20 Nov 2003 19:06:23 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-To: help-gnu-emacs@gnu.org Original-Received: from sea.gmane.org ([80.91.224.252]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AMtC8-0000Nc-00 for ; Thu, 20 Nov 2003 19:06:20 +0100 Original-Received: from news by sea.gmane.org with local (Exim 3.35 #1 (Debian)) id 1AMtC8-0007jP-00 for ; Thu, 20 Nov 2003 19:06:20 +0100 Original-Lines: 26 Original-X-Complaints-To: usenet@sea.gmane.org User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:RA7U2ula16mWFE2ruPICYJBSnGI= 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:14435 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:14435 Harry Putnam 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)