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: Sun, 10 Dec 2017 17:51:31 -0500 [thread overview]
Message-ID: <CAMYmr8xeJaP8GLEjk9Rv4CRKYRRPLJxSfM6h0=FZ=exSnjyoiA@mail.gmail.com> (raw)
In-Reply-To: <CAMYmr8wiswW3fQjXpjXMx5=5hSQLMO6Ffu-EOqy0f=6d6BOZXA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2312 bytes --]
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
>>
>
>
[-- Attachment #2: Type: text/html, Size: 4424 bytes --]
next prev parent reply other threads:[~2017-12-10 22:51 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 [this message]
2017-12-26 3:55 ` Adrian Bradd
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAMYmr8xeJaP8GLEjk9Rv4CRKYRRPLJxSfM6h0=FZ=exSnjyoiA@mail.gmail.com' \
--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 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.