aboutsummaryrefslogtreecommitdiff
path: root/pearl.el
diff options
context:
space:
mode:
Diffstat (limited to 'pearl.el')
-rw-r--r--pearl.el27
1 files changed, 14 insertions, 13 deletions
diff --git a/pearl.el b/pearl.el
index a8192b9..00271f9 100644
--- a/pearl.el
+++ b/pearl.el
@@ -982,7 +982,7 @@ is the already-extracted (normalized) list, so this stays pure."
(defcustom pearl-fetch-comments-in-list t
"When non-nil, the bulk list and Custom View fetch each issue's recent comments.
A populated list then renders the latest few comments per issue with a
-`💬 shown/total' marker on the Comments heading, instead of looking like
+`shown/total' marker on the Comments heading, instead of looking like
nothing has comments. Set to nil to keep the list fetch light (comments load
only on a single-issue refresh)."
:type 'boolean
@@ -998,7 +998,7 @@ list/view view. See `pearl-fetch-comments-in-list'."
(defcustom pearl-list-comments-count-cap 25
"Ceiling for the exact comment total shown in the bulk list marker.
The fetch pulls one more than this so the marker can show an exact total up to
-the cap (`💬 5/18') and a `+' beyond it (`💬 5/25+'). A higher cap means an
+the cap (`5/18') and a `+' beyond it (`5/25+'). A higher cap means an
exact count for busier issues at the cost of a larger fetch."
:type 'integer
:group 'pearl)
@@ -2002,8 +2002,8 @@ A null author renders as `(unknown)'."
(defun pearl--comment-count-marker (count-info)
"Render COUNT-INFO as a ` shown/total[+]' suffix, or the empty string.
COUNT-INFO is a plist (:shown N :total M :overflow BOOL) set on the bulk-list
-path; nil (the single-issue thread) yields no marker. The 💬 glyph leads the
-`Comments' heading itself (see `pearl--format-comments'), not this count."
+path; nil (the single-issue thread) yields no marker. The marker appends
+to the `Comments' heading written by `pearl--format-comments'."
(if count-info
(format " %d/%d%s"
(plist-get count-info :shown)
@@ -2025,9 +2025,8 @@ newest, like an email thread, and a new comment appends at the bottom."
Comments render under a level-3 `Comments' heading, ordered per
`pearl-comment-sort-order'.
Returns the empty string when COMMENTS is nil, so an issue with no comments
-renders no subtree. The heading leads with a 💬 glyph; COUNT-INFO, when non-nil,
-appends a ` shown/total' count (the bulk list passes the issue's
-`:comment-count')."
+renders no subtree. COUNT-INFO, when non-nil, appends a ` shown/total'
+count to the heading (the bulk list passes the issue's `:comment-count')."
(if (null comments)
""
(let* ((newest-first (eq pearl-comment-sort-order 'newest-first))
@@ -2036,7 +2035,7 @@ appends a ` shown/total' count (the bulk list passes the issue's
(let ((ca (or (plist-get a :created-at) ""))
(cb (or (plist-get b :created-at) "")))
(if newest-first (string> ca cb) (string< ca cb)))))))
- (concat "*** 💬 Comments" (pearl--comment-count-marker count-info) "\n"
+ (concat "*** Comments" (pearl--comment-count-marker count-info) "\n"
(mapconcat #'pearl--format-comment sorted "")))))
(defun pearl--format-issue-as-org-entry (issue)
@@ -2714,8 +2713,7 @@ GraphQL/transport failure or a non-success payload."
(defun pearl--bump-comments-count-marker ()
"Increment the ` N/M[+]' count on the Comments heading at point, if present.
A locally added comment grows both the shown and total counts by one. A heading
-that carries no count marker (the single-issue view) is left untouched, and the
-leading 💬 glyph is preserved either way."
+that carries no count marker (the single-issue view) is left untouched."
(save-excursion
(let ((eol (line-end-position)))
(beginning-of-line)
@@ -2737,8 +2735,11 @@ subtree at the end of the issue when it does not exist yet."
(let* ((issue-end (save-excursion (org-end-of-subtree t t) (point)))
(comments-pos
(save-excursion
- ;; tolerate the leading 💬 glyph and a trailing count marker; also
- ;; match the pre-2026-05 "Comments 💬 N/N" layout in older files
+ ;; Match the new no-emoji form, the prior `💬 ' leading-glyph
+ ;; layout (rendered between 2026-05-26 and the de-emoji
+ ;; revert), and the pre-2026-05 trailing-glyph layout
+ ;; (`Comments 💬 N/N'). Buffers rendered in any of the three
+ ;; states locate their Comments heading.
(when (re-search-forward "^\\*+ \\(?:💬 \\)?Comments\\(?:[ \t].*\\)?$" issue-end t)
(match-beginning 0)))))
(if comments-pos
@@ -2756,7 +2757,7 @@ subtree at the end of the issue when it does not exist yet."
;; no Comments subtree yet: this is the first comment, so it is 1/1
(goto-char issue-end)
(let ((start (point)))
- (insert "*** 💬 Comments 1/1\n" (pearl--format-comment comment))
+ (insert "*** Comments 1/1\n" (pearl--format-comment comment))
(pearl--hide-drawers-in-region start (point)))))))
;;;###autoload