emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [BUG] org-element-warnings when accidentially inserting "z" into timestamp [9.5.3 (release_9.5.3-471-gebbef7.dirty @ /home/grfz/src/org-mode/lisp/)]
@ 2022-05-30 10:02 Gregor Zattler
  2022-05-30 11:51 ` Ihor Radchenko
  0 siblings, 1 reply; 8+ messages in thread
From: Gregor Zattler @ 2022-05-30 10:02 UTC (permalink / raw)
  To: emacs-orgmode

Ciao,

Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

     https://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org mailing list.
------------------------------------------------------------------------

Dear org mode developers, Ihor,

I accidentally inserted a "z" into a closing timestamp in a
clockline like so: 20zznn22-05-30

This happened because I use key chors and didn't enter the
chord fast enough.


This produced a *Warnings* buffer of 2,3 MB size.

Next time I provoced this it was only 66 KB *Warnings*

I use org mode as build a few weeks ago, dunno if this still
of interest.

Since the backtrace contains private information I would
rather not send it to the list, but to an individual maybe!?


If this backtraces are of interest, whom should I send them
to?


Ciao; Gregor

Emacs  : GNU Emacs 29.0.50 (build 3, x86_64-pc-linux-gnu, X toolkit, cairo version 1.16.0)
 of 2022-05-15
Package: Org mode version 9.5.3 (release_9.5.3-471-gebbef7.dirty @ /home/grfz/src/org-mode/lisp/)
--
Gregor


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

* Re: [BUG] org-element-warnings when accidentially inserting "z" into timestamp [9.5.3 (release_9.5.3-471-gebbef7.dirty @ /home/grfz/src/org-mode/lisp/)]
  2022-05-30 10:02 [BUG] org-element-warnings when accidentially inserting "z" into timestamp [9.5.3 (release_9.5.3-471-gebbef7.dirty @ /home/grfz/src/org-mode/lisp/)] Gregor Zattler
@ 2022-05-30 11:51 ` Ihor Radchenko
  2022-05-30 14:42   ` Gregor Zattler
  0 siblings, 1 reply; 8+ messages in thread
From: Ihor Radchenko @ 2022-05-30 11:51 UTC (permalink / raw)
  To: Gregor Zattler; +Cc: emacs-orgmode

Gregor Zattler <grfz@gmx.de> writes:

> I accidentally inserted a "z" into a closing timestamp in a
> clockline like so: 20zznn22-05-30
>
> This happened because I use key chors and didn't enter the
> chord fast enough.
>
>
> This produced a *Warnings* buffer of 2,3 MB size.

Possibly a duplicate of
https://list.orgmode.org/orgmode/87tuh88kjv.fsf@localhost/

I just pushed a fix upstream. Can you please check again with the latest
Org?

Best,
Ihor


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

* Re: [BUG] org-element-warnings when accidentially inserting "z" into timestamp [9.5.3 (release_9.5.3-471-gebbef7.dirty @ /home/grfz/src/org-mode/lisp/)]
  2022-05-30 11:51 ` Ihor Radchenko
@ 2022-05-30 14:42   ` Gregor Zattler
  2022-05-31  5:01     ` Ihor Radchenko
  0 siblings, 1 reply; 8+ messages in thread
From: Gregor Zattler @ 2022-05-30 14:42 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: emacs-orgmode

Hi Ihor,
* Ihor Radchenko <yantar92@gmail.com> [2022-05-30; 19:51]:
> Gregor Zattler <grfz@gmx.de> writes:
>
>> I accidentally inserted a "z" into a closing timestamp in a
>> clockline like so: 20zznn22-05-30
>>
>> This happened because I use key chors and didn't enter the
>> chord fast enough.
>>
>>
>> This produced a *Warnings* buffer of 2,3 MB size.
>
> Possibly a duplicate of
> https://list.orgmode.org/orgmode/87tuh88kjv.fsf@localhost/
>
> I just pushed a fix upstream. Can you please check again with the latest
> Org?

this seems to have solved the warnings -Problem.  No warning
any more (I saved the org-persistent cache and tested with
the cache which was involved in the bug reprot and with a
fresh one).

Now I realized, that even after quitting and restarting
Emacs, I cannot insert a timestamp, I get the following
error message:

org-parse-time-string: Not an Org time string: [20zznn22-05-30 Mo 11:34]

