unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>, emacs-devel@gnu.org
Subject: RE: poplife-mode
Date: Sun, 12 Nov 2017 17:36:33 -0800 (PST)	[thread overview]
Message-ID: <91be4692-f10a-465d-bd73-1a1b6bd2271f@default> (raw)
In-Reply-To: <jwvfu9jv49m.fsf-monnier+gmane.emacs.devel@gnu.org>

> > 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.

That is similar, yes.  But in practice what happens (in my
experience) is that a second click follows, which might or
might not be quick enough to be considered a double-click.

IOW, a "faulty" double-click is handled by `mouse3.el'
as an extension of a successful/true double-click.

Since double-click for `mouse-3' kills the selected text,
if a region is active and the second click is not quick
enough to be the second part of a double-click, you can
still kill the text, by choosing `Kill', which is the
first item in the (default) menu provided by `mouse3.el'.

This is also a good way for users to discover the
possibilities of a mouse-3 contextual menu: stumble
on it by double-clicking too slowly (and choosing `Kill'
to finish it off).  (Someone who clicks slowly or unevenly
might also be a particularly good candidate as someone who
appreciates being able to use the menu.)

Note too that with `mouse3.el' a second click of `mouse-3'
provides different menus, depending on whether the active
region is empty.  If it is empty then the menu applies to
the mouse-click position (it is the same position for both
clicks).  If the region is non-empty then the menu applies
to the region.

(Sure, that two-menu system could be transferred to the
long-mouse-3-press that you suggest instead.)

FWIW, I've never been a fan of of a
longer-press-means-different-behavior UI.  My impression
(but I'm not a user of it) is that this behavior is clunky
in CUA-mode, for example.

Better, I think, to depend on the single timing that users
are alrady used to, which applies to all of their apps
equally, and which they have already configured if they
don't want the default delay: the double-click delay.

What I just said also echoes what Eli said about your
suggestion:

  Is it a good idea to invent a UI that is unlike anything
  out there in any other GUI application, at least AFAIK?
  Last time Emacs did that there was no other app around,
  but not so nowadays...

The double-click delay, on the other hand, is something
that pretty much everyone is used to.

> 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).

I don't think I can agree, here, if only because in some
contexts users/libraries end up defining a behavior for
`down-mouse-3', with an `ignore' behavior of `mouse-3',
and in other contexts (or other users or other libraries)
do the opposite: act upon `mouse-3' and ignore on
`down-mouse-3'.  Even the platform can make a difference
in such a choice, IIRC.

In any case, there must be some way for users to opt out
of any such mouse-3 behavior.  The behavior of `mouse3.el',
which is highly configurable, is 100% optional.



  parent reply	other threads:[~2017-11-13  1:36 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-05  1:00 poplife-mode Tak Kunihiro
2017-11-05  5:52 ` poplife-mode Drew Adams
2017-11-11 12:47 ` poplife-mode Charles A. Roelli
2017-11-11 15:01   ` poplife-mode Stefan Monnier
2017-11-12 13:55     ` poplife-mode Charles A. Roelli
2017-11-12 16:46       ` poplife-mode Stefan Monnier
2017-11-12 16:54         ` poplife-mode Eli Zaretskii
2017-11-12 17:47           ` poplife-mode Stefan Monnier
2017-11-12 19:17             ` poplife-mode Yuri Khan
2017-11-12 20:32               ` poplife-mode Charles A. Roelli
2017-11-12 20:36               ` poplife-mode Stefan Monnier
2017-11-13  5:03                 ` poplife-mode Yuri Khan
2017-11-12 18:06         ` poplife-mode Stefan Monnier
2017-11-12 20:24           ` poplife-mode Charles A. Roelli
2017-11-13  8:11             ` poplife-mode Tak Kunihiro
2017-11-13 14:36               ` poplife-mode Drew Adams
2017-11-13 23:03                 ` poplife-mode Tak Kunihiro
2017-11-14  0:48                   ` poplife-mode Drew Adams
2017-11-14 23:26                     ` poplife-mode Tak Kunihiro
2017-11-14 23:40                       ` poplife-mode Drew Adams
2017-11-13  1:36         ` Drew Adams [this message]
2017-11-13  3:40         ` poplife-mode Drew Adams
2017-11-13  4:06           ` poplife-mode Stefan Monnier
2017-11-13 14:36             ` poplife-mode Drew Adams
2017-11-13 15:24               ` poplife-mode Stefan Monnier
2017-11-13 17:08                 ` poplife-mode Drew Adams
2017-11-13 20:20                   ` poplife-mode Stefan Monnier
2017-11-13 21:56                     ` poplife-mode Drew Adams
2017-11-13 23:13                       ` poplife-mode Stefan Monnier
2017-11-13 23:08                     ` Changing default mouse bindings (was: poplife-mode) Alex
2017-11-14  2:50                       ` Changing default mouse bindings Stefan Monnier
2017-11-14  7:07                         ` Yuri Khan
2017-11-14 16:34                           ` Stefan Monnier
2017-11-14 15:13                         ` Eli Zaretskii
2017-11-14 16:35                           ` Stefan Monnier
2017-11-14 16:38                             ` Eli Zaretskii
     [not found]                         ` <<838tf8lwqn.fsf@gnu.org>
2017-11-14 15:35                           ` Drew Adams
2017-11-14 16:58                             ` Eli Zaretskii
     [not found]                         ` <<<838tf8lwqn.fsf@gnu.org>
     [not found]                           ` <<69307385-5625-48dc-9611-ad7f0b6bd529@default>
     [not found]                             ` <<83r2t0kdaz.fsf@gnu.org>
2017-11-14 19:47                               ` Drew Adams
2017-11-14 20:26                       ` Changing default mouse bindings (was: poplife-mode) Charles A. Roelli
2017-11-14 23:11                         ` Changing default mouse bindings Tak Kunihiro
2017-11-15  3:16                           ` Stefan Monnier
2017-11-16 23:21                             ` Tak Kunihiro
2017-11-17  7:23                               ` Eli Zaretskii
2017-11-17 15:28                                 ` Stefan Monnier
2018-01-10  4:34                                   ` Tak Kunihiro
     [not found]                               ` <<838tf5id1e.fsf@gnu.org>
2017-11-17 15:31                                 ` Drew Adams
2017-11-17 16:25                       ` Sam Steingold
2017-11-13 23:16                 ` poplife-mode Tak Kunihiro
     [not found]   ` <<jwvy3ncx3kx.fsf-monnier+gmane.emacs.devel@gnu.org>
     [not found]     ` <<m2h8tzppod.fsf@aurox.ch>
2017-11-13  1:06       ` poplife-mode Drew Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=91be4692-f10a-465d-bd73-1a1b6bd2271f@default \
    --to=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).