From: lorentey@elte.hu (Lőrentey Károly)
Cc: multi-tty@lists.fnord.hu, emacs-devel@gnu.org
Subject: Re: Emacs routinely gets stuck in single_kboard mode
Date: Sun, 11 Jul 2004 03:29:49 +0200 [thread overview]
Message-ID: <lorentey.l.multi-tty.87658v2uwi.elte@eris.elte.hu> (raw)
In-Reply-To: <E1BZcqu-0008R0-JK@fencepost.gnu.org> (Richard Stallman's message of "Sun, 13 Jun 2004 17:49:20 -0400")
Sorry for the long response time!
Richard Stallman <rms@gnu.org> writes:
> A possible third bug (and a definite inconvenience) is that entering a
> recursive edit (M-x recursive-edit) or a debug session like above sets
> single_kboard. Pressing C-g unfreezes the other keyboards without
> exiting the recursion, with no apparent bad side effects. The bug is
> either that the displays are frozen unnecessarily, or that C-g should
> not break out of single_kboard in this case.
>
> A recursive edit or debug session must set single_kboard,
> because the environment of the recursive edit or debug session
> would otherwise be imposed on all the other terminals.
I see, but if there are multiple frames, then that recursive
environment is imposed on them, and AFAICS in that case this only
results in some small inconveniences that are easy to work around. I
have only seen exactly these same effects when C-g exited
single_kboard, no new bugs. So why are multiple displays different
from frames in this particular case? Did I miss some important edge
case in the implementation? Input event processing in Emacs is still
a hazy area for me.
By the way, the biggest such inconvenience I have found is a small
wrinkle that appears when I forget about a minibuffer prompt and
switch to another frame. It is reproducible in the CVS trunk, too:
emacs -q --eval '(setq enable-recursive-minibuffers t)'
C-x 5 2
<First frame> C-x C-f
<Second frame> M-x
(Note that the cursor in the first frame returns to
the *scratch* buffer's window)
<Second frame> C-g
At this point, the C-x C-f prompt is still there in the minibuffer,
but the minibuffer window is active in neither frame. What is more,
pressing C-x o to return to the minibuffer to finish (or cancel) the
command only works in the second frame, not in the first where it was
initiated. (I seem to remember that Emacs 19/20 behaved more
intuitively, but I am not able to test that now.)
> This is part of the reason why we discourage use of recursive edit.
> It cannot be avoided unless we implement multi-threading in Emacs.
>
> Does this fix that bug?
Yes, the patch does prevent C-g from unfreezing the other displays.
> *** keyboard.c 11 Jun 2004 21:54:28 -0400 1.778
> --- keyboard.c 13 Jun 2004 16:19:43 -0400
> ***************
> *** 1158,1164 ****
>
> Vinhibit_quit = Qnil;
> #ifdef MULTI_KBOARD
> ! any_kboard_state ();
> #endif
>
> return make_number (0);
> --- 1158,1165 ----
>
> Vinhibit_quit = Qnil;
> #ifdef MULTI_KBOARD
> ! if (command_loop_level == 0 && minibuf_level == 0)
> ! any_kboard_state ();
> #endif
>
> return make_number (0);
--
Károly
next prev parent reply other threads:[~2004-07-11 1:29 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-07 7:45 Emacs routinely gets stuck in single_kboard mode Lőrentey Károly
2004-06-13 21:49 ` Richard Stallman
2004-07-11 1:29 ` Lőrentey Károly [this message]
2004-07-11 3:55 ` Lőrentey Károly
2004-07-11 23:23 ` Richard Stallman
2004-07-12 23:58 ` Richard Stallman
2004-07-13 16:55 ` Lőrentey Károly
2004-07-11 23:23 ` Richard Stallman
2004-07-12 6:18 ` Lőrentey Károly
2004-07-12 23:57 ` Richard Stallman
2004-07-13 17:12 ` Lőrentey Károly
2004-07-13 23:49 ` David Kastrup
2004-07-14 18:26 ` Richard Stallman
2004-07-15 22:22 ` Lőrentey Károly
2004-07-16 16:08 ` Richard Stallman
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=lorentey.l.multi-tty.87658v2uwi.elte@eris.elte.hu \
--to=lorentey@elte.hu \
--cc=emacs-devel@gnu.org \
--cc=multi-tty@lists.fnord.hu \
/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.