summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2014-05-21 19:47:29 +0200
committerBastien Guerry <bzg@altern.org>2014-05-21 19:47:29 +0200
commitdf53dce91168a5f565fb9d7cfc9761517ca9f979 (patch)
tree0eb00a7cd2869b4321c77b66dc8c3cab765bba2d
parent9347072882f85f486da079d0673938ff15e5659d (diff)
parent241286865cb30dd36afc343209a9b5c418863939 (diff)
downloadorg-mode-df53dce91168a5f565fb9d7cfc9761517ca9f979.tar.gz
Merge branch 'maint'
-rw-r--r--lisp/org-attach.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/org-attach.el b/lisp/org-attach.el
index 0412b63..5c341a5 100644
--- a/lisp/org-attach.el
+++ b/lisp/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)