forked from mirrors/org-mode
org-attach.el (org-attach-dir): Fix bug
* org-attach.el (org-attach-dir): When the property is "inherited" from a variable outside of the file, do not use `org-entry-property-inherited-from' to find the attachment position, assume we need to go back to the current headline.
This commit is contained in:
parent
844a6494c3
commit
241286865c
|
@ -208,7 +208,9 @@ the directory and (if necessary) the corresponding ID will be created."
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(save-restriction
|
(save-restriction
|
||||||
(widen)
|
(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)
|
(let (org-attach-allow-inheritance)
|
||||||
(org-attach-dir create-if-not-exists-p)))))
|
(org-attach-dir create-if-not-exists-p)))))
|
||||||
(org-attach-check-absolute-path attach-dir)
|
(org-attach-check-absolute-path attach-dir)
|
||||||
|
|
Loading…
Reference in a new issue