aboutsummaryrefslogtreecommitdiff
path: root/pearl.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-27 15:21:45 -0500
committerCraig Jennings <c@cjennings.net>2026-05-27 15:21:45 -0500
commita2a155c785cdf43c971b88db174c33ac1e867da3 (patch)
treeeb37a4fe1c4f0146a5791bc0c6948e1e5129231f /pearl.el
parentcfc42c41426d61f53c49b1f192751bcd061e57ae (diff)
downloadpearl-a2a155c785cdf43c971b88db174c33ac1e867da3.tar.gz
pearl-a2a155c785cdf43c971b88db174c33ac1e867da3.zip
feat(render): render issue titles and the view name verbatim
The buffer should mirror Linear: a value on the page appears exactly as Linear stores it, so the heading title matches what you'd see opening the issue in Linear itself. I flipped pearl-title-case-headings to default nil so titles render verbatim. I also stopped running the view name in the #+title through the title-caser, which was coupled to the same flag. The smart-title-case path stays as opt-in tidying for anyone who wants it. Two transformations remain, both forced by Org's syntax rather than chosen: state names become TODO keywords (Org keywords can't contain spaces, so the real name stays in the LINEAR-STATE-NAME drawer), and descriptions and comments convert between Markdown and Org. Documented under "Fidelity to Linear" in the README.
Diffstat (limited to 'pearl.el')
-rw-r--r--pearl.el23
1 files changed, 13 insertions, 10 deletions
diff --git a/pearl.el b/pearl.el
index 5dd55a7..c1492fc 100644
--- a/pearl.el
+++ b/pearl.el
@@ -169,15 +169,17 @@ leave the buffer expanded after updates."
:type 'boolean
:group 'pearl)
-(defcustom pearl-title-case-headings t
+(defcustom pearl-title-case-headings nil
"When non-nil, render issue titles in the heading in smart title case.
-Linear stores titles however they were typed (often sentence case); this
-capitalizes each word for a tidier outline, keeping minor words (articles,
-short conjunctions and prepositions) lowercase unless they are first or last,
-and leaving words that already contain an uppercase letter (acronyms like API,
-identifiers, camelCase) untouched. Display-only: the title's provenance hash
-is taken over the rendered form, so an unedited title is still a no-op on sync
-and is never rewritten on Linear. Set to nil to render titles verbatim."
+The default is nil: titles render verbatim, exactly as Linear stores them, so
+the buffer mirrors what you would see opening the issue in Linear itself.
+Set this to t for opt-in tidying — it capitalizes each word for a neater
+outline, keeping minor words (articles, short conjunctions and prepositions)
+lowercase unless they are first or last, and leaving words that already
+contain an uppercase letter (acronyms like API, identifiers, camelCase)
+untouched. Display-only either way: the title's provenance hash is taken over
+the rendered form, so an unedited title is still a no-op on sync and is never
+rewritten on Linear."
:type 'boolean
:group 'pearl)
@@ -2844,8 +2846,9 @@ yields the hardcoded default. Pure function, no side effects."
(name (pearl--source-name src))
(filter (plist-get src :filter)))
(with-temp-buffer
- (insert (format "#+title: Linear — %s\n"
- (if pearl-title-case-headings (pearl--title-case name) name)))
+ ;; The view name renders verbatim, matching Linear's own capitalization;
+ ;; `pearl-title-case-headings' governs issue headings only.
+ (insert (format "#+title: Linear — %s\n" name))
(insert "#+STARTUP: show3levels\n")
(insert (format "#+TODO: %s\n" (pearl--derive-todo-line states)))
;; Source-tracking metadata: the serialized source drives refresh; the