all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: brubar.cs@gmail.com
Cc: 22272@debbugs.gnu.org
Subject: bug#22272: 24.5; nonfunctional Emacs with a bad global mode (post-command-hook).
Date: Wed, 30 Dec 2015 20:04:56 +0200	[thread overview]
Message-ID: <83ziwrbynr.fsf@gnu.org> (raw)
In-Reply-To: <87fuykxunv.fsf@tosh-laptop.i-did-not-set--mail-host-address--so-tickle-me> (brubar.cs@gmail.com)

> 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?





  reply	other threads:[~2015-12-30 18:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-30  7:28 bug#22272: 24.5; nonfunctional Emacs with a bad global mode (post-command-hook) brubar.cs
2015-12-30 18:04 ` Eli Zaretskii [this message]
2015-12-30 19:02   ` Bruno BARBIER
2015-12-30 20:28     ` Michael Heerdegen
2015-12-31  6:40       ` Bruno BARBIER
2015-12-31 20:31         ` Michael Heerdegen
2015-12-31 20:33 ` bug#22272: Close 22272 Michael Heerdegen

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=83ziwrbynr.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=22272@debbugs.gnu.org \
    --cc=brubar.cs@gmail.com \
    /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.