aboutsummaryrefslogtreecommitdiff
path: root/pearl.el
diff options
context:
space:
mode:
Diffstat (limited to 'pearl.el')
-rw-r--r--pearl.el10
1 files changed, 2 insertions, 8 deletions
diff --git a/pearl.el b/pearl.el
index b0b3419..5dd55a7 100644
--- a/pearl.el
+++ b/pearl.el
@@ -2527,11 +2527,9 @@ non-interactively, is sent as-is. Works from anywhere inside an issue subtree;
the new comment is the viewer's own, so it renders editable."
(interactive (list nil))
(save-excursion
- (pearl--goto-heading-or-error)
+ (pearl--goto-issue-heading-or-error)
(let ((issue-id (org-entry-get nil "LINEAR-ID"))
(marker (point-marker)))
- (unless issue-id
- (user-error "Not on a Linear issue heading"))
(if body
(pearl--create-and-append-comment issue-id marker body)
(pearl--compose-in-buffer
@@ -2599,13 +2597,9 @@ Works from anywhere inside an issue subtree. Confirms first, then issues a
soft delete (Linear moves the issue to Trash, recoverable for about 30 days);
on success the issue's Org subtree is removed from the buffer."
(interactive)
- (unless (save-excursion (ignore-errors (org-back-to-heading t) t))
- (user-error "Not on a Linear issue heading"))
- (let* ((marker (save-excursion (org-back-to-heading t) (point-marker)))
+ (let* ((marker (save-excursion (pearl--goto-issue-heading-or-error) (point-marker)))
(issue-id (org-entry-get marker "LINEAR-ID"))
(ident (or (org-entry-get marker "LINEAR-IDENTIFIER") "this issue")))
- (unless issue-id
- (user-error "Not on a Linear issue heading"))
(when (yes-or-no-p (format "Delete %s from Linear (moves it to Trash)? " ident))
(pearl--delete-issue-async
issue-id