From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Daniel Colascione <dancol@dancol.org>
Cc: 17357@debbugs.gnu.org, Glyph <glyph@twistedmatrix.com>
Subject: bug#17357: 24.4.50; garbage characters when pasting in an OS X terminal
Date: Sun, 27 Apr 2014 23:55:22 -0400 [thread overview]
Message-ID: <jwv61lu2k4g.fsf-monnier+emacsbugs@gnu.org> (raw)
In-Reply-To: <535D9CB7.6070601@dancol.org> (Daniel Colascione's message of "Sun, 27 Apr 2014 17:11:35 -0700")
>> (global-set-key [(meta \])] 'something)
>> (global-set-key [(meta \[)] 'something-else)
> Your numeric keypad bindings should have broken too.
> Also, we bind these keys in xterm-function-map. Shouldn't that map
> override global-map?
No. The way input decoding takes place is very delicate and what "takes
priority" when is quite delicate.
Yes, a ?\M-\] binding in input-decode-map takes precedence over such
a binding in global-map.
But after reading ?\M-\] we don't have enough input (yet) to translate
that to something else, so Emacs has a choice to make:
- either wait for more input, in the hope that it will match one of the
bindings under the ?\M-\] prefix in input-decode-map.
- or stop right here since we do have a valid binding already (in the
global map).
And Emacs chooses option 2 because option 1 is too risky.
E.g. Option 1 would prevent ESC ESC ESC from working, since there's
pretty much always an ESC prefix in input-decode-map, so we'd always
"wait for more" after an ESC.
Maybe it would make sense to try and improve the input-decode-map
support with a way to say: if we've seen "ESC [", we have enough
evidence that there is a real escape sequence coming, so keep waiting
for input as long as it matches something in input-decode-map.
Stefan
next prev parent reply other threads:[~2014-04-28 3:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-27 7:47 bug#17357: 24.4.50; garbage characters when pasting in an OS X terminal Glyph
2014-04-27 17:27 ` Jan Djärv
2014-04-27 17:44 ` Daniel Colascione
2014-04-27 23:31 ` Daniel Colascione
2014-04-28 0:03 ` Glyph
2014-04-28 0:11 ` Daniel Colascione
2014-04-28 3:55 ` Stefan Monnier [this message]
2014-04-28 19:12 ` Glyph Lefkowitz
2020-09-09 12:14 ` Lars Ingebrigtsen
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=jwv61lu2k4g.fsf-monnier+emacsbugs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=17357@debbugs.gnu.org \
--cc=dancol@dancol.org \
--cc=glyph@twistedmatrix.com \
/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.