From c3466099c5f44c52ec73a1bbbb2b42de6f29ac7f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mattias=20Engdeg=C3=A5rd?= Date: Wed, 30 Nov 2022 13:23:38 +0100 Subject: [PATCH] Org regexp style fixes * lisp/org/org-element.el (org-element--get-node-properties): Escape literal `+`. * lisp/org/org-persist.el (org-persist-load:index): Replace line-start with string-start when the latter is meant. --- lisp/org/org-element.el | 2 +- lisp/org/org-persist.el | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/org/org-element.el b/lisp/org/org-element.el index bc2fa0b9854..a290b4121fa 100644 --- a/lisp/org/org-element.el +++ b/lisp/org/org-element.el @@ -1040,7 +1040,7 @@ parse properties for property drawer at point." (property-value (match-string-no-properties 3))) (cond ((and (plist-member properties property-name-symbol) - (string-match-p "+$" property-name)) + (string-match-p "\\+$" property-name)) (let ((val (plist-get properties property-name-symbol))) (if (listp val) (setq properties diff --git a/lisp/org/org-persist.el b/lisp/org/org-persist.el index 3435bef264f..d60fdc657ad 100644 --- a/lisp/org/org-persist.el +++ b/lisp/org/org-persist.el @@ -593,7 +593,8 @@ COLLECTION is the plist holding data collection." (mapc (lambda (collection) (org-persist--add-to-index collection 'hash)) org-persist--index) (setq org-persist--index nil) (when (file-exists-p org-persist-directory) - (dolist (file (directory-files org-persist-directory 'absolute "^[^.][^.]")) + (dolist (file (directory-files org-persist-directory 'absolute + "\\`[^.][^.]")) (if (file-directory-p file) (delete-directory file t) (delete-file file)))) -- 2.39.2