From: Adrian Bradd <adrian.bradd@gmail.com>
To: Karl Voit <news1142@karl-voit.at>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: org-depend: TRIGGER XYZ(KEYWORD) not working
Date: Sun, 3 Dec 2017 10:13:16 -0500 [thread overview]
Message-ID: <CAMYmr8z=63p-B-SyDs7tRu_=-ipeKW9+L=cOFEf2dmzfL0Jzkw@mail.gmail.com> (raw)
In-Reply-To: <2017-11-19T10-47-05@devnull.Karl-Voit.at>
[-- Attachment #1: Type: text/plain, Size: 2979 bytes --]
Hi,
First observation:
>
> When I set the heading 1 to DONE (without assigning it any other
> keyword), the TRIGGER events are ignored totally. I guess this is
> an edge-case that may be considered as a bug.
>
This is the result of Line 219 in org-depend.el:
(unless (and (member from org-not-done-keywords)
(member to org-done-keywords))
In this instance 'from' is set to nil so the 'and' returns nil and
org-depend doesn't process the change of TODO to look for dependents. I
don't know why it was defined this way as org-todo.el accepts headings with
no TODO entry. I can't think of any reason other than explicitly blocking a
user from processing a heading without a TODO entry, but it seems that if
the user went to the effort of populating a TRIGGER property that they
probably want this to be acted upon by org-depend.el.
If there are no concerns raised in this thread I'll push a patch to all
have org-depend process the example you listed.
> Second observation:
>
> However, what is bugging me even more is that even when "heading 1"
> has a TODO keyword assigned, in *some* cases, the TRIGGER event does
> not get executed when I do it in my large Org-mode file.
>
> Copying the corresponding headings (the one with the TRIGGER prop
> and the headings containing the "target" IDs) from my real-world
> Org-mode file to my small test.org from above and marking the
> heading that contains the TRIGGER properties to DONE, it then works
> as expected.
>
> I then took the simple example from above, added a TODO keyword to
> the heading 1, copied it to my real-world Org-mode file and even
> this did not work: Heading 2 and 3 don't get their "NEXT" keyword
> assigned.
>
> So the behavior changes within different Org-file contexts.
> Therefore, I do have an issue creating a minimal example to
> demonstrate the bug.
>
> Can somebody give me an advice how to debug this behavior?
>
My only thought is that there is an ID clashing with your sample ID and it
is being updated instead of the heading you are interested in.
org-depend.el looks at the local file for an ID and then looks globally for
an ID match.
You could instrument 'org-depend-trigger-todo' to trace the behaviour while
processing the TODO update.
Otherwise, you could use a process of elimination in a copy of your
existing file to find the MWE that causes the issue and post it here. You
could successively delete headings or other entries until the issue stops
occurring.
I have read your post on org-depend and found it insightful so thanks for
that. When I was looking around at patching some new functionality into
org-depend I was put onto org-edna[1] which was built as an alternative to
org-depend. The syntax isn't compatible with org-depend, but org-edna is
more powerful than org-depend. I am now using org-edna and am quite happy
with it.
[1] https://elpa.gnu.org/packages/org-edna.html
[-- Attachment #2: Type: text/html, Size: 4696 bytes --]
next prev parent reply other threads:[~2017-12-03 15:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-19 10:05 org-depend: TRIGGER XYZ(KEYWORD) not working Karl Voit
2017-11-19 10:18 ` Karl Voit
2017-12-03 15:13 ` Adrian Bradd [this message]
2017-12-03 18:38 ` Karl Voit
2017-12-04 2:42 ` Adrian Bradd
2017-12-04 19:21 ` Karl Voit
2017-12-06 2:51 ` Adrian Bradd
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAMYmr8z=63p-B-SyDs7tRu_=-ipeKW9+L=cOFEf2dmzfL0Jzkw@mail.gmail.com' \
--to=adrian.bradd@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=news1142@karl-voit.at \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.