From d03d5582197def92ad72e113815a3c4836da1330 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sun, 24 May 2026 16:43:00 -0500 Subject: feat: render issue headings with the identifier prefix and title case I added two display-only heading tweaks, each a defcustom defaulting on. pearl-show-identifier-in-heading prefixes the title with the Linear identifier (** TODO [#B] SE-401: Fix the Bug). pearl-title-case-headings renders the title in smart title case, keeping minor words lowercase unless first or last and leaving words that already carry an uppercase letter (acronyms, identifiers) untouched. Both stay display-only. The LINEAR-TITLE-SHA256 hash covers the rendered (cased, un-prefixed) title, and the title-sync reader strips the identifier prefix before hashing, so an unedited heading is a no-op and neither the casing nor the prefix ever pushes to Linear. A render-then-read round-trip test locks that invariant. --- tests/test-pearl-org-write.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/test-pearl-org-write.el') diff --git a/tests/test-pearl-org-write.el b/tests/test-pearl-org-write.el index bd06ef0..6491b54 100644 --- a/tests/test-pearl-org-write.el +++ b/tests/test-pearl-org-write.el @@ -55,7 +55,7 @@ The state mapping is bound so rendering is deterministic." (let ((content (with-temp-buffer (insert-file-contents tmp) (buffer-string)))) (should (string-match-p "#\\+title: Linear" content)) (should (string-match-p "#\\+LINEAR-SOURCE: " content)) - (should (string-match-p "\\*\\* TODO \\[#C\\] T" content))))) + (should (string-match-p "\\*\\* TODO \\[#C\\] ENG-1: T" content))))) (ert-deftest test-pearl-update-org-clean-buffer-replaces-contents () "A clean visiting buffer is replaced in place and saved." @@ -67,7 +67,7 @@ The state mapping is bound so rendering is deterministic." (pearl--update-org-from-issues test-pearl--sample-issues) (with-current-buffer buf (should-not (buffer-modified-p)) - (should (string-match-p "\\*\\* TODO \\[#C\\] T" (buffer-string))) + (should (string-match-p "\\*\\* TODO \\[#C\\] ENG-1: T" (buffer-string))) (should-not (string-match-p "old content" (buffer-string))))))) (ert-deftest test-pearl-update-org-dirty-buffer-not-overwritten () -- cgit v1.2.3