emacs-devel
[Top][All Lists]
Advanced

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

RE: Why mouse-1/2/3 ?


From: Drew Adams
Subject: RE: Why mouse-1/2/3 ?
Date: Mon, 27 Apr 2020 09:00:50 -0700 (PDT)

> Neither have you managed to convince me that mouse-1-2-3 is valuable.
> I've seen one moderately convincing point about this relating to left-
> handed mice (suggesting that buttons should really be called inner,
> middle, and outer),

Which is "inner"/"outer"?  Just as problematic, if
not more so.  Maybe use medical terminology, using
anatomical terms of location - dorsal, ventral,
proximal, distal, etc.?

YAGNI.  Not sure whether "molehill" or "rabbit hole"
is the better label for this discussion now.  But
it's interesting, if only to consider whether those
who adopted `mouse-[1|2|3]' for Emacs were thinking
at all, or were just hopelessly un-"modern".

> but I haven't seen much of an argument in support
> of 1, 2, 3 except "that's how Emacs does it.

So you would use `mouse-[left|middle|right]', not
`mouse-[1|2|3]'.  But you would continue to use
`mouse-[4|5|...]'?  Or would you try for helpful
words for those too?  Remember that 4 and 5 can be
radically different things, depending on the mouse.

How about this additional argument (which I thought
was obvious, but it might help to make explicit):

1, 2, and 3 do not suggest as strongly that what's
meant are left, middle, and right.  And that's a
plus as much as it's a minus.

[1|2|3] is a minus for the very common case of a
common mouse used by a right-hander.  Yes, in that
common case `mouse-left' etc. is easier to guess.

[1|2|3] is a plus for the general case, which is
also the case for Elisp programmers.  The coupling
in thought/language between those names and actual
button positions is looser than the coupling from
names like `left'.

And this is presumably why sometimes the Emacs
(but not the Elisp) doc says something like
"`mouse-1' (the left mouse button)".  (It should
say "`mouse-1' (typically the left mouse button)"
(or "often").  

The [1|2|3] names are more abstract.  Yes, that
presents a disadvantage as well as an advantage.

If we were designing Emacs from scratch today, so
that any arguments about legacy or backward
compatibility were mute, would we choose to use
[1|2|3]?

I would.  I think they make more sense for Emacs
and Elisp, in general, than [left|middle|right],
precisely because, even though they do serve well
enough for guessing button position in the common
case (IMO), they also suggest that such a mapping
is just that - the names are to some extent
arbitrary.

This is analogous to using x1, x2, x3,... in math.
Those names are essentially arbitrary, but an
order, i.e., some mapping, is generally suggested.

> FWIW, I've been using Emacs for 10 years, with 7 years spent almost
> exclusively inside of it, and I don't find mouse-1-2-3 natural.  Given
> how uncommonly I use the middle and right mouse buttons in Emacs, it
> actually took me years to remember whether mouse-2 was the right mouse
> button or the middle one (it didn't help that one of my mice didn't
> have a scrollwheel, so counting the buttons left to right gave the
> wrong intuition, IIRC).

I think you gave at least one reason you had so
much trouble in that regard, for "years": you
don't often use `mouse-2' or `mouse-3'.

If you had used all three in Emacs, I'm betting
you would have learned quickly, at some point
during those "years", what each name stood for.



reply via email to

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