From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id ONJwL+0V6mHENwEAgWs5BA (envelope-from ) for ; Fri, 21 Jan 2022 03:09:49 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id cMkWKO0V6mENCAAAG6o9tA (envelope-from ) for ; Fri, 21 Jan 2022 03:09:49 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 69E2E157B7 for ; Fri, 21 Jan 2022 03:09:49 +0100 (CET) Received: from localhost ([::1]:39576 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nAjN6-0004vM-Ho for larch@yhetil.org; Thu, 20 Jan 2022 21:09:48 -0500 Received: from eggs.gnu.org ([209.51.188.92]:38738) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nAjLO-0004us-I9 for emacs-orgmode@gnu.org; Thu, 20 Jan 2022 21:08:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:38607) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nAjLO-0003NV-7F for emacs-orgmode@gnu.org; Thu, 20 Jan 2022 21:08:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nAjLN-00022l-W0 for emacs-orgmode@gnu.org; Thu, 20 Jan 2022 21:08:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#53393: 29.0.50; org mode timestamp C-c C-c not updating day of week Resent-From: bruce robertson Original-Sender: "Debbugs-submit" Resent-CC: emacs-orgmode@gnu.org Resent-Date: Fri, 21 Jan 2022 02:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53393 X-GNU-PR-Package: org-mode X-GNU-PR-Keywords: To: Kyle Meyer Received: via spool by 53393-submit@debbugs.gnu.org id=B53393.16427308687834 (code B ref 53393); Fri, 21 Jan 2022 02:08:01 +0000 Received: (at 53393) by debbugs.gnu.org; 21 Jan 2022 02:07:48 +0000 Received: from localhost ([127.0.0.1]:59743 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nAjLA-00022H-Dx for submit@debbugs.gnu.org; Thu, 20 Jan 2022 21:07:48 -0500 Received: from mail-ua1-f41.google.com ([209.85.222.41]:45878) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nAjL8-000225-GO for 53393@debbugs.gnu.org; Thu, 20 Jan 2022 21:07:47 -0500 Received: by mail-ua1-f41.google.com with SMTP id x33so14273746uad.12 for <53393@debbugs.gnu.org>; Thu, 20 Jan 2022 18:07:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=mQ+1VsFTiUi7SlcX7HpI0JxTadmeuyyC1/ILqY1nA7Y=; b=QuV6Uw+5tTbMNhnpnWIGwQabrcdxmyhHYS68Du1CWQOdaFim6FGRbozqSxYzUzg2e9 Z7ExQVh8YQVBOHpCCT9LmSbsEu6DNi67QRGawlglalFfDQ0A55MSdzmEbvWUICly+wfY lJTtB9rT2lHER66/Wq8ekl8bm3A2cknFgMIrzfStOIezT4JQd89AttzBdHM0zVrhtHWS TCfYdHvsH+NDF4CBLJckD9qErJ+bTa2hnJdh/AnEHwd+JrSJZaln5RNp+EH4QXykBy5R ZNgHsvG82tBMcQ0KajLGSnJQH/Z8PRMPUUzyWibk58HEoKMsrSg38kIsZygUPZCU2RRR 7qwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=mQ+1VsFTiUi7SlcX7HpI0JxTadmeuyyC1/ILqY1nA7Y=; b=p+JNHe9wB7/jyVkfb19jaDV+KXHfsd9mKyvtcOc/Xw+KoxMZsvfV0jRYN356r0asW6 +OF4ciXkLO27XsFq4cLwUotYaLeZYRXU9HgjBFj/8sjEPLyeI1FCnghk3StGlJ6BNqDE 93xcW53o5VTENjaML+TNaDI/kbtHQaiUyexgddnzOIlyNGA6BQrQIzyRJSRP6pgQ6wdg qmGp9szEllo7KK6a3ZFcxvB9Gkjhk2JrWlCpsVf2coU3iif1nvzftyk2wWt1Vav+d7fv OwdQn6yreFhuDiS5Q0a06Wsa6nBX4coYMGkIO9om/TEgXwrn3tmzrNJKFMAvkKFjNW5M MFIQ== X-Gm-Message-State: AOAM5313ThrF7idxG8Wu4ZPc7R9nRSzCjL8aJD93v56UmurPCxKUP6Eq NMZ481MZekB4NxqwE59XiS7RBvEohPgucYvt46pFmSI1 X-Google-Smtp-Source: ABdhPJynrDQhy5MdGiMkovZB5W06jCBZEQFntXwvompiShN8gbyDIgJR/Mj+s7sVq+qzy5DIDJnWeGjCunWXxJ7mtR0= X-Received: by 2002:a67:f509:: with SMTP id u9mr938093vsn.35.1642730859774; Thu, 20 Jan 2022 18:07:39 -0800 (PST) MIME-Version: 1.0 References: <871r11ooqc.fsf@kyleam.com> In-Reply-To: <871r11ooqc.fsf@kyleam.com> From: bruce robertson Date: Thu, 20 Jan 2022 18:07:29 -0800 Message-ID: Content-Type: multipart/alternative; boundary="0000000000005bc6fb05d60e1518" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: emacs-orgmode@gnu.org List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 53393@debbugs.gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" Authentication-Results: aspmx1.migadu.com; none X-Migadu-Scanner: scn1.migadu.com X-TUID: Y7xmQiH1rlCP --0000000000005bc6fb05d60e1518 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thanks. I=E2=80=99ll do that. Org-submit =E2=80=A6 that is. On Thu, Jan 20, 2022 at 5:35 PM Kyle Meyer wrote: > [ I've reassigned this bug report so that new messages will be directed > to the Org mailing list, where it's more likely to get a reply. In > the future, please consider using org-submit-bug-report or sending a > message to emacs-orgmode@gnu.org directly. ] > > Bruce E. Robertson writes: > > > emacs -Q test.org > > cursor to "CLOCK:" line, C-c C-c > > total time updates but day of week does not change > > contents of test.org > > ------ > > * heading > > :LOGBOOK: > > CLOCK: [2022-01-17 Tue 10:29]--[2022-01-19 Tue 10:29] =3D> 48:00 > > :END: > > ------ > > typing C-c C-c does update total log time for line and recently did > > update the day of the week but no long does > > I'm having trouble finding an Org version where it will update a > timestamp _within_ a clock line. I tried it out with v9.1 and the day > of the week still isn't updated. Outside of that context it will, as > org-ctrl-c-ctrl-c-hook gets through to its timestamp condition rather > than taking the clock branch. > > If you can provide more details about a version where it did work, > showing it's a regression, I think you'll have a higher chance of > getting this fixed. > > Anyway, at least for now, perhaps you could try something like this to > get the behavior you want: > > (defun my/update-clock-and-days () > (when (eq (org-element-type (org-element-context)) 'clock) > (let ((re (org-re-timestamp 'inactive))) > (save-excursion > (goto-char (line-beginning-position)) > (while (re-search-forward re (line-end-position) t) > (backward-char) > (org-timestamp-change 0 'day)))))) > > (add-hook 'org-ctrl-c-ctrl-c-hook #'my/update-clock-and-days) > > With that, hitting `C-c C-c` on the clock line at > > --8<---------------cut here---------------start------------->8--- > * heading > :LOGBOOK: > CLOCK: [2022-01-17 Thu 10:29]--[2022-01-19 Sun 10:29] =3D> 40:00 > :END: > --8<---------------cut here---------------end--------------->8--- > > produces > > --8<---------------cut here---------------start------------->8--- > * heading > :LOGBOOK: > CLOCK: [2022-01-17 Mon 10:29]--[2022-01-19 Wed 10:29] =3D> 48:00 > :END: > --8<---------------cut here---------------end--------------->8--- > --=20 =CE=BB=CE=AD=CE=B3=CE=B5=CE=B9 =CE=B1=E1=BD=90=CF=84=E1=BF=B7 =E1=BC=B8=CE= =B7=CF=83=CE=BF=E1=BF=A6=CF=82 =E1=BC=98=CE=B3=CF=8E =CE=B5=E1=BC=B0=CE=BC= =CE=B9 =E1=BC=A1 =E1=BD=81=CE=B4=E1=BD=B8=CF=82 =CE=BA=CE=B1=E1=BD=B6 =E1= =BC=A1 =E1=BC=80=CE=BB=CE=AE=CE=B8=CE=B5=CE=B9=CE=B1 =CE=BA=CE=B1=E1=BD=B6 = =E1=BC=A1 =CE=B6=CF=89=CE=AE=C2=B7 =CE=BF=E1=BD=90=CE=B4=CE=B5=E1=BD=B6=CF= =82 =E1=BC=94=CF=81=CF=87=CE=B5=CF=84=CE=B1=CE=B9 =CF=80=CF=81=E1=BD=B8=CF=82 =CF=84=E1=BD=B8=CE=BD =CE=A0=CE=B1=CF=84=CE=AD= =CF=81=CE=B1 =CE=B5=E1=BC=B0 =CE=BC=E1=BD=B4 =CE=B4=CE=B9' =E1=BC=90=CE=BC= =CE=BF=E1=BF=A6. =CE=9A=CE=91=CE=A4=CE=91 =CE=99=CE=A9=CE=91=CE=9D=CE=9D=CE= =97=CE=9D --0000000000005bc6fb05d60e1518 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks. I=E2=80=99ll do that. Org-submit =E2=80=A6 that i= s.=C2=A0

