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#4994: 23.1.50; reftex-isearch-minor-mode does not restore to the original point Date: Fri, 20 Nov 2009 21:32:08 +0200 Organization: JURTA Message-ID: <87zl6hq8h1.fsf@mail.jurta.org> References: <87ocmxrp48.fsf@mail.jurta.org> Reply-To: Juri Linkov , 4994@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 1258747664 25272 80.91.229.12 (20 Nov 2009 20:07:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 20 Nov 2009 20:07:44 +0000 (UTC) Cc: Leo To: 4994@emacsbugs.donarmstrong.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Nov 20 21:07:37 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 1NBZlW-0008LX-BR for geb-bug-gnu-emacs@m.gmane.org; Fri, 20 Nov 2009 21:07:34 +0100 Original-Received: from localhost ([127.0.0.1]:33287 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NBZlV-0001LW-R6 for geb-bug-gnu-emacs@m.gmane.org; Fri, 20 Nov 2009 15:07:33 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NBZlQ-0001JO-Bk for bug-gnu-emacs@gnu.org; Fri, 20 Nov 2009 15:07:28 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NBZlL-0001I3-Pq for bug-gnu-emacs@gnu.org; Fri, 20 Nov 2009 15:07:28 -0500 Original-Received: from [199.232.76.173] (port=54563 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NBZlL-0001Hy-NA for bug-gnu-emacs@gnu.org; Fri, 20 Nov 2009 15:07:23 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:48032) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NBZlL-000865-3Y for bug-gnu-emacs@gnu.org; Fri, 20 Nov 2009 15:07:23 -0500 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 nAKK7LRY019115; Fri, 20 Nov 2009 12:07:21 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id nAKK04Al017602; Fri, 20 Nov 2009 12:00:04 -0800 Resent-Date: Fri, 20 Nov 2009 12:00:04 -0800 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Juri Linkov Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Fri, 20 Nov 2009 20:00:04 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 4994 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 4994-submit@emacsbugs.donarmstrong.com id=B4994.125874688517208 (code B ref 4994); Fri, 20 Nov 2009 20:00:04 +0000 Original-Received: (at 4994) by emacsbugs.donarmstrong.com; 20 Nov 2009 19:54: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-out3.starman.ee [85.253.0.5]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nAKJshNS017205 for <4994@emacsbugs.donarmstrong.com>; Fri, 20 Nov 2009 11:54:45 -0800 X-Virus-Scanned: by Amavisd-New at mx1.starman.ee Original-Received: from mail.starman.ee (82.131.34.117.cable.starman.ee [82.131.34.117]) by mx1.starman.ee (Postfix) with ESMTP id D4C0A3F4167; Fri, 20 Nov 2009 21:54:37 +0200 (EET) In-Reply-To: <87ocmxrp48.fsf@mail.jurta.org> (Juri Linkov's message of "Fri, 20 Nov 2009 21:08:07 +0200") 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: Fri, 20 Nov 2009 15:07:28 -0500 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:32781 Archived-At: >> 1. (reftex-isearch-minor-mode t) >> >> 2. now search a string in a LaTeX project that is split (via \input >> or \include) into many files >> >> 3. C-g to quit >> >> and you will see point can be left in a new buffer. >> >> For example, from the master file I initialised an isearch and when the >> point jumped to chap1.tex, I hit C-g. Point was left in chap1.tex >> instead of the original buffer where the command started. >> >> I am surprised by this behaviour so I'm wondering whether this is a bug. > > Thanks, good point. It seems C-g doesn't return to the initial search state. > I'll try to find a solution. Multi-buffer isearch has no chance to save the initial state because its setup is called too late - after the initial state (without additional information about the original buffer) is pushed to the stack. IOW, in `isearch-mode', `(isearch-push-state)' is called earlier than (run-hooks 'isearch-mode-hook) that sets up multi-buffer specific `isearch-push-state-function'. Changing the order of these lines fixes this bug. However, this change has a risk of breaking other things. So I need more time to test this fix. -- Juri Linkov http://www.jurta.org/emacs/