all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Daniel Colascione <dan.colascione@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: [PATCH] Unconditional quit on SIGUSR2
Date: Mon, 28 Mar 2011 21:41:13 +0200	[thread overview]
Message-ID: <83aagfrq1y.fsf@gnu.org> (raw)
In-Reply-To: <4D90E199.2040809@gmail.com>

> Date: Mon, 28 Mar 2011 12:29:29 -0700
> From: Daniel Colascione <dan.colascione@gmail.com>
> CC: emacs-devel@gnu.org
> 
> On 3/28/2011 11:37 AM, Eli Zaretskii wrote:
> >>>> Killing Emacs destroys any transient state. The last-resort-quit
> >>>> approach doesn't.
> >>> You originally said "save edits or debug Emacs", see above.
> >>>
> >>> What transient state are we talking about?
> >> I'm talking about any state not already written out to more permanent
> >> storage --- that includes not only unsaved buffer contents, but tramp
> >> sessions, window configurations, various histories, and so on.
> > Isn't that part of handling a fatal signal?
> 
> Right --- but with a patch like mine, a lockup in font-lock or some 
> other obscure corner of the codebase isn't fatal anymore.

We are miscommunicating: I meant that delivering a SIGTERM will end up
in fatal_error_signal, which will save all that's worth saving, before
Emacs commits suicide.  Your patch achieves the same goal, as far as
saving unsaved work is concerned, except it uses SIGUSR2.

> We want to be able to interrupt code running in a tight loop in 
> situations when quit would normally be disabled, such as during 
> redisplay.  Quit is disabled during background work for a good reason, 
> so we shouldn't just rely on the normal quit mechanism.

If it is safe to interrupt font-lock with the method used by your
patch, it should be safe to enable quitting when redisplay calls
font-lock, right?  So maybe we should simply enable quite when
redisplay calls font-lock and disable it when font-lock returns back
to redisplay code which called it.  Then C-g will be able to interrupt
it.  Would that solve the problem with font-lock that gets stuck?




  reply	other threads:[~2011-03-28 19:41 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-28  7:14 [PATCH] Unconditional quit on SIGUSR2 Daniel Colascione
2011-03-28 11:48 ` Eli Zaretskii
2011-03-28 12:32   ` Julien Danjou
2011-03-28 14:32     ` Eli Zaretskii
2011-03-28 14:49       ` Julien Danjou
2011-03-28 13:38   ` Daniel Colascione
2011-03-28 14:47     ` Eli Zaretskii
2011-03-28 17:23       ` Daniel Colascione
2011-03-28 18:37         ` Eli Zaretskii
2011-03-28 19:29           ` Daniel Colascione
2011-03-28 19:41             ` Eli Zaretskii [this message]
2011-03-28 19:49               ` Daniel Colascione
2011-03-28 19:52                 ` Lennart Borgman
2011-03-28 19:56                   ` Daniel Colascione
2011-03-28 20:06                     ` Lennart Borgman
2011-03-28 20:12                       ` Daniel Colascione
2011-03-28 20:45                         ` Lennart Borgman
2011-03-28 21:13                           ` In praise of font-lock (Was: Re: [PATCH] Unconditional quit on SIGUSR2) Daniel Colascione
2011-03-28 21:27                             ` Lennart Borgman
2011-03-28 20:10                     ` [PATCH] Unconditional quit on SIGUSR2 chad
2011-03-28 22:00                 ` Eli Zaretskii
2011-03-28 22:08                   ` Daniel Colascione
2011-03-28 22:20                     ` chad
2011-03-29 17:55                       ` Daniel Colascione
2011-03-29 18:14                         ` Daniel Colascione
2011-04-25  2:16                         ` Daniel Colascione
2011-04-25  9:23                           ` joakim
2011-04-25  9:33                             ` Daniel Colascione
2011-04-25 13:32                           ` Stefan Monnier
2011-04-25 18:21                             ` Daniel Colascione
2011-04-25 18:43                               ` Stefan Monnier
2011-04-26 14:47                             ` Richard Stallman
2011-03-29 13:23         ` Tom Tromey
2011-03-29 14:25           ` Stefan Monnier
2011-03-29 14:47             ` Tom Tromey
2011-03-29 21:37               ` Stefan Monnier

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=83aagfrq1y.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=dan.colascione@gmail.com \
    --cc=emacs-devel@gnu.org \
    /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.