Browse Source

Merge branch 'maint'

Nicolas Goaziou 7 năm trước cách đây
mục cha
commit
428368af2f
2 tập tin đã thay đổi với 16 bổ sung1 xóa
  1. 3 1
      lisp/org.el
  2. 13 0
      testing/lisp/test-org.el

+ 3 - 1
lisp/org.el

@@ -16051,7 +16051,9 @@ COLUMN formats in the current buffer."
 	   (when (memq (org-element-type element) '(keyword node-property))
 	     (let ((value (org-element-property :value element))
 		   (start 0))
-	       (while (string-match "%[0-9]*\\(\\S-+\\)" value start)
+	       (while (string-match "%[0-9]*\\([[:alnum:]_-]+\\)\\(([^)]+)\\)?\
+\\(?:{[^}]+}\\)?"
+				    value start)
 		 (setq start (match-end 0))
 		 (let ((p (match-string-no-properties 1 value)))
 		   (unless (member-ignore-case p org-special-properties)

+ 13 - 0
testing/lisp/test-org.el

@@ -4916,6 +4916,19 @@ Paragraph<point>"
    (equal '("A" "B" "COLUMNS")
 	  (org-test-with-temp-text
 	      "* H\n:PROPERTIES:\n:COLUMNS: %25ITEM %A %20B\n:END:"
+	    (org-buffer-property-keys nil nil t))))
+  ;; In COLUMNS, ignore label title and summary-type.
+  (should
+   (equal '("A")
+	  (org-test-with-temp-text "#+COLUMNS: %A(Foo)"
+	    (org-buffer-property-keys nil nil t))))
+  (should
+   (equal '("A")
+	  (org-test-with-temp-text "#+COLUMNS: %A{Foo}"
+	    (org-buffer-property-keys nil nil t))))
+  (should
+   (equal '("A")
+	  (org-test-with-temp-text "#+COLUMNS: %A(Foo){Bar}"
 	    (org-buffer-property-keys nil nil t)))))
 
 (ert-deftest test-org/property-values ()