]> git.eshelyaron.com Git - emacs.git/commitdiff
Org regexp style fixes
authorMattias Engdegård <mattiase@acm.org>
Wed, 30 Nov 2022 12:23:38 +0000 (13:23 +0100)
committerMattias Engdegård <mattiase@acm.org>
Wed, 30 Nov 2022 12:23:38 +0000 (13:23 +0100)
* 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
lisp/org/org-persist.el

index bc2fa0b9854c2fdec1590e246d64fc73532dd097..a290b4121fa3c767f8525f1ec0f2b4850985205c 100644 (file)
@@ -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
index 3435bef264fb431da26a614f9792584ec4431377..d60fdc657adb0f2ab0c08e9df0ae6864525a76b2 100644 (file)
@@ -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))))