Subject: bug#26528: closed (dired-do-chmod complains about . .. but works)

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 17 Apr 2017 06:45:02 +0000

Your bug report

#26528: dired-do-chmod complains about . .. but works

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
26528: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=26528
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: dired-do-chmod complains about . .. but works
From: Paul Eggert <[email-masked]>
To: 積丹尼 Dan Jacobson <[email-masked]>
Cc: [email-masked]
Date: Sun, 16 Apr 2017 23:44:42 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

Thanks, I installed a patch into master to fix this.

http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=47122295521c63febe9fc64680430812da3a3acf
From 05a989de24c39fd2c6e7e67eebd5db4864ad809e Mon Sep 17 00:00:00 2001
From: Paul Eggert <[email-masked]>
Date: Sun, 16 Apr 2017 23:36:26 -0700
Subject: [PATCH] =?UTF-8?q?dired=20=E2=80=98M=E2=80=99=20should=20not=20co?=
 =?UTF-8?q?mplain=20about=20=E2=80=98.=E2=80=99=20and=20=E2=80=98..?=
 =?UTF-8?q?=E2=80=99?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* lisp/dired-aux.el (dired-do-redisplay):
Allow redisplay of ‘.’ and ‘..’ (Bug#26528).
---
 lisp/dired-aux.el | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
index d7ca052..ec07f9b 100644
--- a/lisp/dired-aux.el
+++ b/lisp/dired-aux.el
@@ -1266,12 +1266,14 @@ dired-do-redisplay
     ;; message much faster than making dired-map-over-marks show progress
     (dired-uncache
      (if (consp dired-directory) (car dired-directory) dired-directory))
-    (dired-map-over-marks (let ((fname (dired-get-filename))
+    (dired-map-over-marks (let ((fname (dired-get-filename nil t))
 				;; Postpone readin hook till we map
 				;; over all marked files (Bug#6810).
 				(dired-after-readin-hook nil))
-			    (message "Redisplaying... %s" fname)
-			    (dired-update-file-line fname))
+			    (if (not fname)
+				(error "No file on this line")
+			      (message "Redisplaying... %s" fname)
+			      (dired-update-file-line fname)))
 			  arg)
     (run-hooks 'dired-after-readin-hook)
     (dired-move-to-filename)
-- 
2.7.4

Subject: dired-do-chmod complains about . .. but works
From: 積丹尼 Dan Jacobson <[email-masked]>
To: bug-gnu-emacs <[email-masked]>
Date: Sun, 16 Apr 2017 07:46:27 +0800
List-Id: <debbugs-submit.debbugs.gnu.org>

M runs the command dired-do-chmod
which complains
'dired-get-filename: Cannot operate on ‘.’ or ‘..’'
but thankfully works anyway.