diff --git a/lisp/files.el b/lisp/files.el index 03675a34f3a..68c0a10792d 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -8553,7 +8553,7 @@ the leading `-' character." (defun file-modes-symbolic-to-number (modes &optional from) "Convert symbolic file modes to numeric file modes. MODES is the string to convert, it should match -\"[ugoa]*([+-=][rwxXstugo]*)+,...\". +\"[ugoa]*([+=-][rwxXstugo]*)+,...\". See Info node `(coreutils)File permissions' for more information on this notation. FROM (or 0 if nil) gives the mode bits on which to base permissions if diff --git a/lisp/org/ob-tangle.el b/lisp/org/ob-tangle.el index 0b816a7c13c..a833037ca2b 100644 --- a/lisp/org/ob-tangle.el +++ b/lisp/org/ob-tangle.el @@ -357,7 +357,7 @@ Did you give the decimal value %1$d by mistake?" mode))) (error "File mode %S not recognized as a valid format." mode)) ((string-match-p "^o0?[0-7][0-7][0-7]$" mode) (string-to-number (replace-regexp-in-string "^o" "" mode) 8)) - ((string-match-p "^[ugoa]*\\(?:[+-=][rwxXstugo]*\\)+\\(,[ugoa]*\\(?:[+-=][rwxXstugo]*\\)+\\)*$" mode) + ((string-match-p "^[ugoa]*\\(?:[+=-][rwxXstugo]*\\)+\\(,[ugoa]*\\(?:[+=-][rwxXstugo]*\\)+\\)*$" mode) ;; Match regexp taken from `file-modes-symbolic-to-number'. (file-modes-symbolic-to-number mode org-babel-tangle-default-file-mode)) ((string-match-p "^[r-][w-][xs-][r-][w-][xs-][r-][w-][x-]$" mode)