From: Eli Zaretskii <eliz@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: theonewiththeevillook@yahoo.fr, 18331@debbugs.gnu.org
Subject: bug#18331: 24.4.50; REGRESSION, no `C-h k' for `C-g'
Date: Wed, 27 Aug 2014 18:30:15 +0300 [thread overview]
Message-ID: <83mwaqj6go.fsf@gnu.org> (raw)
In-Reply-To: <83vbpfjd8f.fsf@gnu.org>
> Date: Tue, 26 Aug 2014 21:51:44 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: theonewiththeevillook@yahoo.fr, 18331@debbugs.gnu.org
>
> > Date: Tue, 26 Aug 2014 11:34:11 -0700 (PDT)
> > From: Drew Adams <drew.adams@oracle.com>
> > Cc: 18331@debbugs.gnu.org
> >
> > > FWIW, I can't reproduce on GNU Emacs 24.4.50.3 (i686-pc-linux-gnu, GTK+
> > > Version 3.10.8) of 2014-08-26.
> >
> > Hopefully someone else will try with MS Windows or other platforms.
> >
> > For me (on Windows) it is 100% reproducible on all of the builds
> > I mentioned.
>
> I do see it, but only after evaluating that strange form. If I don't
> evaluate it, "C-h k" woks as expected.
This one was a bitch to debug. It happens on the release branch as
well, so solving it is a somewhat urgent and delicate matter.
The root cause here is that we call specbind (inside message3_nolog)
with quit-flag non-nil. What happens next is entirely unpredictable:
when specbind calls set_internal, the latter calls Fassq, which calls
QUIT after it examines every 4 members in the buffer's local
variables' list. If you are unlucky, Emacs QUITs in the middle of
that, and the entire "C-h k" command gets silently aborted.
I have no idea why this works in Emacs 24.3 and how using the
custom-set-variables form causes it to fail in the current version. I
did verify that in Emacs 24.3 we also call the same specbind with
quit-flag non-nil. In the current sources, before I evaluate the
custom-set-variables form, the call to Fassq leaves the loop very
quickly, and thus avoids the QUIT. This is all very strange, but I
think given the basic fact that Fassq is called when quit-flag is
non-nil, the rest is sheer luck (or lack thereof).
On GNU/Linux, I could only look into this in a -nw session, where we
never get to that specbind with quit-flag non-nil. So the problem
doesn't happen. Could someone please test this on GNU/Linux with a
GUI frame? The place to put the breakpoint is on line 10574 of
xdisp.c (it's inside iwith_echo_area_buffer), and define the breakpoint
commands like this:
p globals.f_Vquit_flag
xsymbol
continue
end
Then run the recipe reported in the beginning of this bug discussion.
I can fix this problem with the simple patch below. Does anyone see
any problems with it?
--- src/data.c~ 2014-08-03 08:43:52 +0300
+++ src/data.c 2014-08-27 18:28:13 +0300
@@ -1311,10 +1311,10 @@ set_internal (Lisp_Object symbol, Lisp_O
/* Find the new binding. */
XSETSYMBOL (symbol, sym); /* May have changed via aliasing. */
- tem1 = Fassq (symbol,
- (blv->frame_local
- ? XFRAME (where)->param_alist
- : BVAR (XBUFFER (where), local_var_alist)));
+ tem1 = assq_no_quit (symbol,
+ (blv->frame_local
+ ? XFRAME (where)->param_alist
+ : BVAR (XBUFFER (where), local_var_alist)));
set_blv_where (blv, where);
blv->found = 1;
next prev parent reply other threads:[~2014-08-27 15:30 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-25 21:36 bug#18331: 24.4.50; REGRESSION, no `C-h k' for `C-g' Drew Adams
2014-08-26 8:24 ` Nicolas Richard
2014-08-26 18:34 ` Drew Adams
2014-08-26 18:51 ` Eli Zaretskii
2014-08-27 15:30 ` Eli Zaretskii [this message]
2014-08-27 19:02 ` Glenn Morris
2014-09-04 15:12 ` Eli Zaretskii
[not found] <<f4b58f26-da70-420b-b531-d594350ebe32@default>
[not found] ` <<87mwar8xr1.fsf@geodiff-mac3.ulb.ac.be>
[not found] ` <<d25c5ce6-09a2-4778-ad4b-2b8efc203823@default>
[not found] ` <<83vbpfjd8f.fsf@gnu.org>
2014-08-26 19:01 ` Drew Adams
2014-08-27 15:14 ` Eli Zaretskii
[not found] ` <<83mwaqj6go.fsf@gnu.org>
2014-08-27 15:44 ` Drew Adams
[not found] ` <<2f298535-b3e1-4d79-b1ce-e5238819d98e@default>
[not found] ` <<83oav6j771.fsf@gnu.org>
2014-08-27 15:44 ` Drew Adams
2014-08-27 16:52 ` Eli Zaretskii
[not found] <<feb2ccb7-684f-4d98-9e42-c577e9ee4316@default>
[not found] ` <<83fvghkh8g.fsf@gnu.org>
2014-08-27 17:19 ` Drew Adams
2014-08-27 18:18 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83mwaqj6go.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=18331@debbugs.gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=theonewiththeevillook@yahoo.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.