branch: externals/org
commit 9d128ebbc88978f65095d47361b4ec71b91d340d
Author: Derek Chen-Becker <[email protected]>
Commit: Ihor Radchenko <[email protected]>
lisp/org.el: Fix numeric priority format in column view
lisp/org.el (org-entry-properties): Replace incorrect usage of
`char-to-string' with the new `org-priority-to-string' so that numeric
property values are formatted correctly.
testing/lisp/test-org-colview.el: Add a new test case to the
`test-org-colview/priorities' test to exercise formatting of numeric
property values in column view.
---
lisp/org.el | 2 +-
testing/lisp/test-org-colview.el | 11 ++++++++++-
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/lisp/org.el b/lisp/org.el
index d0b349487a..809e9dd328 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -13145,7 +13145,7 @@ strings."
(push (cons "PRIORITY"
(if (looking-at org-priority-regexp)
(match-string-no-properties 2)
- (char-to-string org-priority-default)))
+ (org-priority-to-string org-priority-default)))
props)
(when specific (throw 'exit props)))
(when (or (not specific) (string= specific "FILE"))
diff --git a/testing/lisp/test-org-colview.el b/testing/lisp/test-org-colview.el
index bb283f61f6..3ed20fa018 100644
--- a/testing/lisp/test-org-colview.el
+++ b/testing/lisp/test-org-colview.el
@@ -1808,7 +1808,16 @@ there are 4 parameters
"* [#15] Test"
(let ((org-columns-default-format "%PRIORITY"))
(org-columns)
- (get-char-property (point) 'org-columns-value))))) )
+ (get-char-property (point) 'org-columns-value)))))
+ ;; test default numeric priority
+ (should
+ (equal "15"
+ (org-test-with-temp-text
+ "* Test"
+ (let ((org-columns-default-format "%PRIORITY")
+ (org-default-priority 15))
+ (org-columns)
+ (get-char-property (point) 'org-columns-value))))))
(provide 'test-org-colview)
;;; test-org-colview.el ends here