emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug: org-src-mode tries to cancel a nil idle timer [9.1.13 (release_9.1.13-864-g5057e3 @ /Users/asf/.emacs.d/straight/build/org/)]
@ 2018-06-28 23:36 Andreas Fuchs
  2018-07-01 22:47 ` Nicolas Goaziou
  0 siblings, 1 reply; 2+ messages in thread
From: Andreas Fuchs @ 2018-06-28 23:36 UTC (permalink / raw)
  To: emacs-orgmode

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

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

I use org-src-mode with org-src-auto-save-idle-delay (set to 1s), and
after upgrading org to the latest master version, it's repeatedly
causing me trouble: When I open an org-src-mode buffer and close it with
C-c ', I repeatedly get the message "Error running timer:
(wrong-type-argument timerp nil)". The backtrace is for a compiled
function, but after disassembling, it's pretty clear that it's the
routine in the lambda in org-src-mode that tries to cancel
`org-src--auto-save-timer'.

Here are the steps that will do it for me, but I haven't been very lucky
reproducing this consistently:

(setq org-edit-src-auto-save-idle-delay 1
      org-edit-src-turn-on-auto-save nil)

1. Open an org file with elisp source code blocks
2. Use C-c ' on one of those blocks
3. Edit the buffer
4. Close the buffer after a while with C-c '

If it reproduces correctly, emacs shows the error above whenever it has
been idle for 1s.

The backtrace that I got is this:
Debugger entered--Lisp error: (wrong-type-argument timerp nil)
  signal(wrong-type-argument (timerp nil))
  cancel-timer(nil)
  #f(compiled-function () #<bytecode 0x410a61a5>)()
  apply(#f(compiled-function () #<bytecode 0x410a61a5>) nil)
  timer-event-handler([t 0 1 0 t #f(compiled-function () #<bytecode
0x410a61a5>) nil idle 0])

And here's the bottom of the disassembly for #<bytecode 0x410a61a5>:
42:4    discard
43      dup
44      not
45      goto-if-nil-else-pop 5
48      constant  cancel-timer
49      varref    org-src--auto-save-timer
50      call      1
51      discard
52      constant  nil
53      dup
54      varset    org-src--auto-save-timer
55:5    stack-set 1
57      unbind    1
58      return

I'm not sure how better to debug this, so please let me know if I can
provide more / better data. Thanks in advance!

Emacs  : GNU Emacs 26.1 (build 1, x86_64-apple-darwin13.4.0, Carbon Version
157 AppKit 1265.21)
 of 2018-04-15
Package: Org mode version 9.1.13 (release_9.1.13-864-g5057e3 @
/Users/asf/.emacs.d/straight/build/org/)
-- 
Andreas Fuchs, (http://|im:asf@|mailto:asf@)boinkor.net, antifuchs

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

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

* Re: Bug: org-src-mode tries to cancel a nil idle timer [9.1.13 (release_9.1.13-864-g5057e3 @ /Users/asf/.emacs.d/straight/build/org/)]
  2018-06-28 23:36 Bug: org-src-mode tries to cancel a nil idle timer [9.1.13 (release_9.1.13-864-g5057e3 @ /Users/asf/.emacs.d/straight/build/org/)] Andreas Fuchs
@ 2018-07-01 22:47 ` Nicolas Goaziou
  0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Goaziou @ 2018-07-01 22:47 UTC (permalink / raw)
  To: Andreas Fuchs; +Cc: emacs-orgmode

Hello,

Andreas Fuchs <asf@boinkor.net> writes:
> I use org-src-mode with org-src-auto-save-idle-delay (set to 1s), and
> after upgrading org to the latest master version, it's repeatedly
> causing me trouble: When I open an org-src-mode buffer and close it with
> C-c ', I repeatedly get the message "Error running timer:
> (wrong-type-argument timerp nil)". The backtrace is for a compiled
> function, but after disassembling, it's pretty clear that it's the
> routine in the lambda in org-src-mode that tries to cancel
> `org-src--auto-save-timer'.
>
> Here are the steps that will do it for me, but I haven't been very lucky
> reproducing this consistently:
>
> (setq org-edit-src-auto-save-idle-delay 1
>       org-edit-src-turn-on-auto-save nil)
>
> 1. Open an org file with elisp source code blocks
> 2. Use C-c ' on one of those blocks
> 3. Edit the buffer
> 4. Close the buffer after a while with C-c '
>
> If it reproduces correctly, emacs shows the error above whenever it has
> been idle for 1s.

Hopefully fixed in master. Could you confirm it?

Thank you.

Regards,

-- 
Nicolas Goaziou

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

end of thread, other threads:[~2018-07-01 22:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-28 23:36 Bug: org-src-mode tries to cancel a nil idle timer [9.1.13 (release_9.1.13-864-g5057e3 @ /Users/asf/.emacs.d/straight/build/org/)] Andreas Fuchs
2018-07-01 22:47 ` Nicolas Goaziou

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