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:
parent
7e6baca99d
commit
051087d716
1 changed files with 1 additions and 1 deletions
|
@ -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)))))))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue