emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [BUG] - org-agenda log view does not conform to org-timestamp-formats
@ 2023-12-27 21:56 Tebe Nigrelli
  2023-12-28 11:37 ` Ihor Radchenko
  0 siblings, 1 reply; 3+ messages in thread
From: Tebe Nigrelli @ 2023-12-27 21:56 UTC (permalink / raw)
  To: emacs-orgmode

Steps to reproduce:

Changing org-timestamp-formats to include the timezone: ("<%Y-%m-%d %a 
%Z>" . "<%Y-%m-%d %a %H:%M %Z>"), a clock line will look like this:

(https://emacs.stackexchange.com/questions/13463/specify-timezone-in-org-date-format)

CLOCK: [2023-01-28 Sat 17:04 CET]--[2023-01-28 Sat 18:04 CET] =>  1:00

After toggling the "log view" in the org-agenda, the clock's line does 
not contain duration of the clock, instead showing "(-)" in the 
duration, as ongoing / error:

Expected behaviour: "Filename:   17:04-18:04 ┄┄┄┄┄ Clocked:   (1:00) 
Activity"

Shown behaviour:    "Filename:   17:04 ┄┄┄┄┄ Clocked:   (-) Activity"



Relevant:

Writing a duration ("%H:%M") at the 59th character of the clock 
line (where the duration would have been if the timestamps had normal 
length) results in the agenda reading the number and placing it in the 
parenthesis, suggesting that a fixed number of characters is skipped 
before reading the duration of the clock, for efficiency.

org-clock-report works as intended, so does org-ctrl-c-ctrl-c (fixing 
the date, writing the duration at the end of the line). The issue seems 
limited to the agenda.

Could be related to org-agenda-get-progress, but I am not sure.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [BUG] - org-agenda log view does not conform to org-timestamp-formats
  2023-12-27 21:56 [BUG] - org-agenda log view does not conform to org-timestamp-formats Tebe Nigrelli
@ 2023-12-28 11:37 ` Ihor Radchenko
       [not found]   ` <13a90e1b-2f48-4c1b-8720-f21804b5c950@gmail.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Ihor Radchenko @ 2023-12-28 11:37 UTC (permalink / raw)
  To: Tebe Nigrelli; +Cc: emacs-orgmode

Tebe Nigrelli <nigrellitebe@gmail.com> writes:

> Steps to reproduce:
>
> Changing org-timestamp-formats to include the timezone: ("<%Y-%m-%d %a 
> %Z>" . "<%Y-%m-%d %a %H:%M %Z>"), a clock line will look like this:

`org-timestamp-formats' is a constant. You are not supposed to change
it. And if you do, we give no guarantees that Org mode will continue to
function correctly.

Canceled.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [BUG] - org-agenda log view does not conform to org-timestamp-formats
       [not found]   ` <13a90e1b-2f48-4c1b-8720-f21804b5c950@gmail.com>
@ 2023-12-28 12:43     ` Ihor Radchenko
  0 siblings, 0 replies; 3+ messages in thread
From: Ihor Radchenko @ 2023-12-28 12:43 UTC (permalink / raw)
  To: Tebe Nigrelli; +Cc: emacs-orgmode

Tebe Nigrelli <nigrellitebe@gmail.com> writes:

> I understand that `org-timestamp-formats' is a constant, but since 
> almost everything I need still works I would like to fix my setup.
>
> Could you please point me to the function that parses clock lines and 
> returns the duration of the clock, as I could not find it myself in 
> org-agenda.el nor org.el?

`org-agenda-get-progress' I think. There is a hard-coded regexp.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-12-28 12:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-27 21:56 [BUG] - org-agenda log view does not conform to org-timestamp-formats Tebe Nigrelli
2023-12-28 11:37 ` Ihor Radchenko
     [not found]   ` <13a90e1b-2f48-4c1b-8720-f21804b5c950@gmail.com>
2023-12-28 12:43     ` Ihor Radchenko

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).