[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: middle mouse paste into isearch minibuffer
From: |
Drew Adams |
Subject: |
RE: middle mouse paste into isearch minibuffer |
Date: |
Fri, 11 Nov 2011 06:40:06 -0800 |
> "Drew Adams" <drew.adams@oracle.com> writes:
> > Try this, Perry:
> >
> > (defun isearch-mouse-2 (click)
> > "..."
> > (interactive "e")
> > (isearch-yank-x-selection)
> > (deactivate-mark t))
>
> What is supposed to happen there?
1. Select text with mouse.
2. C-s.
3. Click `mouse-2'.
The selected text becomes the text to find (the search string), and the first
occurrence is sought/found.
It might not work for everyone in every Emacs version. If your isearch.el
already has function `isearch-mouse-2', and if your mouse selection fills the X
selection, then it should work. It should work in Emacs 24 with a graphic
display, for example.
> Maybe I'm not understanding what Perry is trying to do. As I
> understood it, P would like to paste what ever is in highlighted
> buffer on middle mouse, into C-s.
He selects first, then hits `C-s', then clicks `mouse-2'. Otherwise, what you
say is what he's trying to do.
> You mean while holding C-s with left hand right?
No - see above.
> And you also assume running emacs in X right?
Yes, AFAIK. Something needs to put the selected text into the X selection, so
that `isearch-yank-x-selection' can retrieve it.