[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org de6d902 6/8: org-attach: Consider inlinetasks when
From: |
Stefan Monnier |
Subject: |
[elpa] externals/org de6d902 6/8: org-attach: Consider inlinetasks when calculating attach dir |
Date: |
Thu, 17 Dec 2020 18:39:47 -0500 (EST) |
branch: externals/org
commit de6d90224cc7be7ab072314e4b8ca05a712b527c
Author: Ihor Radchenko <yantar92@gmail.com>
Commit: Bastien <bzg@gnu.org>
org-attach: Consider inlinetasks when calculating attach dir
* lisp/org-attach.el (org-attach): When inside inlinetask, return
attachment dir of that task. When outside inlinetask, return
attachment dir of the main task ignoring any inlinetasks above point.
The call to `org-back-to-heading-or-point-min` does not move point to
the actual heading when there is inlinetask above the point. The
result is incorrect return value or even creation of property drawer
below *...** END line of the last inline task before point.
---
lisp/org-attach.el | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/lisp/org-attach.el b/lisp/org-attach.el
index e6aa97e..d117bdd 100644
--- a/lisp/org-attach.el
+++ b/lisp/org-attach.el
@@ -256,7 +256,14 @@ Shows a list of commands and prompts for another key to
execute a command."
(unless marker
(error "No item in current line")))
(org-with-point-at marker
- (org-back-to-heading-or-point-min t)
+ (if (and (featurep 'org-inlinetask)
+ (not (org-inlinetask-in-task-p)))
+ (org-with-limited-levels
+ (org-back-to-heading-or-point-min t))
+ (if (and (featurep 'org-inlinetask)
+ (org-inlinetask-in-task-p))
+ (org-inlinetask-goto-beginning)
+ (org-back-to-heading-or-point-min t)))
(save-excursion
(save-window-excursion
(unless org-attach-expert
- [elpa] externals/org updated (b1dc454 -> 6b83c6e), Stefan Monnier, 2020/12/17
- [elpa] externals/org baf1e7a 3/8: ob-gnuplot: Fix error on non-string :var assignment, Stefan Monnier, 2020/12/17
- [elpa] externals/org b9f9283 1/8: Merge branch 'maint', Stefan Monnier, 2020/12/17
- [elpa] externals/org 11d186a 2/8: Fix previous commit, Stefan Monnier, 2020/12/17
- [elpa] externals/org 69760ae 4/8: Merge branch 'maint', Stefan Monnier, 2020/12/17
- [elpa] externals/org 6bdb664 5/8: lisp/ob-haskell.el: Add Lawrence Bottorff as maintainer, Stefan Monnier, 2020/12/17
- [elpa] externals/org 6b83c6e 8/8: org-contacts.el: Add support for org-id generated link., Stefan Monnier, 2020/12/17
- [elpa] externals/org e7f625d 7/8: org-contacts.el: Fix org-store-link error caused by org-contacts, Stefan Monnier, 2020/12/17
- [elpa] externals/org de6d902 6/8: org-attach: Consider inlinetasks when calculating attach dir,
Stefan Monnier <=