fix(org): don't call org-reveal in dead buffer
This fixes a bug introduced in bb3431a (#7509). This shows up for example in `org-capture`, which uses multiple org buffers and the initial one (with name `*Capture*`) will be dead already by the time the timer runs. Amend: #7509
This commit is contained in:
parent
e5cbe36fd7
commit
f4e02a2d39
1 changed files with 3 additions and 2 deletions
|
@ -511,8 +511,9 @@ All my (performant) foldings needs are met between this and `org-show-subtree'
|
||||||
(let ((buf (current-buffer)))
|
(let ((buf (current-buffer)))
|
||||||
(unless (doom-temp-buffer-p buf)
|
(unless (doom-temp-buffer-p buf)
|
||||||
(run-at-time 0.1 nil (lambda ()
|
(run-at-time 0.1 nil (lambda ()
|
||||||
(with-current-buffer buf
|
(when (buffer-live-p buf)
|
||||||
(org-reveal '(4)))))))))
|
(with-current-buffer buf
|
||||||
|
(org-reveal '(4))))))))))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun +org-remove-occur-highlights-h ()
|
(defun +org-remove-occur-highlights-h ()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue