GNU bug report logs - #21313
25.0.50; Strange errors from dbus-handle-event

Previous Next

Package: emacs;

Reported by: Tassilo Horn <tsdh <at> gnu.org>

Date: Fri, 21 Aug 2015 16:28:01 UTC

Severity: normal

Found in version 25.0.50

Done: Tassilo Horn <tsdh <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Tassilo Horn <tsdh <at> gnu.org>
Cc: michael.albinus <at> gmx.de, 21313 <at> debbugs.gnu.org
Subject: bug#21313: 25.0.50; Strange errors from dbus-handle-event
Date: Fri, 16 Oct 2015 10:02:08 +0300
> From: Tassilo Horn <tsdh <at> gnu.org>
> Cc: michael.albinus <at> gmx.de,  21313 <at> debbugs.gnu.org
> Date: Fri, 16 Oct 2015 06:53:19 +0200
> 
> > I think I found the problem: the call to Fformat eventually calls
> > print_object, which calls QUIT, which resets quit-flag.
> 
> I've seen it now.  Well, that's not what I would have expected.

You should expect any potentially prolonged operation to call QUIT
somewhere in its loop.  That's standard Emacs coding practice, meant
to make Emacs more responsive.

> > So you need to change the beginning of read_char like this:
> >
> >   ptrdiff_t count = SPECPDL_INDEX ();
> >   specbind (Qinhibit_quit, Qt);
> >   AUTO_STRING (format, "%S");
> >   printf ("record_char: %s\n", SSDATA (CALLN (Fformat, format, c)));
> >   unbind_to (count, Qnil);
> 
> Yes, that works.  So that's the C version of (let ((inhibit-quit t))
> ...).  So specbind creates a dynamic binding, and with unbind_to you pop
> entries up to a given index again, right?

Yes.  See Flet (modulo the clutter) for a definitive evidence.

(Btw, unwind-protect is implemented using the same mechanism in C.)




This bug report was last modified 9 years and 211 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.