unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@jurta.org>
To: 15200@debbugs.gnu.org
Subject: bug#15200: isearch-other-meta-char and shift
Date: Tue, 27 Aug 2013 19:45:51 +0300	[thread overview]
Message-ID: <87fvtvgk00.fsf@mail.jurta.org> (raw)
In-Reply-To: <8761urkssh.fsf@mail.jurta.org> (Juri Linkov's message of "Tue, 27 Aug 2013 19:28:22 +0300")

Another problem is that shifted cursor motion keys
don't activate the region.  Test case:
`C-s S-right' exits isearch (OK),
moves cursor to the right (OK),
but doesn't activate the region (BUG).

The same bug is for other shift-selection keys:
`C-s S-C-right', `C-s S-C-f', `C-s S-M-f' don't activate
the region like they do outside of isearch.

I see that the shift key is swallowed by `read-key-sequence'
in `isearch-reread-key-sequence-naturally' called from
`isearch-other-meta-char'.

However, when the argument DONT-DOWNCASE-LAST of `read-key-sequence'
is non-nil, it doesn't translate shifted keys and leaves
shift-modifiers with them in `unread-command-events':

=== modified file 'lisp/isearch.el'
--- lisp/isearch.el	2013-07-05 20:15:32 +0000
+++ lisp/isearch.el	2013-08-27 16:38:41 +0000
@@ -2502,7 +2556,9 @@ (defun isearch-reread-key-sequence-natur
 Return the key sequence as a string/vector."
   (isearch-unread-key-sequence keylist)
   (let (overriding-terminal-local-map)
-    (read-key-sequence nil)))  ; This will go through function-key-map, if nec.
+    ;; This will go through function-key-map, if nec.
+    ;; The arg DONT-DOWNCASE-LAST prevents premature shift-translation.
+    (read-key-sequence nil nil t)))
 
 (defalias 'isearch-other-control-char 'isearch-other-meta-char)
 





  reply	other threads:[~2013-08-27 16:45 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-27 16:28 bug#15200: isearch-other-meta-char and shift Juri Linkov
2013-08-27 16:45 ` Juri Linkov [this message]
2013-08-28  0:27   ` Stefan Monnier
2013-08-28 16:42     ` Juri Linkov
2013-08-28 18:33       ` Stefan Monnier
2013-08-29  6:49         ` Juri Linkov
2013-08-29 12:30           ` Stefan Monnier
2013-09-01 18:45             ` Juri Linkov
2013-09-03  2:12               ` Stefan Monnier
2013-09-03  2:22                 ` Drew Adams
2013-09-16 22:09                 ` Juri Linkov
2013-09-17  1:21                   ` Stefan Monnier
2013-09-17  2:19                   ` Stefan Monnier
2013-10-07 23:35                     ` Juri Linkov
2013-10-08  3:07                       ` Stefan Monnier
2013-10-08 23:29                         ` Juri Linkov
2013-10-09  2:43                           ` 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

  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=87fvtvgk00.fsf@mail.jurta.org \
    --to=juri@jurta.org \
    --cc=15200@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).