From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: Derek Upham <sand@blarg.net>
Cc: emacs-devel@gnu.org
Subject: Re: read_char() does not detect, handle special-event-map buffer changes
Date: Thu, 07 Feb 2013 11:25:31 -0500 [thread overview]
Message-ID: <jwvsj58cd2l.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87k3qk18m6.fsf@priss.frightenedpiglet.com> (Derek Upham's message of "Thu, 07 Feb 2013 06:50:09 -0800")
> in a separate terminal. Move focus back to Emacs before the signal goes
> out. Hit `q' in the new buffer and Emacs will complain about "*foo*"
> being read-only. The second time you hit `q', Emacs will exit view mode
> and bury the buffer.
I think this is a known problem: the set of active keymaps is determined
at the end of the previous command, so any change performed via
something like a special-event-map binding or a process-filter will bump
into this problem (you don't even need to switch-to-buffer, just
enabling view-mode is sufficient).
It's a bug: we should instead wait until the first key is pressed
before figuring out the active keymaps.
Problem is, this bug is in read_key_sequence, which is a pretty
scary function.
In the mean time, you can work around the bug by adding to
unread-command-event (from your sigusr1-handler) a dummy event that is
bound in global-map to something like `ignore'.
Stefan
next prev parent reply other threads:[~2013-02-07 16:25 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-04 8:36 read_char() does not detect, handle special-event-map buffer changes Derek Upham
2013-02-07 6:33 ` Derek Upham
2013-02-07 14:50 ` Derek Upham
2013-02-07 16:25 ` Stefan Monnier [this message]
2013-02-08 4:39 ` Derek Upham
2013-02-08 7:35 ` Michael Albinus
2013-02-08 15:32 ` Derek Upham
2013-02-08 16:11 ` Michael Albinus
2013-02-09 5:31 ` Derek Upham
2013-02-11 19:22 ` Stefan Monnier
2013-02-12 5:29 ` Derek Upham
2013-02-12 14:02 ` 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=jwvsj58cd2l.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.org \
--cc=sand@blarg.net \
/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.