emacs-devel
[Top][All Lists]
Advanced

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

RE: poplife-mode


From: Drew Adams
Subject: RE: poplife-mode
Date: Mon, 13 Nov 2017 06:36:10 -0800 (PST)

> >> 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.
> >
> > The active region is not visible as such until `mouse-3'
> > is released (the up event).
> 
> It doesn't matter, in my UI suggestion. You can either
> do: (short) click => do good ol' mouse-save-then-kill
> press-and-hold => pop up a contextual menu

The point was not about simply killing the region text.
Of course you can kill it using a single, normal click.
That's true of `mouse3.el', as well.  That's nothing new.

The point was about being able to act on the active
region in other ways, with a contextual menu appropriate
to the region being active.

(Being able to.  Nothing _requires_ you to have a menu
that is sensitive to the region being active.)

Again: the region is not highlighted until `mouse-3'
is released (up event).  You should be able to see
the region if you intend to act on it.

> > So even if this could be made to provide a menu for
> > acting on the region, the region would not be visible.
> 
> It's visible if it was activated by an earlier command,
> of course.  E.g. "mouse-3" followed by "down-mouse-3".

Pressing and holding down `mouse-3' does _not_ highlight
the region.  That happens only when `mouse-3' is released.

If you mean first click `mouse-3' (press and release)
and then press and hold `mouse-3', then you are talking
about _two_ `mouse-3' clicks (it will be released) -
similar to what `mouse3.el' does.

Besides not highlighting the region that is active and
can be acted on, your approach has the disadvantage of
mistakenly killing the region when an intended long
press happens to be a bit too short.

With the `mouse3.el' approach you can't mistakenly
kill the region.  Instead, the menu is available if
you mistakenly click too slowly, giving you another
chance to kill the region.  IOW, it's the other way
around.

> > The `mouse3.el' code intentionally provides for
> > two menus:
> >  * One for actions on the active region...
> >  * One for other actions...
> 
> My suggestion doesn't attempt to provide that.

Right.  Nothing to reflect/distinguish the context
of the region being active.

So again:

>> I think a better UI is to pop a menu for a "long press".
>          ^^^^^^^^^^^
> Why do you think so?

What's better about it?



reply via email to

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