Subject: bug#24897: 24.5; doc for `M' in Dired

From: Stefan Kangas <[email-masked]>
Date: Mon, 14 Oct 2019 00:37:57 +0200

Eli Zaretskii <[email-masked]> writes:

> On GNU/Linux, 'chmod' is documented in the Coreutils Info manual, and
> the GNU Coding Standards generally prefer Info to man pages.  So I'd
> suggest to point to the Coreutils manual first, and to the man page
> only as fallback.

Yes, good thinking.  But I pointed to the "File permissions" section
instead, which seemed more to the point.

> Actually, here's a more useful text:
>
>   Note that on MS-Windows only the `w' (write) bit is meaningful:
>   resetting it makes the file read-only.  Changing any other bit
>   has no effect on MS-Windows.

Thanks.  I'm pretty ignorant about MS-Windows so that definitely helps.

How about the attached?

Best regards,
Stefan Kangas
From 6ff8d2e525dc2b948059033d7901288f0921d576 Mon Sep 17 00:00:00 2001
From: Stefan Kangas <[email-masked]>
Date: Fri, 11 Oct 2019 16:37:44 +0200
Subject: [PATCH] Improve documentation of dired-do-chmod

* lisp/dired-aux.el (dired-do-chmod): Doc fix.  The part about
MS-Windows was written by Eli Zaretskii.  (Bug#24897)
---
 lisp/dired-aux.el | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
index bfc37c5cde..8bda25e9e3 100644
--- a/lisp/dired-aux.el
+++ b/lisp/dired-aux.el
@@ -365,9 +365,17 @@ dired-do-chxxx
 ;;;###autoload
 (defun dired-do-chmod (&optional arg)
   "Change the mode of the marked (or next ARG) files.
-Symbolic modes like `g+w' are allowed.
-Type M-n to pull the file attributes of the file at point
-into the minibuffer."
+Both octal numeric modes like `644' and symbolic modes like `g+w'
+are supported.  Type M-n to pull the file attributes of the file
+at point into the minibuffer.
+
+See Info node `(coreutils)File permissions' for more information.
+Alternatively, see the man page for \"chmod\", using the command
+\\[man] in Emacs.
+
+Note that on MS-Windows only the `w' (write) bit is meaningful:
+resetting it makes the file read-only.  Changing any other bit
+has no effect on MS-Windows."
   (interactive "P")
   (let* ((files (dired-get-marked-files t arg nil nil t))
 	 ;; The source of default file attributes is the file at point.
-- 
2.20.1