unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#14308: 24.3.50; Better error messages for `timer-event-handler'
@ 2013-04-29 17:26 Michael Heerdegen
  2013-05-04 20:15 ` Stefan Monnier
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Heerdegen @ 2013-04-29 17:26 UTC (permalink / raw)
  To: 14308

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


Hi,

since some time, `timer-event-handler' messages error messages in case
of errors (when debug-on-error is nil).  This is good!

However, in my experience these messages as such are currently not very
helpful.  E.g I get a message like

|  Error running timer: (error "Selecting deleted buffer")

Mmh.

I can try setting `debug-on-error' to t (which is a pain in the
ass as long as `user-error' is not very widespread, btw) and hope that
it "happens again".  But it would be better if the message would be more
informative.  E.g. we would win a lot with doing this:


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

*** /home/micha/today/timer.el	2013-04-29 19:14:33.352241368 +0200
--- /home/micha/today/timer-new.el	2013-04-29 19:15:17.727761145 +0200
***************
*** 313,319 ****
                ;; and it can be hellish to track down their source.
                (save-current-buffer
                  (apply (timer--function timer) (timer--args timer)))
! 	    (error (message "Error in timer: %S" err)))
  	  (when (and retrigger (memq timer timer-list)) ;; Stefans fix
              (setf (timer--triggered timer) nil)))
        (error "Bogus timer event"))))
--- 313,319 ----
                ;; and it can be hellish to track down their source.
                (save-current-buffer
                  (apply (timer--function timer) (timer--args timer)))
! 	    (error (message "Error in timer function %s: %S" (timer--function timer) err)))
  	  (when (and retrigger (memq timer timer-list)) ;; Stefans fix
              (setf (timer--triggered timer) nil)))
        (error "Bogus timer event"))))

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


It would at least reveal where I have to dig.  Better ideas appreciated!


Regards,

Michael.



In GNU Emacs 24.3.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.4.2)
 of 2013-04-27 on dex, modified by Debian
 (emacs-snapshot package, version 2:20130427-1)
Windowing system distributor `The X.Org Foundation', version 11.0.11204000
System Description:	Debian GNU/Linux 7.0 (wheezy)


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

* bug#14308: 24.3.50; Better error messages for `timer-event-handler'
  2013-04-29 17:26 bug#14308: 24.3.50; Better error messages for `timer-event-handler' Michael Heerdegen
@ 2013-05-04 20:15 ` Stefan Monnier
  2013-05-06  1:59   ` Michael Heerdegen
  0 siblings, 1 reply; 6+ messages in thread
From: Stefan Monnier @ 2013-05-04 20:15 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: 14308

> ! 	    (error (message "Error in timer: %S" err)))
[...]
> ! 	    (error (message "Error in timer function %s: %S" (timer--function timer) err)))

Looks good to me.  Tho please use %S rather than %s.


        Stefan





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

* bug#14308: 24.3.50; Better error messages for `timer-event-handler'
  2013-05-04 20:15 ` Stefan Monnier
@ 2013-05-06  1:59   ` Michael Heerdegen
  2013-05-06  7:26     ` Glenn Morris
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Heerdegen @ 2013-05-06  1:59 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 14308

Stefan Monnier <monnier@IRO.UMontreal.CA> writes:

> > ! 	    (error (message "Error in timer: %S" err)))
> [...]
> > !  (error (message "Error in timer function %s: %S" (timer--function
> > timer) err)))
>
> Looks good to me.  Tho please use %S rather than %s.

Ok.  Please install.


Thanks,

Michael.





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

* bug#14308: 24.3.50; Better error messages for `timer-event-handler'
  2013-05-06  1:59   ` Michael Heerdegen
@ 2013-05-06  7:26     ` Glenn Morris
  2013-05-06 16:08       ` Michael Heerdegen
  0 siblings, 1 reply; 6+ messages in thread
From: Glenn Morris @ 2013-05-06  7:26 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: 14308

Michael Heerdegen wrote:

> Stefan Monnier <monnier@IRO.UMontreal.CA> writes:
>
>> > ! 	    (error (message "Error in timer: %S" err)))
>> [...]
>> > !  (error (message "Error in timer function %s: %S" (timer--function
>> > timer) err)))
>>
>> Looks good to me.  Tho please use %S rather than %s.
>
> Ok.  Please install.

AFAICS, equivalent code already was installed, 2 weeks before this
report was opened?

http://lists.gnu.org/archive/html/emacs-diffs/2013-04/msg00061.html





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

* bug#14308: 24.3.50; Better error messages for `timer-event-handler'
  2013-05-06  7:26     ` Glenn Morris
@ 2013-05-06 16:08       ` Michael Heerdegen
  2013-05-06 16:20         ` Michael Heerdegen
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Heerdegen @ 2013-05-06 16:08 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 14308

Glenn Morris <rgm@gnu.org> writes:

> AFAICS, equivalent code already was installed, 2 weeks before this
> report was opened?
>
> http://lists.gnu.org/archive/html/emacs-diffs/2013-04/msg00061.html

Indeed.  But why don't I "have" this change in my "GNU Emacs 24.3.50.1
x86_64-pc-linux-gnu, GTK+ Version 3.4.2) of 2013-04-27 on dex,
modified by Debian" (i.e., emacs-snapshot)?


Michael.





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

* bug#14308: 24.3.50; Better error messages for `timer-event-handler'
  2013-05-06 16:08       ` Michael Heerdegen
@ 2013-05-06 16:20         ` Michael Heerdegen
  0 siblings, 0 replies; 6+ messages in thread
From: Michael Heerdegen @ 2013-05-06 16:20 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 14308

Michael Heerdegen <michael_heerdegen@web.de> writes:

> Indeed.  But why don't I "have" this change in my "GNU Emacs 24.3.50.1
> x86_64-pc-linux-gnu, GTK+ Version 3.4.2) of 2013-04-27 on dex,
> modified by Debian" (i.e., emacs-snapshot)?

Because I had used a local copy of timer.el in the meantime.  It was
created before I had Stefan's change.

Thanks, Stefan and Glenn!


Regards,

Michael.





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

end of thread, other threads:[~2013-05-06 16:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-29 17:26 bug#14308: 24.3.50; Better error messages for `timer-event-handler' Michael Heerdegen
2013-05-04 20:15 ` Stefan Monnier
2013-05-06  1:59   ` Michael Heerdegen
2013-05-06  7:26     ` Glenn Morris
2013-05-06 16:08       ` Michael Heerdegen
2013-05-06 16:20         ` Michael Heerdegen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.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).