From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Barzilay Newsgroups: gmane.emacs.bugs Subject: bug#4117: 23.1; isearch + isearch-allow-scroll loses shift Date: Sat, 15 Aug 2009 20:00:19 -0400 Message-ID: <19079.19475.169507.668553@winooski.ccs.neu.edu> References: <19073.19554.183166.905858@winooski.ccs.neu.edu> <87bpmkhcdb.fsf@mail.jurta.org> <19075.22351.611859.436166@winooski.ccs.neu.edu> <873a7sy73p.fsf@mail.jurta.org> Reply-To: Eli Barzilay , 4117@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1250381234 28346 80.91.229.12 (16 Aug 2009 00:07:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 16 Aug 2009 00:07:14 +0000 (UTC) Cc: 4117@emacsbugs.donarmstrong.com To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Aug 16 02:07:07 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1McTH7-0006y3-Mp for geb-bug-gnu-emacs@m.gmane.org; Sun, 16 Aug 2009 02:07:06 +0200 Original-Received: from localhost ([127.0.0.1]:34764 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1McTH7-00034A-11 for geb-bug-gnu-emacs@m.gmane.org; Sat, 15 Aug 2009 20:07:05 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1McTH0-00033T-TR for bug-gnu-emacs@gnu.org; Sat, 15 Aug 2009 20:06:58 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1McTGx-00032Q-3D for bug-gnu-emacs@gnu.org; Sat, 15 Aug 2009 20:06:58 -0400 Original-Received: from [199.232.76.173] (port=57760 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1McTGw-00032D-D4 for bug-gnu-emacs@gnu.org; Sat, 15 Aug 2009 20:06:54 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:59470) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1McTGv-00083a-5u for bug-gnu-emacs@gnu.org; Sat, 15 Aug 2009 20:06:53 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7G06nB0014211; Sat, 15 Aug 2009 17:06:50 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n7G0583f013941; Sat, 15 Aug 2009 17:05:08 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Eli Barzilay Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sun, 16 Aug 2009 00:05:08 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 4117 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 4117-submit@emacsbugs.donarmstrong.com id=B4117.125038082212597 (code B ref 4117); Sun, 16 Aug 2009 00:05:08 +0000 Original-Received: (at 4117) by emacsbugs.donarmstrong.com; 16 Aug 2009 00:00:22 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from barzilay.org (winooski.ccs.neu.edu [129.10.115.117]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7G00Kcl012593 for <4117@emacsbugs.donarmstrong.com>; Sat, 15 Aug 2009 17:00:21 -0700 Original-Received: from eli by barzilay.org with local (Exim 4.66) (envelope-from ) id 1McTAZ-0006ut-5o; Sat, 15 Aug 2009 20:00:19 -0400 In-Reply-To: <873a7sy73p.fsf@mail.jurta.org> X-Mailer: VM 7.19 under Emacs 22.1.1 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Sat, 15 Aug 2009 20:06:58 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:30244 Archived-At: On Aug 16, Juri Linkov wrote: > >> This is just an analysis. I currently don't know what is the > >> right way to fix this. Maybe simply add the shift modifier back > >> to the key when `this-command-keys-shift-translated' to t after > >> `read-key-sequence'. > > > > This sounds like a good strategy, given that shift is now very > > useful in general. > > It's interesting that after loading s-region.el, your reported case > works correctly without fixes. > > So it seems the current core shift-selection is not the exact > re-implementation of s-region.el. I still believe that the problem is somewhere in how `isearch-other-meta-char' restores the key. FWIW, here is my hack; I can't even explain how it works since I was basically guessing my way trying to get the stupid thing to work. At least in v22, this would cause the key that is used to exit isearch to be replayed twice -- for example, using `C-x 2' would happen twice. It just happens that I'm personally much more likely to shift-arrow my way out of isearch than I am to splitting the window. (progn ;; original code: ;; (setq key (isearch-reread-key-sequence-naturally keylist)) ;; (setq keylist (listify-key-sequence key)) ;; ELI: use original prefix, so S-up keeps the S (let* ((key1 (isearch-reread-key-sequence-naturally keylist)) (keylist1 (listify-key-sequence key1))) (setq keylist (listify-key-sequence key)) ; original key (setq keylist (append keylist (nthcdr (length keylist) keylist1))) (setq key key1) (setq main-event (aref key 0)) (setq scroll-command (isearch-lookup-scroll-key key)))) -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://barzilay.org/ Maze is Life!