From: "Jason S. Cornez" <jcornez@ravenpack.com>
To: 6585@debbugs.gnu.org
Subject: bug#6585: 23.1; Hang / CPU 100% on background interaction when in minibuffer
Date: Tue, 31 Aug 2010 17:09:49 +0200 [thread overview]
Message-ID: <4C7D1B3D.1030607@ravenpack.com> (raw)
In-Reply-To: <jwvvd6rdj44.fsf-monnier+emacs@gnu.org>
On 08/31/2010 03:09 PM, Stefan Monnier wrote:
> 100% agreement. Patch welcome,
>
>
> Stefan
How about something like this...
----8<----
src/keyboard.c /usr/local/emacs-23.2/src/keyboard.c
*** src/keyboard.c 2010-04-04 00:26:07.000000000 +0200
--- /usr/local/emacs-23.2/src/keyboard.c 2010-08-31
17:03:14.648740153 +0200
*************** interrupt_signal (signalnum) /* If we do
*** 11122,11127 ****
--- 11122,11136 ----
errno = old_errno;
}
+
+ /* JSC: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=6585 */
+
+ /* If emacs is stuck because `inhibit-quit' is true, then keep track
+ of the number of times C-g has been requested. If C-g is pressed 3
+ times, then quit anyway. If `debug-on-quit' is true, then it is
+ honored when the quit occurs after the third C-g. */
+ static int force_quit_count;
+
/* This routine is called at interrupt level in response to C-g.
It is called from the SIGINT handler or kbd_buffer_store_event.
*************** handle_interrupt ()
*** 11239,11246 ****
UNGCPRO;
}
else
! /* Else request quit when it's safe */
! Vquit_flag = Qt;
}
/* TODO: The longjmp in this call throws the NS event loop integration
off,
--- 11248,11266 ----
UNGCPRO;
}
else
! {
! /* Else request quit when it's safe */
! if (NILP (Vquit_flag))
! {
! force_quit_count = 0;
! }
! if (++force_quit_count == 3)
! {
! immediate_quit = 1;
! Vinhibit_quit = Qnil;
! }
! Vquit_flag = Qt;
! }
}
/* TODO: The longjmp in this call throws the NS event loop integration
off,
----8<----
This does indeed solve the problem for me. But I freely admit that I've
never done emacs development before and so something more may be
required or desired. Anyway, this is certain a start and I hope it helps.
Best,
-Jason
next prev parent reply other threads:[~2010-08-31 15:09 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-08 14:19 bug#6585: 23.1; Hang / CPU 100% on background interaction when in minibuffer Jason Cornez
2010-07-08 16:52 ` Eli Zaretskii
2010-07-09 7:06 ` Jason S. Cornez
2010-07-14 10:27 ` Jason S. Cornez
[not found] ` <handler.6585.B.12786062373280.ack@debbugs.gnu.org>
2010-07-15 12:05 ` Jason S. Cornez
2010-07-15 14:57 ` martin rudalics
2010-07-15 15:33 ` Jason S. Cornez
2010-07-16 8:27 ` martin rudalics
2010-07-16 8:39 ` Jason S. Cornez
2010-07-15 15:53 ` Johan Bockgård
2010-07-15 15:59 ` Jason S. Cornez
2010-08-31 6:42 ` Jason S. Cornez
2010-08-31 10:24 ` Stefan Monnier
2010-08-31 10:34 ` Jason S. Cornez
2010-08-31 13:09 ` Stefan Monnier
2010-08-31 15:09 ` Jason S. Cornez [this message]
2012-04-10 19:37 ` Stefan Monnier
2010-09-13 13:22 ` bug#6585: Patch welcome? Jason S. Cornez
2010-09-13 15:55 ` Stefan Monnier
2011-11-21 22:54 ` bug#6585: status of patch? Tim Connors
2011-11-22 21:47 ` Stefan Monnier
2011-11-23 7:02 ` Jason S. Cornez
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C7D1B3D.1030607@ravenpack.com \
--to=jcornez@ravenpack.com \
--cc=6585@debbugs.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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).