[Top][All Lists]

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

Re: Context menus and mouse-3

From: Juri Linkov
Subject: Re: Context menus and mouse-3
Date: Thu, 17 Sep 2020 10:43:59 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)

>>> - Horizontal scroll by wheel is supported.
>>> - Moving text using mouse is supported.
>> Please explain how horizontal scroll by wheel is supported.
>> Also please explain how moving text using mouse is supported.
> Try something like this.
> (setq mouse-wheel-tilt-scroll t)

I tried this, but still it doesn't scroll horizontally
with the mouse wheel.  It seems this feature expects the
mouse events mouse-6 and mouse-7, but scrolling the mouse wheel
produces mouse-4 and mouse-5.

> (setq mouse-drag-and-drop-region 'meta)

I tried this with (setq mouse-drag-and-drop-region 'control)
and it moves the text without modifier, and copies the text
when the modifier key is pressed immediately before releasing
the mouse button.  In other apps, the modifier key can be pressed
before clicking the mouse button.

>> Thanks, this is a good starting point for adding contextual menu.
>> I tried poplife-mode, and it pops up the menu on mouse-3,
>> but it seems only when there is the selection already,
>> i.e. it doesn't pop up the menu when nothing is selected.
>> Is this intended to work this way?
> That’s not intended behavior!
> I found that for unknown reason, poplife-mode does not overwrite
> [mouse-3] started with emacs -Q.  I’ll fix it and come back
> soon while the topic is hot.
> I fixed it and confirm with Emacs -Q.  Can you try again to see
> the approach to start with?

Now this is much better, thanks.

There are still some minor problems.  For example, when "Paste"
is selected from the Context menu, it doesn't paste the text
where mouse-3 was clicked.  It still pastes at the current cursor

Also the Context menu is not activated immediately after clicking
down-mouse-3.  It's activated only after mouse-3 is released.
In other apps, down-mouse-3 can activate the Context menu.

reply via email to

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