aboutsummaryrefslogtreecommitdiff
path: root/pearl.el
diff options
context:
space:
mode:
Diffstat (limited to 'pearl.el')
-rw-r--r--pearl.el14
1 files changed, 10 insertions, 4 deletions
diff --git a/pearl.el b/pearl.el
index 4f85961..3f0a4ae 100644
--- a/pearl.el
+++ b/pearl.el
@@ -4234,15 +4234,21 @@ has no heading."
(defun pearl--preamble-summary ()
"Compose the one-line preamble summary for the current Linear buffer.
-\"Pearl - <view> · <count> · <time>\", read from `#+LINEAR-SOURCE' (its name),
-`#+LINEAR-COUNT', and the time portion of `#+LINEAR-RUN-AT'. Missing fields are
-omitted. Leads with \"Pearl\" so the line doubles as the buffer's identity."
+\"Pearl - <account> - <view> · <count> · <time>\", read from `#+LINEAR-ACCOUNT'
+(the active workspace), `#+LINEAR-SOURCE' (its name), `#+LINEAR-COUNT', and the
+time portion of `#+LINEAR-RUN-AT'. Missing fields are omitted; a buffer with no
+`#+LINEAR-ACCOUNT' (legacy single-account mode) drops the account segment.
+Leads with \"Pearl\" so the line doubles as the buffer's identity, and names the
+account so two workspaces' buffers read differently at a glance."
(let* ((src (pearl--read-active-source))
(name (or (and src (plist-get src :name)) "Linear"))
+ (account (pearl--read-buffer-account))
(count (pearl--preamble-keyword "LINEAR-COUNT"))
(runat (pearl--preamble-keyword "LINEAR-RUN-AT"))
(time (and runat (car (last (split-string runat))))))
- (concat "Pearl - " name
+ (concat "Pearl - "
+ (and account (format "%s - " account))
+ name
(and count (format " · %s" count))
(and time (format " · %s" time)))))