aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias EngdegÄrd2023-08-16 14:57:48 +0200
committerMattias EngdegÄrd2023-08-16 16:55:38 +0200
commit1ad318cf2ae22d945f8bfcd61981d619467a36da (patch)
treea623b80ae3914fea920aed7e332f2095ca3fde2b
parentca687839294b78800339b99b19a61cf098638dd8 (diff)
downloademacs-1ad318cf2ae22d945f8bfcd61981d619467a36da.tar.gz
emacs-1ad318cf2ae22d945f8bfcd61981d619467a36da.zip
ob-tangle.el: fix unintended range in regexp
* lisp/org/ob-tangle.el (org-babel-interpret-file-mode): Repair parts of regexp that should only match +, - and =. * lisp/files.el (file-modes-symbolic-to-number): Fix the same error in a doc string; this seems to be where the mistake originated.
-rw-r--r--lisp/files.el2
-rw-r--r--lisp/org/ob-tangle.el2
2 files changed, 2 insertions, 2 deletions
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."
8553(defun file-modes-symbolic-to-number (modes &optional from) 8553(defun file-modes-symbolic-to-number (modes &optional from)
8554 "Convert symbolic file modes to numeric file modes. 8554 "Convert symbolic file modes to numeric file modes.
8555MODES is the string to convert, it should match 8555MODES is the string to convert, it should match
8556\"[ugoa]*([+-=][rwxXstugo]*)+,...\". 8556\"[ugoa]*([+=-][rwxXstugo]*)+,...\".
8557See Info node `(coreutils)File permissions' for more information on this 8557See Info node `(coreutils)File permissions' for more information on this
8558notation. 8558notation.
8559FROM (or 0 if nil) gives the mode bits on which to base permissions if 8559FROM (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)))
357 (error "File mode %S not recognized as a valid format." mode)) 357 (error "File mode %S not recognized as a valid format." mode))
358 ((string-match-p "^o0?[0-7][0-7][0-7]$" mode) 358 ((string-match-p "^o0?[0-7][0-7][0-7]$" mode)
359 (string-to-number (replace-regexp-in-string "^o" "" mode) 8)) 359 (string-to-number (replace-regexp-in-string "^o" "" mode) 8))
360 ((string-match-p "^[ugoa]*\\(?:[+-=][rwxXstugo]*\\)+\\(,[ugoa]*\\(?:[+-=][rwxXstugo]*\\)+\\)*$" mode) 360 ((string-match-p "^[ugoa]*\\(?:[+=-][rwxXstugo]*\\)+\\(,[ugoa]*\\(?:[+=-][rwxXstugo]*\\)+\\)*$" mode)
361 ;; Match regexp taken from `file-modes-symbolic-to-number'. 361 ;; Match regexp taken from `file-modes-symbolic-to-number'.
362 (file-modes-symbolic-to-number mode org-babel-tangle-default-file-mode)) 362 (file-modes-symbolic-to-number mode org-babel-tangle-default-file-mode))
363 ((string-match-p "^[r-][w-][xs-][r-][w-][xs-][r-][w-][x-]$" mode) 363 ((string-match-p "^[r-][w-][xs-][r-][w-][xs-][r-][w-][x-]$" mode)