Merge branch 'maint'

This commit is contained in:
Nicolas Goaziou 2017-10-01 19:02:47 +02:00
commit 428368af2f
2 changed files with 16 additions and 1 deletions

View File

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

View File

@ -4916,6 +4916,19 @@ Paragraph<point>"
(equal '("A" "B" "COLUMNS") (equal '("A" "B" "COLUMNS")
(org-test-with-temp-text (org-test-with-temp-text
"* H\n:PROPERTIES:\n:COLUMNS: %25ITEM %A %20B\n:END:" "* 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))))) (org-buffer-property-keys nil nil t)))))
(ert-deftest test-org/property-values () (ert-deftest test-org/property-values ()