diff options
| -rw-r--r-- | pearl.el | 5 | ||||
| -rw-r--r-- | tests/test-pearl-output.el | 6 |
2 files changed, 11 insertions, 0 deletions
@@ -4006,6 +4006,11 @@ no side effects." ;; so the buffer always opens unfolded down to the issue headings. (insert (format "#+STARTUP: show%dlevels\n" (if groups 3 2))) (insert (format "#+TODO: %s\n" (pearl--derive-todo-line states))) + ;; Pin the priority range to Linear's five-point scale (A=Urgent .. D=Low; + ;; no cookie = None). Bounds org cookie cycling (C-c , / S-up) to A-D + ;; per-file, so Low (D) is reachable even when the user's global + ;; `org-priority-lowest' stops at C. Highest A, lowest D, default D. + (insert "#+PRIORITIES: A D D\n") ;; Source-tracking metadata: the serialized source drives refresh; the ;; rest is human-readable provenance. (when account diff --git a/tests/test-pearl-output.el b/tests/test-pearl-output.el index f02df5f..55f7886 100644 --- a/tests/test-pearl-output.el +++ b/tests/test-pearl-output.el @@ -56,6 +56,12 @@ (should (string-match-p "^\\* Pearl Help$" out)) (should-not (string-match-p "^# " out)))) +(ert-deftest test-pearl-build-org-content-emits-priorities-range () + "The header pins the priority range to Linear's A-D (highest A, lowest D) so +cookie cycling reaches Low regardless of the user's global `org-priority-lowest'." + (let ((out (pearl--build-org-content '() '(:type filter :name "X" :filter nil)))) + (should (string-match-p "^#\\+PRIORITIES: A D D$" out)))) + (ert-deftest test-pearl-build-org-content-source-roundtrips () "The serialized source in the header reads back to the original plist." (let* ((source '(:type filter :name "Bugs" :filter (:labels ("bug") :open t))) |
