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

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

bug#23007: 24.5; buggy interactive search with middle click


From: Alex
Subject: bug#23007: 24.5; buggy interactive search with middle click
Date: Mon, 29 May 2017 13:56:25 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

tags 23007 patch
quit

Vincent Lefevre <vincent@vinc17.net> writes:

> 1. Start Emacs with its own UI under X Window.
>
> 2. Type: M-<
>    Here the cursor is at the beginning of the buffer, which contains
>    some text.
>
> 3. In some other window, select some text (e.g. the letter "n").
>
> 4. Type: C-s
>    This starts the interactive search. It says:
>    I-search:
>
> 5. Click with the middle button near the bottom of the window.
>    This pastes the text at the end of the buffer.
>
> 6. Type: C-_
>    This removes the pasted text and moves the cursor back at the
>    beginning of the buffer.
>
> 7. Type: C-s
>    This starts the interactive search again. But this time, it says:
>    I-search:  [No previous search string]
>
> 8. Type: e
>    This searches for "e". All the occurrences of "e" are highlighted.
>
> 9. Type: <down>
>    This is no longer the interactive search, but the occurrences of "e"
>    are still highlighted.
>
> Typing other letters brings back to the interactive search.

This is because clicking the middle button during isearch calls
isearch-mouse-2, which calls the usual mouse-yank-primary, which calls
isearch-done to finish isearch. Problem is, it let-binds
overriding-terminal-local-map around this call, which counteracts
isearch-done setting this variable to nil. The end result is having quit
isearch, but with the overriding map still in place.

I have attached a simple patch below. Eli, if it's satisfactory, would
you commit it for me?

TIA

Attachment: 0001-Limit-scope-of-local-overriding-terminal-local-map.patch
Description: patch


reply via email to

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