On Thu, Jan 20, 2022 at 5:35 PM Kyle Meyer <kyle@kyleam.com> wrote:
[ I've reassigned this bug report so that new messages will be direct= ed
=C2=A0 to the Org mailing list, where it's more likely to get a reply.= =C2=A0 In
=C2=A0 the future, please consider using org-submit-bug-report or sending a=
=C2=A0 message to emacs-orgmode@gnu.org directly. ]

Bruce E. Robertson writes:

> emacs -Q test.org
> cursor to "CLOCK:" line, C-c C-c
> total time updates but day of week does not change
> contents of test.org
> ------
> * heading
> :LOGBOOK:
> CLOCK: [2022-01-17 Tue 10:29]--[2022-01-19 Tue 10:29] =3D> 48:00 > :END:
> ------
> typing C-c C-c does update total log time for line and recently did > update the day of the week but no long does

I'm having trouble finding an Org version where it will update a
timestamp _within_ a clock line.=C2=A0 I tried it out with v9.1 and the day=
of the week still isn't updated.=C2=A0 Outside of that context it will,= as
org-ctrl-c-ctrl-c-hook gets through to its timestamp condition rather
than taking the clock branch.

If you can provide more details about a version where it did work,
showing it's a regression, I think you'll have a higher chance of getting this fixed.

