mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
fix(org): don't error org-download at top level
Org-attach (and thus org-download) can work before the first headline if the user sets `org-attach-auto-tag` to `nil`. But when inserting files in this situation, this advice will display an error message due to using `org-back-to-heading`. So I think it makes more sense to use `org-back-to-heading-or-point-min`.
This commit is contained in:
committed by
Henrik Lissner
parent
7e6baca99d
commit
051087d716
@ -62,7 +62,7 @@
|
|||||||
(save-excursion
|
(save-excursion
|
||||||
(org-display-inline-images
|
(org-display-inline-images
|
||||||
t t
|
t t
|
||||||
(progn (org-back-to-heading t) (point))
|
(progn (org-back-to-heading-or-point-min t) (point))
|
||||||
(progn (org-end-of-subtree t t)
|
(progn (org-end-of-subtree t t)
|
||||||
(when (and (org-at-heading-p) (not (eobp))) (backward-char 1))
|
(when (and (org-at-heading-p) (not (eobp))) (backward-char 1))
|
||||||
(point)))))))
|
(point)))))))
|
||||||
|
Reference in New Issue
Block a user