From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adrian Bradd Subject: Re: org-depend: TRIGGER XYZ(KEYWORD) not working Date: Tue, 5 Dec 2017 21:51:23 -0500 Message-ID: References: <2017-11-19T10-47-05@devnull.Karl-Voit.at> <2017-12-03T18-47-08@devnull.Karl-Voit.at> <2017-12-04T20-17-40@devnull.Karl-Voit.at> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="001a113dd0e4eb0ae1055fa3065e" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49309) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eMPny-00051G-Tz for emacs-orgmode@gnu.org; Tue, 05 Dec 2017 21:51:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eMPny-0001Np-1F for emacs-orgmode@gnu.org; Tue, 05 Dec 2017 21:51:26 -0500 Received: from mail-pf0-x22b.google.com ([2607:f8b0:400e:c00::22b]:39589) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eMPnx-0001MG-RG for emacs-orgmode@gnu.org; Tue, 05 Dec 2017 21:51:25 -0500 Received: by mail-pf0-x22b.google.com with SMTP id l24so1656238pfj.6 for ; Tue, 05 Dec 2017 18:51:25 -0800 (PST) In-Reply-To: <2017-12-04T20-17-40@devnull.Karl-Voit.at> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Karl Voit Cc: emacs-orgmode --001a113dd0e4eb0ae1055fa3065e Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable =E2=80=8BHi Karl,=E2=80=8B This is because I removed the wrong progress indicator from my > examples before posting. You have to change all "[0/2]" with "[%]" > and then you see the issue I described. It seems to be the case that > [/] do work whereas [%] do cause the described malfunctional > behaviour. I was using both and did remove the wrong one. =E2=80=8BI have found the issue, but haven't had time to patch it. It actua= lly does happen with both [%] and [/]. org-todo is using a point to pass the beginning of the heading to org-depend instead of a marker. As such, when characters are added to the statistics in the parent heading the point shifts up to the line above the heading and when (org-entry-get pos "TRIGGER") runs it searches the heading above it, which is why the trigger works correctly if you populate the parent heading property. change-plist looks llike it is used in a few other functions as well. I'll have to see if using a marker breaks them. Cheers, Adrian --001a113dd0e4eb0ae1055fa3065e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
=E2=80=8BHi Karl,=E2=80=8B

This is because I removed the wrong progress indicator from my
examples before posting. You have to change all "[0/2]" with &quo= t;[%]"
and then you see the issue I described. It seems to be the case that
[/] do work whereas [%] do cause the described malfunctional
behaviour. I was using both and did remove the wrong one.
=
=E2=80=8BI= have found the issue, but haven't had time to patch it. It actually do= es happen with both [%] and [/].

org-todo is using a point to pass the beginning of the heading to = org-depend instead of a marker. As such, when characters are added to the s= tatistics in the parent heading the point shifts up to the line above the h= eading and when (org-entry-get pos "TRIGGER") runs it searches th= e heading above it, which is why the trigger works correctly if you populat= e the parent heading property.

change-plist looks llike it is used in a few other functions as well.= I'll have to see if using a marker breaks them.

Cheers,

Adrian

--001a113dd0e4eb0ae1055fa3065e--