From 64a9c53b49a11f86e0e3fda85264bb3e0d91b8c0 Mon Sep 17 00:00:00 2001
From: Derek Chen-Becker <oss@chen-becker.org>
Date: Thu, 4 Dec 2025 06:54:47 -0700
Subject: [PATCH] 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 d0b349487..809e9dd32 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 bb283f61f..3ed20fa01 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
-- 
2.43.0

