GNU bug report logs - #12725
dired-do-shell-command should allow . and ..

Previous Next

Package: emacs;

Reported by: Hemal Pandya <hemal.pandya <at> gmail.com>

Date: Wed, 24 Oct 2012 21:27:02 UTC

Severity: minor

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


Message #10 received at 12725-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Hemal Pandya <hemal.pandya <at> gmail.com>
Cc: 12725-done <at> debbugs.gnu.org
Subject: Re: bug#12725: dired-do-shell-command should allow . and ..
Date: Thu, 25 Oct 2012 09:02:15 -0400
> In dired buffer, hitting `!' on current directory (`.') or parent
> directory (`..') results in the error
>    dired-get-filename: Cannot operate on `.' or `..'
> There is no reason this should not be allowed. Please allow running
> commands on these two.

I've installed the patch below which seems to fix your problem,
thank you for bringing it up here,


        Stefan


=== modified file 'lisp/dired.el'
--- lisp/dired.el	2012-10-24 14:38:49 +0000
+++ lisp/dired.el	2012-10-25 12:59:39 +0000
@@ -620,7 +620,7 @@
   (let* ((all-of-them
 	  (save-excursion
 	    (dired-map-over-marks
-	     (dired-get-filename localp)
+	     (dired-get-filename localp 'no-error-if-not-filep)
 	     arg nil distinguish-one-marked)))
 	 result)
     (if (not filter)





This bug report was last modified 12 years and 234 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.