bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#22272: 24.5; nonfunctional Emacs with a bad global mode (post-comman


From: Bruno BARBIER
Subject: bug#22272: 24.5; nonfunctional Emacs with a bad global mode (post-command-hook).
Date: Wed, 30 Dec 2015 20:02:10 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

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.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]