unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Thierry Volpiatto <thievol@posteo.net>
To: 61708@debbugs.gnu.org
Subject: bug#61708: 28.2; file-modes-symbolic-to-number inconsistency
Date: Wed, 22 Feb 2023 14:16:53 +0000	[thread overview]
Message-ID: <874jrd2372.fsf@posteo.net> (raw)
In-Reply-To: <878rgp244x.fsf@posteo.net>

[-- Attachment #1: Type: text/plain, Size: 826 bytes --]


Here a simple patch to summarize what's wrong:

diff --git a/lisp/files.el b/lisp/files.el
index 5b989902bc3..576eb22c49f 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -8363,6 +8363,7 @@ If CHAR is in [Xugo], the value is taken from FROM (or 0 if omitted)."
   (cond ((eq char ?r) #o0444)
 	((eq char ?w) #o0222)
 	((eq char ?x) #o0111)
+        ((eq char ?-) #o0000)
 	((eq char ?s) #o6000)
 	((eq char ?t) #o1000)
 	;; Rights relative to the previous file modes.
@@ -8393,7 +8394,7 @@ as in \"og+rX-w\"."
       (let ((num-right 0)
 	    char-right)
 	(while (memq (setq char-right (pop list-rights))
-		     '(?r ?w ?x ?X ?s ?t ?u ?g ?o))
+		     '(?r ?w ?x ?X ?s ?t ?u ?g ?o ?-))
 	  (setq num-right
 		(logior num-right
 			(file-modes-char-to-right char-right num-rights))))

-- 
Thierry

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 686 bytes --]

  reply	other threads:[~2023-02-22 14:16 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-22 13:49 bug#61708: 28.2; file-modes-symbolic-to-number inconsistency Thierry Volpiatto
2023-02-22 14:16 ` Thierry Volpiatto [this message]
2023-02-22 14:26 ` Andreas Schwab
2023-02-22 14:58   ` Thierry Volpiatto
2023-02-22 15:45     ` Andreas Schwab
2023-02-22 17:03       ` Thierry Volpiatto
2023-02-22 17:11         ` Gregory Heytings
2023-02-22 17:44           ` Thierry Volpiatto
2023-02-22 21:40             ` Gregory Heytings
2023-02-23  4:44               ` Thierry Volpiatto
2023-02-23  6:08               ` Eli Zaretskii
2023-02-23  7:00                 ` Thierry Volpiatto
2023-02-23  9:18               ` Andreas Schwab
2023-02-23  9:27                 ` Gregory Heytings
2023-02-23  9:14         ` Andreas Schwab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874jrd2372.fsf@posteo.net \
    --to=thievol@posteo.net \
    --cc=61708@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).