diff options
Diffstat (limited to 'lisp/org/org-attach.el')
-rw-r--r-- | lisp/org/org-attach.el | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/org/org-attach.el b/lisp/org/org-attach.el index 07307e68f6f..bcf7ba736fd 100644 --- a/lisp/org/org-attach.el +++ b/lisp/org/org-attach.el @@ -208,7 +208,9 @@ the directory and (if necessary) the corresponding ID will be created." (save-excursion (save-restriction (widen) - (goto-char org-entry-property-inherited-from) + (if (marker-position org-entry-property-inherited-from) + (goto-char org-entry-property-inherited-from) + (org-back-to-heading t)) (let (org-attach-allow-inheritance) (org-attach-dir create-if-not-exists-p))))) (org-attach-check-absolute-path attach-dir) |