GNU bug report logs - #61708
28.2; file-modes-symbolic-to-number inconsistency

Previous Next

Package: emacs;

Reported by: Thierry Volpiatto <thievol <at> posteo.net>

Date: Wed, 22 Feb 2023 13:59:02 UTC

Severity: normal

Found in version 28.2

Full log


View this message in rfc822 format

From: Andreas Schwab <schwab <at> suse.de>
To: Gregory Heytings <gregory <at> heytings.org>
Cc: Thierry Volpiatto <thievol <at> posteo.net>, 61708 <at> debbugs.gnu.org
Subject: bug#61708: 28.2; file-modes-symbolic-to-number inconsistency
Date: Thu, 23 Feb 2023 10:18:07 +0100
On Feb 22 2023, Gregory Heytings wrote:

> (defun symbolic-mode-to-number (mode)
>   (string-to-number
>    (replace-regexp-in-string
>     "[^0]" "1"
>     (string-replace "-" "0" mode))
>    2))

Apart from being misnamed, it doesn't handle tTsS.

-- 
Andreas Schwab, SUSE Labs, schwab <at> suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."




This bug report was last modified 2 years and 116 days ago.

Previous Next


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