emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug: Reclocking errors out if org-log-note-clock-out is t [9.4.6 (9.4.6-gab9f2a @ /gnu/store/2pny4z6mbi2aybgzzxz0yrzkds7hbpmq-emacs-org-9.4.6/share/emacs/site-lisp/org-9.4.6/)]
@ 2021-05-30  0:53 Jorge P. de Morais Neto
  2021-05-30  1:39 ` Jorge P. de Morais Neto
  2021-05-31 13:43 ` Ihor Radchenko
  0 siblings, 2 replies; 5+ messages in thread
From: Jorge P. de Morais Neto @ 2021-05-30  0:53 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Elisp to reproduce the bug --]
[-- Type: application/emacs-lisp, Size: 317 bytes --]

[-- Attachment #2: Type: text/plain, Size: 1966 bytes --]

Hi.  I use Emacs from Guix---package emacs-next installed from Git
master (through --with-branch=emacs-next=master) and updated weekly.
Org is also from Guix: packages emacs-org{,-contrib,-drill,-pdftools}

To reproduce the bug, save the attached file¹ then invoke:
    emacs -q -l /PATH/TO/org-log-note-clock-out--bug.el --batch

- Expected behavior: Org should clock in the first heading, then clock
  out from it, prompt for a note, and clock in the second heading (in
  batch mode, Emacs should print some clocking messages and then exit
  successfully).
- What happens: Org errors out:
  user-error: Before first headline at position 164 in buffer *Org Note*

I stepped through the code and verified the error is triggered at line
1726 on file org-clock.el.  This is the form
    (org-back-to-heading t)
on function `org-clock-remove-empty-clock-drawer'.  That function runs
as a hook because of line 1717 on file `org-clock.el':
    (run-hooks 'org-clock-out-hook)
on function `org-clock-out'.

Then using git-bisect, I have determined the bug was introduced on
commit c670379adfbdc4883d3cfa230289fd2829993265.  I am sorry for not
providing a patch.

As a temporary workaround, I have erased my customization of
`org-log-note-clock-out'.

Regards

¹ Do you prefer this kind of small file to be attached to the mail
message as I have done here or should I have included it in the mail
body?

Emacs  : GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, cairo version 1.16.0)
Package: Org mode version 9.4.6 (9.4.6-gab9f2a @ /gnu/store/2pny4z6mbi2aybgzzxz0yrzkds7hbpmq-emacs-org-9.4.6/share/emacs/site-lisp/org-9.4.6/)
-- 
- <https://stallmansupport.org> "In Support of Richard Stallman"
- I am Brazilian.  I hope my English is correct and I welcome feedback.
- Free Software Supporter: <https://www.fsf.org/free-software-supporter>
- If an email of mine arrives at your spam box, please notify me.

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

end of thread, other threads:[~2021-09-26  6:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-30  0:53 Bug: Reclocking errors out if org-log-note-clock-out is t [9.4.6 (9.4.6-gab9f2a @ /gnu/store/2pny4z6mbi2aybgzzxz0yrzkds7hbpmq-emacs-org-9.4.6/share/emacs/site-lisp/org-9.4.6/)] Jorge P. de Morais Neto
2021-05-30  1:39 ` Jorge P. de Morais Neto
2021-05-31 13:43 ` Ihor Radchenko
2021-06-07 15:15   ` Jorge P. de Morais Neto
2021-09-26  6:04   ` Bastien

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