From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#4117: 23.1; isearch + isearch-allow-scroll loses shift Date: Mon, 17 Aug 2009 03:47:57 +0300 Organization: JURTA Message-ID: <8763cn1bne.fsf@mail.jurta.org> 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> <19079.19475.169507.668553@winooski.ccs.neu.edu> Reply-To: Juri Linkov , 4117@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1250473671 28265 80.91.229.12 (17 Aug 2009 01:47:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 17 Aug 2009 01:47:51 +0000 (UTC) Cc: 4117@emacsbugs.donarmstrong.com To: Eli Barzilay Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Aug 17 03:47:44 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 1McrK1-00029L-7D for geb-bug-gnu-emacs@m.gmane.org; Mon, 17 Aug 2009 03:47:41 +0200 Original-Received: from localhost ([127.0.0.1]:48634 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1McrK0-0000dQ-PJ for geb-bug-gnu-emacs@m.gmane.org; Sun, 16 Aug 2009 21:47:40 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1McrJL-0000JB-VP for bug-gnu-emacs@gnu.org; Sun, 16 Aug 2009 21:47:00 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1McrJG-0000EV-Kr for bug-gnu-emacs@gnu.org; Sun, 16 Aug 2009 21:46:58 -0400 Original-Received: from [199.232.76.173] (port=46359 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1McrJG-0000E1-22 for bug-gnu-emacs@gnu.org; Sun, 16 Aug 2009 21:46:54 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:46716) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1McrJF-0007OP-CC for bug-gnu-emacs@gnu.org; Sun, 16 Aug 2009 21:46: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 n7H1ko8N022277; Sun, 16 Aug 2009 18:46:51 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n7H1Z3gK020211; Sun, 16 Aug 2009 18:35:03 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Juri Linkov Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Mon, 17 Aug 2009 01:35:03 +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.125047258519334 (code B ref 4117); Mon, 17 Aug 2009 01:35:03 +0000 Original-Received: (at 4117) by emacsbugs.donarmstrong.com; 17 Aug 2009 01:29:45 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from mx1.starman.ee (smtp-out1.starman.ee [85.253.0.3]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7H1ThWp019324 for <4117@emacsbugs.donarmstrong.com>; Sun, 16 Aug 2009 18:29:45 -0700 X-Virus-Scanned: by Amavisd-New at mx1.starman.ee Original-Received: from mail.starman.ee (82.131.54.10.cable.starman.ee [82.131.54.10]) by mx1.starman.ee (Postfix) with ESMTP id 443353F4298; Mon, 17 Aug 2009 04:29:37 +0300 (EEST) In-Reply-To: <19079.19475.169507.668553@winooski.ccs.neu.edu> (Eli Barzilay's message of "Sat, 15 Aug 2009 20:00:19 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (x86_64-pc-linux-gnu) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Sun, 16 Aug 2009 21:46: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:30285 Archived-At: >> 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. Could you try the following hack: Index: lisp/isearch.el =================================================================== RCS file: /sources/emacs/emacs/lisp/isearch.el,v retrieving revision 1.345 diff -u -r1.345 isearch.el --- lisp/isearch.el 14 Feb 2009 09:04:46 -0000 1.345 +++ lisp/isearch.el 17 Aug 2009 00:47:38 -0000 @@ -1900,6 +1905,12 @@ ((and isearch-allow-scroll (progn (setq key (isearch-reread-key-sequence-naturally keylist)) (setq keylist (listify-key-sequence key)) + (when this-command-keys-shift-translated + (setq keylist (list + (event-convert-list + (append (cons 'shift (event-modifiers keylist)) + (list (event-basic-type keylist)))))) + (setq this-command-keys-shift-translated nil)) (setq main-event (aref key 0)) (setq scroll-command (isearch-lookup-scroll-key key)))) ;; From this point onwards, KEY, KEYLIST and MAIN-EVENT hold a -- Juri Linkov http://www.jurta.org/emacs/