bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#16035: 24.3.50; Custom isearch broken on trunk (e.g. change-log-mode


From: Juri Linkov
Subject: bug#16035: 24.3.50; Custom isearch broken on trunk (e.g. change-log-mode)
Date: Fri, 06 Dec 2013 02:57:22 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu)

>> +(defvar isearch-saved-overriding-local-map nil)
>
> Oops, now that I see it, I think this one deserves a double-dash.
>
>>    (setq overriding-terminal-local-map isearch-mode-map)
>>    (run-hooks 'isearch-mode-hook)
>> +  (setq isearch-saved-overriding-local-map overriding-terminal-local-map)
>
> Please include a comment referring either to folding-isearch or to this bug.

The patch is installed now including these corrections.

Now I discovered another case that fails to move point
after exiting Isearch.  Running `multi-isearch-buffers'
and typing e.g. `C-a' exits Isearch but doesn't move point
to the beginning of the line.

The problem is that `multi-isearch-buffers' let-binds
`multi-isearch-buffer-list' to the list of buffers,
and invokes `isearch-forward' without NO-RECURSIVE-EDIT,
so dynamic binding of `multi-isearch-buffer-list' is
available for Isearch to get the next buffer to search.

But after exiting in `isearch-pre-command-hook',
`isearch-done' calls `exit-recursive-edit'
that prevents this-command from executing
(in this case `move-beginning-of-line' is not executed).

So `isearch-forward' in `multi-isearch-buffers'
should be invoked with non-nil NO-RECURSIVE-EDIT argument, and
then `multi-isearch-buffer-list' needs to be a global variable.

Exactly the same problem exists in `dired-isearch-filenames'
that let-binds `dired-isearch-filenames' and calls `isearch-forward'
without NO-RECURSIVE-EDIT.  And in `comint-history-isearch-backward'
that let-binds `comint-history-isearch'.  These variables
should be global.  Maybe this is not the right solution,
but I have no better ideas. 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]