diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2017-10-01 19:02:47 +0200 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2017-10-01 19:02:47 +0200 |
commit | 428368af2f4f461b68250bac74f28b8d52867ea5 (patch) | |
tree | 21bd116fa38b0850d0bc27d2fc93b8fe110e42fe | |
parent | 7f2b2557fec0c4e19dce6ff2c571c16b6a07215c (diff) | |
parent | 018fb0149d0171a9a6e18a148d3850742d380de8 (diff) | |
download | org-mode-428368af2f4f461b68250bac74f28b8d52867ea5.tar.gz |
Merge branch 'maint'
-rw-r--r-- | lisp/org.el | 4 | ||||
-rw-r--r-- | testing/lisp/test-org.el | 13 |
2 files changed, 16 insertions, 1 deletions
diff --git a/lisp/org.el b/lisp/org.el index 1ffea80..dac68db 100644 --- a/lisp/org.el +++ b/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) diff --git a/testing/lisp/test-org.el b/testing/lisp/test-org.el index c3e7aa2..065d31f 100644 --- a/testing/lisp/test-org.el +++ b/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 () |