From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#18331: 24.4.50; REGRESSION, no `C-h k' for `C-g' Date: Wed, 27 Aug 2014 18:30:15 +0300 Message-ID: <83mwaqj6go.fsf@gnu.org> References: <87mwar8xr1.fsf@geodiff-mac3.ulb.ac.be> <83vbpfjd8f.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1409153491 14729 80.91.229.3 (27 Aug 2014 15:31:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 27 Aug 2014 15:31:31 +0000 (UTC) Cc: theonewiththeevillook@yahoo.fr, 18331@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Aug 27 17:31:23 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XMfBr-00044g-Kr for geb-bug-gnu-emacs@m.gmane.org; Wed, 27 Aug 2014 17:31:15 +0200 Original-Received: from localhost ([::1]:60192 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XMfBr-0000ie-8c for geb-bug-gnu-emacs@m.gmane.org; Wed, 27 Aug 2014 11:31:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35373) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XMfBj-0000iO-Lo for bug-gnu-emacs@gnu.org; Wed, 27 Aug 2014 11:31:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XMfBf-0003be-2W for bug-gnu-emacs@gnu.org; Wed, 27 Aug 2014 11:31:07 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:46792) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XMfBe-0003ba-Vw for bug-gnu-emacs@gnu.org; Wed, 27 Aug 2014 11:31:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XMfBe-00040R-Fj for bug-gnu-emacs@gnu.org; Wed, 27 Aug 2014 11:31:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 27 Aug 2014 15:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18331 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 18331-submit@debbugs.gnu.org id=B18331.140915341615343 (code B ref 18331); Wed, 27 Aug 2014 15:31:02 +0000 Original-Received: (at 18331) by debbugs.gnu.org; 27 Aug 2014 15:30:16 +0000 Original-Received: from localhost ([127.0.0.1]:53735 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XMfAs-0003zO-L0 for submit@debbugs.gnu.org; Wed, 27 Aug 2014 11:30:15 -0400 Original-Received: from mtaout27.012.net.il ([80.179.55.183]:57418) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XMfAn-0003y5-1a for 18331@debbugs.gnu.org; Wed, 27 Aug 2014 11:30:13 -0400 Original-Received: from conversion-daemon.mtaout27.012.net.il by mtaout27.012.net.il (HyperSendmail v2007.08) id <0NAZ0030012P9E00@mtaout27.012.net.il> for 18331@debbugs.gnu.org; Wed, 27 Aug 2014 18:24:41 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout27.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NAZ00NTR1H44B60@mtaout27.012.net.il>; Wed, 27 Aug 2014 18:24:41 +0300 (IDT) In-reply-to: <83vbpfjd8f.fsf@gnu.org> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:92717 Archived-At: > Date: Tue, 26 Aug 2014 21:51:44 +0300 > From: Eli Zaretskii > Cc: theonewiththeevillook@yahoo.fr, 18331@debbugs.gnu.org > > > Date: Tue, 26 Aug 2014 11:34:11 -0700 (PDT) > > From: Drew Adams > > 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;