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

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

Re: I-search: Clicking in minibuf during I-search fails.


From: Juri Linkov
Subject: Re: I-search: Clicking in minibuf during I-search fails.
Date: Sat, 20 Oct 2007 02:52:18 +0300
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (gnu/linux)

> That works well. I will definitely use this patch since I have been
> clicking in that echo area during searches for years (and always
> wishing that it did something).
>
> There is some unwanted behavior with this patch.
>  - On initially clicking into the bar the cursor is at the end of the
> string, when then clicking into the middle of the string, the
> minibuffer to the left of the cursor position is highlighted, and
> therefore copied.  This would prevent me from say pasting into the
> middle of a search string using the mouse.  There is no problem
> however using the keyboard to navigate to the selected place in the
> string and then pasting.

Actually this bug is not caused by my patch, but it exists in CVS.
It can be reproduced by typing `C-s string M-e' or `C-s RET',
and clicking mouse-1 in the minibuffer.  This makes the selection on
the minibuffer prompt instead of putting point to a different place.

This bug is caused by the hack in `isearch-edit-string' that uses

    (let ((cursor-in-echo-area t))
         (read-event))

before reading the search string in the minibuffer with
`read-from-minibuffer'.  When clicking mouse-1 in `read-event'
above, it incorrectly handles the mouse click.

This hack is used to start reading words after `C-s RET C-w' for word
search.  A simpler solution I think would be to bind `C-w' in
minibuffer-local-isearch-map to change the search type after typing
C-w in the minibuffer that read the search string, but it seems
it can't change the prompt from "I-search:" to "Word I-search:"
when the prompt is already displayed by read-from-minibuffer.

-- 
Juri Linkov
http://www.jurta.org/emacs/




reply via email to

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