[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#10022: 24.0.91; `isearch-mouse-2' relies on `x-get-selection' - NG f
bug#10022: 24.0.91; `isearch-mouse-2' relies on `x-get-selection' - NG for Windows etc.
Fri, 18 Nov 2011 14:13:07 -0500
Gnus/5.13 (Gnus v5.13) Emacs/24.0.91 (gnu/linux)
>> To the extent that isearch only binds mouse-2 in the minibuffer (yes,
>> it technically also binds it in the main buffer, but to a command that
>> just delegates to the normal binding), I don't think
>> down-mouse-2 should default to `ignore', except maybe in the minibuffer.
> What I meant was that a nil binding means pick up any currently
> effective (e.g. global) binding. If someone binds `down-mouse-2'
> globally (as I do) then that binding will be picked for Isearch also,
> and it might not be appropriate there.
But as I point out, the mouse-2 binding also runs the global binding
(tho indirectly, and except when in the minibuffer area), so running the
global binding of down-mouse-2 seems like the right thing to do.
>> so it really doesn't seem like a bug for it to fail when there is
>> no GUI selection
> The bug would presumably be that `x-get-selection' returns nil here,
?? What should it return if there's no GUI selection?
> Agreed. There is no change needed for vanilla Emacs 24.
> The only changes I have made are (a) for a non-nil option
> `isearchp-mouse-2-flag' (yank the non-empty region)
As mentioned on gnu.emacs.help (which may not have gotten to
address@hidden :-( ), users should already be able to get such
(define-key isearch-mode-map [mouse-2] 'isearch-yank-x-selection)
but this wouldn't override select-active-region (which is a separate
issue, although your isearchp-mouse-2-flag controls both).