From mboxrd@z Thu Jan 1 00:00:00 1970 From: Leo Vivier 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 11:17:13 +0100 Message-ID: <87zhtj2c46.fsf@gmail.com> References: <87lg57bxh1.fsf@gmail.com> <87pnufa72v.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48331) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gUqif-0008F8-VL for emacs-orgmode@gnu.org; Thu, 06 Dec 2018 05:17:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gUqic-0004Ef-Ob for emacs-orgmode@gnu.org; Thu, 06 Dec 2018 05:17:21 -0500 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]:34802) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gUqic-0004ES-IL for emacs-orgmode@gnu.org; Thu, 06 Dec 2018 05:17:18 -0500 Received: by mail-wr1-x431.google.com with SMTP id j2so22678920wrw.1 for ; Thu, 06 Dec 2018 02:17:18 -0800 (PST) In-reply-to: <87pnufa72v.fsf@nicolasgoaziou.fr> 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: Nicolas Goaziou Cc: emacs-orgmode@gnu.org Hello, Thank you for your quick patch. Since I wasn=E2=80=99t able to solve it on my own, I=E2=80=99ll take a look= at=20 your solution to understand what you did. Have a great day. Best, Nicolas Goaziou writes: > Hello, > > Leo Vivier writes: > >> Hello, >> >> There seems to be a bad interaction between=20 >> =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=20 >> right >> tree is targeted by =E2=80=98(org-resolve-clocks)=E2=80=99 to delete the= =20 >> clock-line >> and clock-drawer, it adds a new clock-drawer in the next tree=20 >> 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 t= o clock=20 >> 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 = 10 min=20 >> ago) >> # ------------------ >> >> >> Because those commands are run in quick succession, the time=20 >> between >> =E2=80=98(org-clock-in)=E2=80=99 and =E2=80=98(org-resolve-clocks)=E2=80= =99 is usually equal to=20 >> 0 min. >> Therefore, when =E2=80=98(org-resolve-clocks)=E2=80=99 calls =E2=80=98(o= rg-clock-out)=E2=80=99=20 >> after >> pressing , the clock-line is deleted, and if the=20 >> 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=20 >> & 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=20 >> to >> trigger in an agenda-file with already had clocking info. I=20 >> recommend >> that you try the snippet in one of your own agenda-files rather=20 >> than >> trying it in a blank buffer. > > Fixed. Thank you. > > Regards, --=20 Leo Vivier English Studies & General Linguistics Master Student, English Department Universit=C3=A9 Rennes 2