From: Stefan Monnier <monnier@iro.umontreal.ca>
To: help-gnu-emacs@gnu.org
Subject: Re: shift+up received as <select>, breaking Emacs 24 "shift select" (like pc-select)
Date: Wed, 27 Apr 2011 13:20:08 -0300 [thread overview]
Message-ID: <jwviptzrcis.fsf-monnier+gnu.emacs.help@gnu.org> (raw)
In-Reply-To: 15fd4c48-8dc4-4449-88d6-a06bd4af4f93@glegroupsg2000goo.googlegroups.com
> For what it's worth, <shift>+<up> is <select> in Emacs 23, too.
Indeed, it's the case at least since Emacs-20. Do the following:
a a a a a <shift>+<up> C-h l
You'll see that the events received from the terminal were: a a a a
a ESC [ 1 ; 2 A C-h l and hence Emacs translated ESC [ 1 ; 2 A to <select>.
Now the question is why did Emacs translated ESC [ 1 ; 2 A to <select>
rather than to S-<up>. lisp/term/xterm.el says:
(define-key map "\e[1;2A" [S-up])
so Emacs's own data seems correct. But this data is overridden by the
data provided by the terminfo database, so my guess is that the terminfo
database is incorrect (and/or that the byte sequences sent by those
terminal emulators for S-up and select are the same, so the database is
not incorrect, but the result is still undesirable).
You should be able to work around the issue with something like:
(define-key input-decode-map "\e[1;2A" [S-up])
And for this to take effect at the right time, you will have to use in
your .emacs something like:
(if (equal "xterm" (tty-type))
(define-key input-decode-map "\e[1;2A" [S-up]))
and if you use Emacs with multiple terminals, you'll additionally need:
(defadvice terminal-init-xterm (after select-shift-up activate)
(define-key input-decode-map "\e[1;2A" [S-up]))
This is a bit cumbersome, so feel free to file a bug-report about it.
> This isn't a 24 issue, the only difference is that 24 defaults to
> shift+direction = select, which seems broken for "up".
It's not broken for "up", it's just that Emacs thinks you've just hit
<select> and hence doesn't realize you've used a shifted key.
Stefan
next prev parent reply other threads:[~2011-04-27 16:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-26 17:46 shift+up received as <select>, breaking Emacs 24 "shift select" (like pc-select) Brett Hoerner
2011-04-26 18:59 ` Brett Hoerner
2011-04-27 16:20 ` Stefan Monnier [this message]
2011-04-28 0:49 ` Brett Hoerner
2011-05-01 14:44 ` Thomas E. Dickey
2011-05-02 14:04 ` 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=jwviptzrcis.fsf-monnier+gnu.emacs.help@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=help-gnu-emacs@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.