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#22272: 24.5; nonfunctional Emacs with a bad global mode (post-command-hook). Date: Wed, 30 Dec 2015 20:04:56 +0200 Message-ID: <83ziwrbynr.fsf@gnu.org> References: <87fuykxunv.fsf@tosh-laptop.i-did-not-set--mail-host-address--so-tickle-me> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1451498725 21527 80.91.229.3 (30 Dec 2015 18:05:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 30 Dec 2015 18:05:25 +0000 (UTC) Cc: 22272@debbugs.gnu.org To: brubar.cs@gmail.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Dec 30 19:05:15 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 1aEL7Z-0005A1-JG for geb-bug-gnu-emacs@m.gmane.org; Wed, 30 Dec 2015 19:05:13 +0100 Original-Received: from localhost ([::1]:53327 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aEL7V-0002pd-AM for geb-bug-gnu-emacs@m.gmane.org; Wed, 30 Dec 2015 13:05:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40649) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aEL7R-0002pI-W8 for bug-gnu-emacs@gnu.org; Wed, 30 Dec 2015 13:05:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aEL7N-0000hZ-Ve for bug-gnu-emacs@gnu.org; Wed, 30 Dec 2015 13:05:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:43008) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aEL7N-0000hM-SX for bug-gnu-emacs@gnu.org; Wed, 30 Dec 2015 13:05:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aEL7N-0000nm-KO for bug-gnu-emacs@gnu.org; Wed, 30 Dec 2015 13:05:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 30 Dec 2015 18:05: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.14514986553003 (code B ref 22272); Wed, 30 Dec 2015 18:05:01 +0000 Original-Received: (at 22272) by debbugs.gnu.org; 30 Dec 2015 18:04:15 +0000 Original-Received: from localhost ([127.0.0.1]:50610 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aEL6d-0000mN-77 for submit@debbugs.gnu.org; Wed, 30 Dec 2015 13:04:15 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:49524) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aEL6c-0000mB-9x for 22272@debbugs.gnu.org; Wed, 30 Dec 2015 13:04:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aEL6T-0000Mi-Ca for 22272@debbugs.gnu.org; Wed, 30 Dec 2015 13:04:09 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:57808) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aEL6T-0000Me-9H; Wed, 30 Dec 2015 13:04:05 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1246 helo=HOME-C4E4A596F7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aEL6S-0003ID-Hi; Wed, 30 Dec 2015 13:04:05 -0500 In-reply-to: <87fuykxunv.fsf@tosh-laptop.i-did-not-set--mail-host-address--so-tickle-me> (brubar.cs@gmail.com) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:111038 Archived-At: > From: brubar.cs@gmail.com > Date: Wed, 30 Dec 2015 08:28:04 +0100 > > This report is about a possible improvement. The "bug" arises only after > a programming mistake. > > Please find attached a recipe to reproduce a stupid thing I've done. > > I was trying to define a new global minor mode. I ended up placing a > function that raises an unhandled error in `post-command-hook'. > > Then, I had to kill my Emacs; I found no other way to recover control. > > As the `post-command-hook' documentation says, Emacs could probably > do better here by discarding my non-working code. > > 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?