And then there is a dangling

CLOCK:

line without timestamps at the expected line in my org file.

It took a while till I realized that there was a corrupted
timestamp in my org file a few clock lines below.

It would be helpful, if the message contained the file name
and probably even the line number.


Thanks for fixing this so quick.


Ciao,
--
Gregor


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

* Re: [BUG] org-element-warnings when accidentially inserting "z" into timestamp [9.5.3 (release_9.5.3-471-gebbef7.dirty @ /home/grfz/src/org-mode/lisp/)]
  2022-05-30 14:42   ` Gregor Zattler
@ 2022-05-31  5:01     ` Ihor Radchenko
  2022-06-01 15:36       ` Gregor Zattler
  0 siblings, 1 reply; 8+ messages in thread
From: Ihor Radchenko @ 2022-05-31  5:01 UTC (permalink / raw)
  To: Gregor Zattler; +Cc: emacs-orgmode

Gregor Zattler <grfz@gmx.de> writes:

> Now I realized, that even after quitting and restarting
> Emacs, I cannot insert a timestamp, I get the following
> error message:
>
> org-parse-time-string: Not an Org time string: [20zznn22-05-30 Mo 11:34]
>
> And then there is a dangling
>
> CLOCK:
>
> line without timestamps at the expected line in my org file.
>
> It took a while till I realized that there was a corrupted
> timestamp in my org file a few clock lines below.
>
> It would be helpful, if the message contained the file name
> and probably even the line number.

Could you please create an example file and detail the steps how you got
the error?

Best,
Ihor


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

* Re: [BUG] org-element-warnings when accidentially inserting "z" into timestamp [9.5.3 (release_9.5.3-471-gebbef7.dirty @ /home/grfz/src/org-mode/lisp/)]
  2022-05-31  5:01     ` Ihor Radchenko
@ 2022-06-01 15:36       ` Gregor Zattler
  2022-06-03  6:04         ` [BUG, confirmed] org-clock-in calling org-clock-sum fails leaving incomplete CLOCK line when encountering existing malformed CLOCK lines Ihor Radchenko
  0 siblings, 1 reply; 8+ messages in thread
From: Gregor Zattler @ 2022-06-01 15:36 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: emacs-orgmode

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

Hi Ihor,
* Ihor Radchenko <yantar92@gmail.com> [2022-05-31; 13:01]:
> Gregor Zattler <grfz@gmx.de> writes:
>
>> Now I realized, that even after quitting and restarting
>> Emacs, I cannot insert a timestamp, I get the following
>> error message:
>>
>> org-parse-time-string: Not an Org time string: [20zznn22-05-30 Mo 11:34]
>>
>> And then there is a dangling
>>
>> CLOCK:
>>
>> line without timestamps at the expected line in my org file.
>>
>> It took a while till I realized that there was a corrupted
>> timestamp in my org file a few clock lines below.
>>
>> It would be helpful, if the message contained the file name
>> and probably even the line number.
>
> Could you please create an example file and detail the steps how you got
> the error?

Please see the attached test.org and call Emacs like so:


/usr/local/bin/emacs-29.0.50 -Q -L ~/src/org-mode/lisp /tmp/test.org --eval '(switch-to-buffer "test.org")' -f org-clock-in



