From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: =?UTF-8?B?UmU6IEJ1Zzog4oCYKG9yZy1yZXNvbHZlLWNsb2NrcynigJkgIHBp?= =?UTF-8?B?Y2tzIHRoZSB3cm9uZyB0YXJnZXQgZm9yIHBsYWNpbmcgYSBuZXcgY2xvY2st?= =?UTF-8?B?ZHJhd2VyIHdoZW4g4oCYb3JnLWNsb2NrLW91dC1yZW1vdmUtemVyby10aW1l?= =?UTF-8?B?LWNsb2Nrc+KAmSBpcyBzZXQgdG8gdCBbOS4xLjE0ICg5LjEuMTQtOS1nMTMx?= =?UTF-8?B?NTMxLWVscGEgQCB+Ly5lbWFjcy5kL2VscGEvb3JnLTIwMTgxMTI2Lyld?= Date: Thu, 06 Dec 2018 00:26:32 +0100 Message-ID: <87pnufa72v.fsf@nicolasgoaziou.fr> References: <87lg57bxh1.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45807) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gUgZ5-0000Gn-GC for emacs-orgmode@gnu.org; Wed, 05 Dec 2018 18:26:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gUgYw-00053B-Oe for emacs-orgmode@gnu.org; Wed, 05 Dec 2018 18:26:44 -0500 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:50677) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gUgYw-0004yF-4h for emacs-orgmode@gnu.org; Wed, 05 Dec 2018 18:26:38 -0500 In-Reply-To: <87lg57bxh1.fsf@gmail.com> (Leo Vivier's message of "Sun, 02 Dec 2018 19:22:02 +0100") 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: Leo Vivier Cc: emacs-orgmode@gnu.org Hello, Leo Vivier writes: > Hello, > > There seems to be a bad interaction between =E2=80=98(org-resolve-clocks)= =E2=80=99 and > =E2=80=98org-clock-out-remove-zero-time-clocks=E2=80=99 set to t. Whilst = the right > tree is targeted by =E2=80=98(org-resolve-clocks)=E2=80=99 to delete the = clock-line > and clock-drawer, it adds a new clock-drawer in the next tree rather > than on the one being acted on. > > I was able to replicate this problem with =E2=80=98emacs -Q=E2=80=99. > > > DESCRIPTION: > > > I use org-clock regularly, and recently re-discovered > =E2=80=98org-clock-out-remove-zero-time-clocks=E2=80=99. When I forget to= clock an > item, I run the following commands in quick succession: > # ------------------ > (org-clock-in) > (org-resolve-clocks) > : g 10 (For indicating that I =E2=80=98got back=E2=80=99 1= 0 min ago) > # ------------------ > > > Because those commands are run in quick succession, the time between > =E2=80=98(org-clock-in)=E2=80=99 and =E2=80=98(org-resolve-clocks)=E2=80= =99 is usually equal to 0 min. > Therefore, when =E2=80=98(org-resolve-clocks)=E2=80=99 calls =E2=80=98(or= g-clock-out)=E2=80=99 after > pressing , the clock-line is deleted, and if the clock-drawer > was created by =E2=80=98(org-clock-in)=E2=80=99, it also gets deleted. > > > The problem occurs in this context (=E2=80=98|=E2=80=99 represents =E2=80= =98(point)=E2=80=99): > # ------------------ > * Subtree 1 > ** Item| > * Subtree 2 > # ------------------ > =E2=80=98Item=E2=80=99 is the subtree we want to clock in the past. =E2= =80=98Subtrees 1 & 2=E2=80=99 > are regular subtrees without any newlines separating them (the > white-space is important). > Please note that I was only able to get =E2=80=98(org-resolve-clocks)=E2= =80=99 to > trigger in an agenda-file with already had clocking info. I recommend > that you try the snippet in one of your own agenda-files rather than > trying it in a blank buffer. Fixed. Thank you. Regards, --=20 Nicolas Goaziou