emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Adrian Bradd <adrian.bradd@gmail.com>
To: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: BUG: TODO statistics in parent heading prevent evaluation of TODOs with TRIGGER property
Date: Mon, 25 Dec 2017 22:55:28 -0500	[thread overview]
Message-ID: <m2tvwejg7j.fsf@columbia.edu> (raw)
In-Reply-To: <CAMYmr8xeJaP8GLEjk9Rv4CRKYRRPLJxSfM6h0=FZ=exSnjyoiA@mail.gmail.com>


Just wanted to bump this.

Let me know if there is a preferred/better way to attack this issue and
I can give it a shot.

Cheers,

Adrian

Adrian Bradd <adrian.bradd@gmail.com> writes:

> I should probably add that this will require org-depend.el to be loaded.
>
> On 10 December 2017 at 17:50, Adrian Bradd <adrian.bradd@gmail.com> wrote:
>
>> Hello,
>>
>> ECM:
>>
>> * Top-Heading with process indicator [/]
>>
>> ** TODO Here I invoke org-todo to DONE
>> :PROPERTIES:
>> :TRIGGER:  2021-12-03-target(TODO)
>> :END:
>>
>> ** This should be changed to TODO
>> :PROPERTIES:
>> :ID: 2021-12-03-target
>> :END:
>>
>> If you run org-todo on the "Here I invoke org-todo to DONE" headline the
>> headline will change to DONE, but the trigger will not update the "This
>> should be changed to TODO" headline. There is further discussion in another
>> thread where the user reported the issue [1].
>>
>> The issue is Line 12534 in org.el:
>>
>> (when org-provide-todo-statistics
>>   (org-update-parent-todo-statistics))
>>
>> which traverses the tree and updates the todo progress statistics. If the
>> statistic is [/], as in the ECM above, or [%] it will add 1 or more
>> characters which is enough to push the :position property up to the line
>> above. I wasn't sure how to deal with this as it seems
>> `org-update-parent-todo-statistics' could update more than one parent
>> heading and the number of additional characters isn't clear without some
>> feedback from `org-update-parent-todo-statistics'.
>>
>> Cheers,
>>
>> Adrian
>>
>> [1] https://lists.gnu.org/archive/html/emacs-orgmode/2017-12/msg00058.html
>>
>> On 10 December 2017 at 16:53, Nicolas Goaziou <mail@nicolasgoaziou.fr>
>> wrote:
>>
>>> Hello,
>>>
>>> Adrian Bradd <adrian.bradd@gmail.com> writes:
>>>
>>> > Please see the patch attached.
>>> >
>>> > When completing a TODO with a TRIGGER property that has statistics in
>>> the
>>> > parent headline the trigger would not evaluate because the :position
>>> > property in `change-plist' may now refer to the line above the original
>>> > TODO.
>>> >
>>> > I have used a marker to avoid the issue with the point moving due to the
>>> > addition of characters
>>> > ​ in the parent headline​
>>> > . Not sure if this is the best way to solve the problem.
>>>
>>> IIUC, point is moved between `startpos' and `change-plist' bindings? Do
>>> you know when that happens? Would you have an ECM for the issue?
>>>
>>> Thank you.
>>>
>>> Regards,
>>>
>>> --
>>> Nicolas Goaziou
>>>
>>
>>


-- 
Adrian

Bioelectronic Systems Lab,
Columbia University

  reply	other threads:[~2017-12-26  3:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-10 21:25 BUG: TODO statistics in parent heading prevent evaluation of TODOs with TRIGGER property Adrian Bradd
2017-12-10 21:53 ` Nicolas Goaziou
2017-12-10 22:50   ` Adrian Bradd
2017-12-10 22:51     ` Adrian Bradd
2017-12-26  3:55       ` Adrian Bradd [this message]
2017-12-27 22:59         ` Nicolas Goaziou

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

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2tvwejg7j.fsf@columbia.edu \
    --to=adrian.bradd@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=mail@nicolasgoaziou.fr \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).