From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: kai.grossjohann@gmx.net (=?iso-8859-1?q?Kai_Gro=DFjohann?=) Newsgroups: gmane.emacs.devel Subject: Re: Bug in Ange-FTP with renaming files Date: Sun, 06 Jul 2003 17:10:47 +0200 Organization: University of Duisburg, Germany Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <84wuevlmh4.fsf@lucy.is.informatik.uni-duisburg.de> References: <84smpjsp77.fsf@lucy.is.informatik.uni-duisburg.de> <84n0frsobv.fsf@lucy.is.informatik.uni-duisburg.de> <84isqfsnz1.fsf@lucy.is.informatik.uni-duisburg.de> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1057504378 25174 80.91.224.249 (6 Jul 2003 15:12:58 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 6 Jul 2003 15:12:58 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Sun Jul 06 17:12:57 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19ZBCD-0006Xu-00 for ; Sun, 06 Jul 2003 17:12:57 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 19ZBLd-00052Z-00 for ; Sun, 06 Jul 2003 17:22:41 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19ZBCG-00038o-JU for emacs-devel@quimby.gnus.org; Sun, 06 Jul 2003 11:13:00 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19ZBBj-0002e8-FC for emacs-devel@gnu.org; Sun, 06 Jul 2003 11:12:27 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19ZBBK-0001sS-HD for emacs-devel@gnu.org; Sun, 06 Jul 2003 11:12:03 -0400 Original-Received: from main.gmane.org ([80.91.224.249]) by monty-python.gnu.org with esmtp (Exim 4.20) id 19ZBAP-0001Of-G1 for emacs-devel@gnu.org; Sun, 06 Jul 2003 11:11:05 -0400 Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 19ZB9h-0006R9-00 for ; Sun, 06 Jul 2003 17:10:21 +0200 Mail-Followup-To: emacs-devel@gnu.org X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Received: from news by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 19ZB9a-0006QW-00 for ; Sun, 06 Jul 2003 17:10:14 +0200 Original-Lines: 36 Original-X-Complaints-To: usenet@main.gmane.org Mail-Copies-To: never User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:xZkTeM2D8SWsEL2s6LucfFt61+o= X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:15419 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:15419 kai.grossjohann@gmx.net (Kai Großjohann) writes: > Shouldn't dired-rename-subdir be conditioned on either file or newname > being a directory? Or perhaps both? Or shouldn't dired-rename-subdir > take care to do the right thing with non-directories? I now tried this. I enabled the following patch. Now it is barfing in dired-add-entry :-/ I'm getting lost in a maze of twisty litte funcalls, all similar. --- dired-aux.el.~1.110.~ Sat Mar 22 19:23:45 2003 +++ dired-aux.el Sun Jul 6 17:02:01 2003 @@ -1020,6 +1020,7 @@ ;;;###autoload (defun dired-rename-file (file newname ok-if-already-exists) (dired-handle-overwrite newname) + (let ((is-dir (file-directory-p file))) (rename-file file newname ok-if-already-exists) ; error is caught in -create-files ;; Silently rename the visited file of any buffer visiting this file. (and (get-file-buffer file) @@ -1027,7 +1028,8 @@ (set-visited-file-name newname nil t))) (dired-remove-file file) ;; See if it's an inserted subdir, and rename that, too. - (dired-rename-subdir file newname)) + (when is-dir + (dired-rename-subdir file newname)))) (defun dired-rename-subdir (from-dir to-dir) (setq from-dir (file-name-as-directory from-dir) -- ~/.signature