emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: bruce robertson <brucer42@gmail.com>
To: Kyle Meyer <kyle@kyleam.com>
Cc: 53393@debbugs.gnu.org
Subject: bug#53393: 29.0.50; org mode timestamp C-c C-c not updating day of week
Date: Thu, 20 Jan 2022 18:07:29 -0800	[thread overview]
Message-ID: <CACdyrTmNAJKd79mwWnDkGaRb3N9Ux-zKffP0_Q3i2r5BuHWR1g@mail.gmail.com> (raw)
In-Reply-To: <871r11ooqc.fsf@kyleam.com>

[-- Attachment #1: Type: text/plain, Size: 2677 bytes --]

Thanks. I’ll do that. Org-submit … that is.

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 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] => 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] => 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] => 48:00
> :END:
> --8<---------------cut here---------------end--------------->8---
>
-- 
λέγει αὐτῷ Ἰησοῦς Ἐγώ εἰμι ἡ ὁδὸς καὶ ἡ ἀλήθεια καὶ ἡ ζωή· οὐδεὶς ἔρχεται
πρὸς τὸν Πατέρα εἰ μὴ δι' ἐμοῦ. ΚΑΤΑ ΙΩΑΝΝΗΝ

[-- Attachment #2: Type: text/html, Size: 3562 bytes --]

  reply	other threads:[~2022-01-21  2:09 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <m2v8yg7uxl.fsf@gmail.com>
2022-01-21  1:35 ` bug#53393: 29.0.50; org mode timestamp C-c C-c not updating day of week Kyle Meyer
2022-01-21  2:07   ` bruce robertson [this message]
2022-01-22 12:22     ` Peter Davis
2022-01-23  3:33       ` Ihor Radchenko
2022-01-21  7:13 ` Eli Zaretskii
2022-01-26  5:12   ` bruce robertson
2022-11-01  7:55 ` Ihor Radchenko
2022-11-01 16:32   ` bruce robertson
2022-11-03 21:52   ` Rudolf Adamkovič via General discussions about Org-mode.
2022-11-04  4:21     ` Ihor Radchenko
2022-11-06  0:41       ` Rudolf Adamkovič via General discussions about Org-mode.
2022-11-06  3:40         ` Ihor Radchenko
     [not found] <mailman.67.1642784492.19950.emacs-orgmode@gnu.org>
2022-01-22  5:21 ` No Wayman
2022-01-22  5:45   ` No Wayman
2022-10-11  7:57   ` Ihor Radchenko

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

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CACdyrTmNAJKd79mwWnDkGaRb3N9Ux-zKffP0_Q3i2r5BuHWR1g@mail.gmail.com \
    --to=brucer42@gmail.com \
    --cc=53393@debbugs.gnu.org \
    --cc=kyle@kyleam.com \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).