From cd8017e68f261ab5b3fdf1107f99c1231cc1eec5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20Engdeg=C3=A5rd?= Date: Wed, 16 Aug 2023 14:57:48 +0200 Subject: [PATCH] Backport commit 1ad318cf2 from Emacs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * lisp/ob-tangle.el (org-babel-interpret-file-mode): Repair parts of regexp that should only match +, - and =. ob-tangle.el: fix unintended range in regexp 1ad318cf2ae22d945f8bfcd61981d619467a36da Mattias EngdegÄrd Wed Aug 16 16:55:38 2023 +0200 --- lisp/ob-tangle.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/ob-tangle.el b/lisp/ob-tangle.el index 1be97ba55..13c928df3 100644 --- a/lisp/ob-tangle.el +++ b/lisp/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)