Anyway, at least for now, perhaps you could try something like this to
get the behavior you want:

=C2=A0 (defun my/update-clock-and-days ()
=C2=A0 =C2=A0 (when (eq (org-element-type (org-element-context)) 'clock= )
=C2=A0 =C2=A0 =C2=A0 (let ((re (org-re-timestamp 'inactive)))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (save-excursion
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (goto-char (line-beginning-position)) =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (while (re-search-forward re (line-end-p= osition) t)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (backward-char)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (org-timestamp-change 0 'day)= )))))

=C2=A0 (add-hook 'org-ctrl-c-ctrl-c-hook #'my/update-clock-and-days= )

With that, hitting `C-c C-c` on the clock line at

--8<---------------cut here---------------start------------->8---
* heading
:LOGBOOK:
CLOCK: [2022-01-17 Thu 10:29]--[2022-01-19 Sun 10:29] =3D> 40:00
:END:
--8<---------------cut here---------------end--------------->8---

produces

--8<---------------cut here---------------start------------->8---
* heading
:LOGBOOK:
CLOCK: [2022-01-17 Mon 10:29]--[2022-01-19 Wed 10:29] =3D> 48:00
:END:
--8<---------------cut here---------------end--------------->8---
--
=CE=BB=CE=AD=CE=B3=CE=B5=CE=B9 =CE=B1=E1= =BD=90=CF=84=E1=BF=B7 =E1=BC=B8=CE=B7=CF=83=CE=BF=E1=BF=A6=CF=82 =E1=BC=98= =CE=B3=CF=8E =CE=B5=E1=BC=B0=CE=BC=CE=B9 =E1=BC=A1 =E1=BD=81=CE=B4=E1=BD=B8= =CF=82 =CE=BA=CE=B1=E1=BD=B6 =E1=BC=A1 =E1=BC=80=CE=BB=CE=AE=CE=B8=CE=B5=CE= =B9=CE=B1 =CE=BA=CE=B1=E1=BD=B6 =E1=BC=A1 =CE=B6=CF=89=CE=AE=C2=B7 =CE=BF= =E1=BD=90=CE=B4=CE=B5=E1=BD=B6=CF=82 =E1=BC=94=CF=81=CF=87=CE=B5=CF=84=CE= =B1=CE=B9 =CF=80=CF=81=E1=BD=B8=CF=82 =CF=84=E1=BD=B8=CE=BD =CE=A0=CE=B1=CF= =84=CE=AD=CF=81=CE=B1 =CE=B5=E1=BC=B0 =CE=BC=E1=BD=B4 =CE=B4=CE=B9' =E1= =BC=90=CE=BC=CE=BF=E1=BF=A6. =CE=9A=CE=91=CE=A4=CE=91 =CE=99=CE=A9=CE=91=CE= =9D=CE=9D=CE=97=CE=9D
--0000000000005bc6fb05d60e1518--