From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bruno BARBIER Newsgroups: gmane.emacs.bugs Subject: bug#22272: 24.5; nonfunctional Emacs with a bad global mode (post-command-hook). Date: Wed, 30 Dec 2015 20:02:10 +0100 Message-ID: <20151230194329brubar.cs@gmail.com> References: <87fuykxunv.fsf@tosh-laptop.i-did-not-set--mail-host-address--so-tickle-me> <83ziwrbynr.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1451502201 18944 80.91.229.3 (30 Dec 2015 19:03:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 30 Dec 2015 19:03:21 +0000 (UTC) Cc: 22272@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Dec 30 20:03:10 2015 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 1aEM1c-00008H-Rk for geb-bug-gnu-emacs@m.gmane.org; Wed, 30 Dec 2015 20:03:09 +0100 Original-Received: from localhost ([::1]:53452 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aEM1c-0003ZL-28 for geb-bug-gnu-emacs@m.gmane.org; Wed, 30 Dec 2015 14:03:08 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54198) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aEM1Z-0003ZF-Bq for bug-gnu-emacs@gnu.org; Wed, 30 Dec 2015 14:03:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aEM1W-0007V0-6h for bug-gnu-emacs@gnu.org; Wed, 30 Dec 2015 14:03:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:43042) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aEM1W-0007Uw-3f for bug-gnu-emacs@gnu.org; Wed, 30 Dec 2015 14:03:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aEM1V-0003t3-Qu for bug-gnu-emacs@gnu.org; Wed, 30 Dec 2015 14:03:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Bruno BARBIER Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 30 Dec 2015 19:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22272 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 22272-submit@debbugs.gnu.org id=B22272.145150215814910 (code B ref 22272); Wed, 30 Dec 2015 19:03:01 +0000 Original-Received: (at 22272) by debbugs.gnu.org; 30 Dec 2015 19:02:38 +0000 Original-Received: from localhost ([127.0.0.1]:50644 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aEM18-0003sQ-2V for submit@debbugs.gnu.org; Wed, 30 Dec 2015 14:02:38 -0500 Original-Received: from mail-wm0-f41.google.com ([74.125.82.41]:37169) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aEM16-0003sD-DG for 22272@debbugs.gnu.org; Wed, 30 Dec 2015 14:02:36 -0500 Original-Received: by mail-wm0-f41.google.com with SMTP id f206so88208817wmf.0 for <22272@debbugs.gnu.org>; Wed, 30 Dec 2015 11:02:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=vQ8DJL7W7bkpKEYqk8zNymkmb9Ol6vsXI4C7IZaJZys=; b=W4Ct6T1nryGUmylsjFwEkFzv7vTe48Y6vJWQlEcXAj8k4aubzr/bjsodEOTI60LWqH O1Gx0GxWSYaYTQuyIabbDq6j74Ajh0B0a4fTrglZXwRjfSUlRFTZk7/qbqodOG+497QH bI8ZFJEEHOakdnxpEQCK3wBtLTY5fkbepcBrpT40EklkkiZMXfxTELoQitNLrPj/iYrR FuhhZ1ELWnrFx0byQJeaMRCE1QVU1TkFkQCDPWWa4v2Cm2ELIwicDw7ty2vh0RnVM1bd vOt9LgCDSIFzlIExla2LlGBAVvSmnoMWFNC4mQOJXzokHr7reqCeaDN30bIWdima7Rr5 CXTA== X-Received: by 10.28.13.138 with SMTP id 132mr77908892wmn.62.1451502150739; Wed, 30 Dec 2015 11:02:30 -0800 (PST) Original-Received: from gmail.com (sta21-6-78-240-71-23.fbx.proxad.net. [78.240.71.23]) by smtp.gmail.com with ESMTPSA id q129sm24162562wmd.14.2015.12.30.11.02.27 (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 30 Dec 2015 11:02:29 -0800 (PST) Original-Received: by gmail.com (nbSMTP-1.00) for uid 1000 (using TLSv1/SSLv3 with cipher AES128-SHA (128/128 bits)) brubar.cs@gmail.com; Wed, 30 Dec 2015 20:02:13 +0100 (CET) Content-Disposition: inline In-Reply-To: <83ziwrbynr.fsf@gnu.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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:111041 Archived-At: On Wed, Dec 30, 2015 at 08:04:56PM +0200, Eli Zaretskii wrote: > > From: brubar.cs@gmail.com > > Date: Wed, 30 Dec 2015 08:28:04 +0100 > > ... > > To reproduce and *KILL YOUR EMACS*, launch a *NEW* Emacs like that: > > > > emacs -Q --load test-kill-your-emacs-with-global-mode.el A-NEW-FILE.txt --eval '(insert "modified")' --funcall BAD-global-mode > > > > I'm reporting this only to improve Emacs. I obviously fixed my code and > > Emacs is awesome again! > > Thanks. > The current ELisp manual says: > > Quitting is suppressed while running `pre-command-hook' and > `post-command-hook'. If an error happens while executing one of these > hooks, it does not terminate execution of the hook; instead the error > is silenced and the function in which the error occurred is removed > from the hook. > > Are you saying that this is inaccurate, and what actually happens is > something else? > I was referring to the documentation for the variable `post-command-hook' (sorry I wasn't clear about what documentation I was talking about), but it pretty much says the same: | If an unhandled error happens in running this hook, the function | in which the error occurred is unconditionally removed, since | otherwise the error might happen repeatedly and make Emacs | nonfunctional. What is happening to me when running my recipe above on Emacs 24.5: 1. the error is not silenced, 2. and the function is not removed. Thus, the error is constantly raised rendering Emacs nonfunctional. That's why I had to ask the OS to kill my Emacs. So, I'm saying Emacs could be slightly improved by following what the documentation says. Am I wrong ? Did the recipe fail to reproduce the behavior on your own Emacs ? Thanks for your prompt reply and for looking into this. Bruno.