[-- Attachment #2: test.org --]
[-- Type: application/x-org, Size: 153 bytes --]

[-- Attachment #3: Type: text/plain, Size: 51 bytes --]



Thanks for looking into this.

Ciao; Gregor

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

* [BUG, confirmed] org-clock-in calling org-clock-sum fails leaving incomplete CLOCK line when encountering existing malformed CLOCK lines
  2022-06-01 15:36       ` Gregor Zattler
@ 2022-06-03  6:04         ` Ihor Radchenko
  2022-10-13  6:15           ` Ihor Radchenko
  0 siblings, 1 reply; 8+ messages in thread
From: Ihor Radchenko @ 2022-06-03  6:04 UTC (permalink / raw)
  To: Gregor Zattler; +Cc: emacs-orgmode

Gregor Zattler <grfz@gmx.de> writes:

>>> org-parse-time-string: Not an Org time string: [20zznn22-05-30 Mo 11:34]
>>>
>>> And then there is a dangling
>>>
>>> CLOCK:
>>>
>>> line without timestamps at the expected line in my org file.
>>>
>>> It took a while till I realized that there was a corrupted
>>> timestamp in my org file a few clock lines below.
>>
>> Could you please create an example file and detail the steps how you got
>> the error?
>
> Please see the attached test.org and call Emacs like so:
>
>
> /usr/local/bin/emacs-29.0.50 -Q -L ~/src/org-mode/lisp /tmp/test.org --eval '(switch-to-buffer "test.org")' -f org-clock-in

Thanks!
Confirmed using the described steps.

This is an omission in org-clock-sum.
When parsing clock lines (which org-clock-sum considers as any line
starting from word CLOCK:), org-clock-sum calls org-parse-time-string.
The latter throws the error you are seeing.

The problem have been present at lest since Org 9.1.9.
An easy fix would be catching the error and ignoring erroneous headline.
An alternative could be also throwing a warning or more informative
error.
Another alternative could be using org-element and only parsing real
clock objects + adding org-lint checker for malformed clock lines.
org-lint checker will be useful in any case though.

I do not consider this as a pressing issue, so I am just leaving the
possible solutions above. And patches are welcome :)

Best,
Ihor


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

* Re: [BUG, confirmed] org-clock-in calling org-clock-sum fails leaving incomplete CLOCK line when encountering existing malformed CLOCK lines
  2022-06-03  6:04         ` [BUG, confirmed] org-clock-in calling org-clock-sum fails leaving incomplete CLOCK line when encountering existing malformed CLOCK lines Ihor Radchenko
@ 2022-10-13  6:15           ` Ihor Radchenko
  2022-10-14 18:52             ` Gregor Zattler
  0 siblings, 1 reply; 8+ messages in thread
From: Ihor Radchenko @ 2022-10-13  6:15 UTC (permalink / raw)
  To: Gregor Zattler; +Cc: emacs-orgmode

Ihor Radchenko <yantar92@gmail.com> writes:

>> Please see the attached test.org and call Emacs like so:
>>
>>
>> /usr/local/bin/emacs-29.0.50 -Q -L ~/src/org-mode/lisp /tmp/test.org --eval '(switch-to-buffer "test.org")' -f org-clock-in
>
> Thanks!
> Confirmed using the described steps.

Fixed on main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=3790bf8ea1d070055a989f0b9587948e07877977

-- 
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] 8+ messages in thread

* Re: [BUG, confirmed] org-clock-in calling org-clock-sum fails leaving incomplete CLOCK line when encountering existing malformed CLOCK lines
  2022-10-13  6:15           ` Ihor Radchenko
@ 2022-10-14 18:52             ` Gregor Zattler
  0 siblings, 0 replies; 8+ messages in thread
From: Gregor Zattler @ 2022-10-14 18:52 UTC (permalink / raw)
  To: emacs-orgmode

Hi Ihor,
* Ihor Radchenko <yantar92@gmail.com> [2022-10-13; 14:15 +08]:
> Ihor Radchenko <yantar92@gmail.com> writes:
>>> Please see the attached test.org and call Emacs like so:
>>> /usr/local/bin/emacs-29.0.50 -Q -L ~/src/org-mode/lisp /tmp/test.org --eval '(switch-to-buffer "test.org")' -f org-clock-in
>> Confirmed using the described steps.
>
> Fixed on main.
> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=3790bf8ea1d070055a989f0b9587948e07877977

thanks, I now get an iformational message in such cases.
This allows for searching for the culprit.

Ciao,
--
Gregor


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

end of thread, other threads:[~2022-10-14 18:55 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-30 10:02 [BUG] org-element-warnings when accidentially inserting "z" into timestamp [9.5.3 (release_9.5.3-471-gebbef7.dirty @ /home/grfz/src/org-mode/lisp/)] Gregor Zattler
2022-05-30 11:51 ` Ihor Radchenko
2022-05-30 14:42   ` Gregor Zattler
2022-05-31  5:01     ` Ihor Radchenko
2022-06-01 15:36       ` Gregor Zattler
2022-06-03  6:04         ` [BUG, confirmed] org-clock-in calling org-clock-sum fails leaving incomplete CLOCK line when encountering existing malformed CLOCK lines Ihor Radchenko
2022-10-13  6:15           ` Ihor Radchenko
2022-10-14 18:52             ` Gregor Zattler

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