Skip to content

Commit

Permalink
org-agenda-new-marker: Do not create maker in killed agenda buffers
Browse files Browse the repository at this point in the history
* lisp/org-agenda.el (org-agenda-new-marker): Do not create buffer
marker unless agenda buffer is live.

Reported-by: Hu Lucius <orctarorga@gmail.com>
Link: https://orgmode.org/list/CACDPnMHOfUmO4sjer_pcox5Z5sodkVN-UW29AAYdL8V-iOiGoA@mail.gmail.com
  • Loading branch information
yantar92 committed Oct 16, 2022
1 parent 15b3aa4 commit 87c294c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lisp/org-agenda.el
Original file line number Diff line number Diff line change
Expand Up @@ -4280,8 +4280,8 @@ Marker is at point, or at POS if non-nil. Org mode keeps a list
of these markers and resets them when they are no longer in use."
(let ((m (copy-marker (or pos (point)) t)))
(setq org-agenda-last-marker-time (float-time))
(if org-agenda-buffer
(with-current-buffer org-agenda-buffer
(if (and org-agenda-buffer (buffer-live-p org-agenda-buffer))
(with-current-buffer org-agenda-buffer
(push m org-agenda-markers))
(push m org-agenda-markers))
m))
Expand Down

0 comments on commit 87c294c

Please sign in to comment.