GNU bug report logs - #4994
23.1.50; reftex-isearch-minor-mode does not restore to the original point

Previous Next

Package: emacs;

Reported by: Leo <sdl.web <at> gmail.com>

Date: Fri, 20 Nov 2009 17:40:04 UTC

Severity: normal

Done: Juri Linkov <juri <at> jurta.org>

Bug is archived. No further changes may be made.

Full log


Message #15 received at 4994 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Juri Linkov <juri <at> jurta.org>
To: 4994 <at> debbugs.gnu.org
Cc: Leo <sdl.web <at> gmail.com>
Subject: Re: 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
>> 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/



This bug report was last modified 15 years and 146 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.