emacs-devel
[Top][All Lists]
Advanced

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

Re: poplife-mode


From: Stefan Monnier
Subject: Re: poplife-mode
Date: Sun, 12 Nov 2017 11:46:50 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

> I just read up on how Drew's library `mouse3' solves the problem.  If
> I understood it right, it redefines mouse-save-then-kill (mouse-3's
> normal binding) to respond differently to either a double-click of
> mouse-3 or two single-clicks of mouse-3 in the same spot.  A
> double-click kills the region as it usually does, whereas two
> single-clicks pop up a contextual menu with menu items based on either
> the "thing at point" (if no region is selected) or the selected
> region.  This also seems like o good solution.

FWIW, I think a better UI is to pop a menu for a "long press".
I.e. bind it to down-mouse-3 but wait a little and if there's not been
any "mouse-up" event with 1s or so, then pop up the contextual menu.

I think this should actually be provided in core: down-mouse-3 should be
bound to a command implementing this, with some standardized way to find
a contextual menu (looking at local char-properties, and if not
found, buffer-local variable).


        Stefan




reply via email to

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