From: storm@cua.dk (Kim F. Storm)
Cc: emacs-devel@gnu.org
Subject: Re: finger-pointer curser as default for mouse-face text
Date: Thu, 28 Oct 2004 16:05:00 +0200 [thread overview]
Message-ID: <m3mzy7lz03.fsf@kfs-l.imdomain.dk> (raw)
In-Reply-To: <FDELKNEBLPKKDCEBEJCBGEODCIAA.drew.adams@oracle.com> (Drew Adams's message of "Wed, 27 Oct 2004 10:29:55 -0700")
[For the busy reader -- see patch to tooltip code at the end. ++kfs]
"Drew Adams" <drew.adams@oracle.com> writes:
> -----Original Message-----From: Kim F. Storm
> document the current "standard" behaviour,
> and then add a section at an appropriate place which says something like:
>
> Whenever you can click with mouse-2 to follow a link, you may also be
> able to follow the link by a double click or a short click with
> mouse-1. The actual mouse-1 action that you need to follow a link is
> controlled by the user option mouse-1-click-follows-link.
>
> mouse-1 click to follow links or click action buttons, if available, should
> become the _standard_ behavior. Instead of introducing mouse-2 as the
> standard behavior, and then saying that mouse-1 "may also be" usable as an
> alternative in many contexts, we should just introduce mouse-1 clicking (or
> not bother to introduce it at all! - the closer Emacs behavior is to what
> users are used to, the less explanation we need). We should not mention
> mouse-2 in this context.
Mouse-2 IS the standard behaviour -- Lisp code binds mouse-2, not mouse-1.
Changing that is a HUGE change. In comparison, the proposed change is a
tiny change which adds a convenient mapping of mouse-1 to mouse-2 in
this specific case.
The text could be rephrased to say:
With the default settings, click mouse-1 to follow a highlighted link.
If you want to set the point rather than follow the link, just keep
the mouse-1 button pressed a little longer (at least 0.35 seconds).
This behaviour is a major change from traditional emacs mouse
behaviour where you use mouse-2 to follow links, while mouse-1
(typically) would set point in the link.
The mouse-2 binding is still the standard binding for following a
link, while the mouse-1 behaviour is customized via the variable
mouse-1-click-follows-link. For example, you can control the length
of the click, or you can make only a mouse-1 double-click follow
links, while keeping the traditional mouse-1 behaviour.
>
> What about mouse-2? If mouse-1 clicking follows links, there is no reason
> for mouse-2 to duplicate this behavior. I think Kim has (for now) left
> mouse-2 as an alternative to mouse-1 in his patch: both do the same thing
> wrt links. I would prefer that we adopt mouse-1 and drop mouse-2 (except as
> an optional replacement for mouse-1 -- one or the other; not both). Let
> users (or future Emacs versions) use mouse-2 for something else in this
> context - by default, it should probably be `mouse-yank-at-click' in most
> contexts.
I don't think we shall do anything about mouse-2 clicks -- that's the
traditional binding, and the binding you make at the Lisp level.
> One problem is the tooltips which say "click mouse-2 to ...".
> To fix that requires that we change all places where the tooltips
> are created (unless there is some place we can put in a clever
> rewrite of the message).
>
> Such messages should ideally be constructed based on dynamic key bindings,
> so that they would automatically reflect the appropriate behavior. Isn't it
> possible to use, say, `substitute-command-keys' here?
Here is a patch to the tooltip code to change mouse-2 to mouse-1 on the fly:
*** tooltip.el 01 Sep 2003 17:45:17 +0200 1.34
--- tooltip.el 28 Oct 2004 13:31:16 +0200
***************
*** 480,486 ****
(defun tooltip-show-help-function (msg)
"Function installed as `show-help-function'.
MSG is either a help string to display, or nil to cancel the display."
! (let ((previous-help tooltip-help-message))
(setq tooltip-help-message msg)
(cond ((null msg)
;; Cancel display. This also cancels a delayed tip, if
--- 480,502 ----
(defun tooltip-show-help-function (msg)
"Function installed as `show-help-function'.
MSG is either a help string to display, or nil to cancel the display."
! (let ((previous-help tooltip-help-message)
! mp pos)
! (if (and mouse-1-click-follows-link
! (stringp msg)
! (save-match-data
! (string-match "^mouse-2" msg))
! (setq mp (mouse-pixel-position))
! (consp (setq pos (cdr mp)))
! (setq pos (posn-at-x-y (car pos) (cdr pos) (car mp)))
! (windowp (posn-window pos)))
! (with-current-buffer (window-buffer (posn-window pos))
! (setq lttt (list msg mp pos))
! (if (mouse-on-link-p (posn-point pos))
! (setq msg (concat
! (if (eq mouse-1-click-follows-link 'double)
! "double-" "")
! "mouse-1" (substring msg 7))))))
(setq tooltip-help-message msg)
(cond ((null msg)
;; Cancel display. This also cancels a delayed tip, if
--
Kim F. Storm <storm@cua.dk> http://www.cua.dk
next prev parent reply other threads:[~2004-10-28 14:05 UTC|newest]
Thread overview: 91+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <DNEMKBNJBGPAOPIJOOICAEKKCAAA.drew.adams@oracle.com>
2004-10-19 9:04 ` finger-pointer curser as default for mouse-face text Kim F. Storm
2004-10-19 15:31 ` Lennart Borgman
2004-10-19 16:12 ` Drew Adams
2004-10-21 13:56 ` Richard Stallman
2004-10-21 14:47 ` Kim F. Storm
2004-10-21 16:03 ` Lennart Borgman
2004-10-23 4:48 ` Richard Stallman
2004-10-24 12:42 ` Kim F. Storm
2004-10-24 12:59 ` Lennart Borgman
2004-10-24 19:40 ` Kim F. Storm
2004-10-24 20:06 ` Lennart Borgman
2004-10-25 13:13 ` Richard Stallman
2004-10-24 13:10 ` David Kastrup
2004-10-24 19:59 ` Kim F. Storm
2004-10-26 9:04 ` Richard Stallman
2004-10-26 17:05 ` Lennart Borgman
2004-10-24 22:31 ` Stefan
2004-10-25 7:22 ` David Kastrup
2004-10-25 11:47 ` Stefan
2004-10-25 12:51 ` David Kastrup
2004-10-25 13:50 ` Stefan Monnier
2004-10-25 14:52 ` Ralf Angeli
2004-10-25 15:08 ` Stefan Monnier
2004-10-25 15:18 ` David Kastrup
2004-10-25 15:35 ` Stefan Monnier
2004-10-26 9:00 ` Kim F. Storm
2004-10-26 9:25 ` David Kastrup
2004-10-26 12:23 ` Kim F. Storm
2004-10-26 18:55 ` Drew Adams
2004-10-26 21:06 ` David Kastrup
2004-10-26 21:54 ` Kim F. Storm
2004-10-27 2:15 ` Luc Teirlinck
2004-10-27 12:52 ` Kim F. Storm
2004-10-27 13:02 ` Luc Teirlinck
2004-10-27 13:16 ` David Kastrup
2004-10-27 14:51 ` feature freeze (was: finger-pointer curser as default for mouse-face text) Reiner Steib
2004-10-27 15:15 ` Kim F. Storm
2004-10-27 15:15 ` feature freeze David Kastrup
2004-10-27 17:29 ` finger-pointer curser as default for mouse-face text Drew Adams
2004-10-28 14:05 ` Kim F. Storm [this message]
2004-10-27 17:35 ` Richard Stallman
2004-11-01 14:40 ` Karl Eichwalder
2004-11-01 15:44 ` Stefan
2004-11-02 14:08 ` Richard Stallman
2004-11-02 18:08 ` Karl Eichwalder
2004-11-02 21:51 ` Miles Bader
2004-11-02 23:41 ` Drew Adams
2004-11-02 23:53 ` Stefan
2004-11-03 1:27 ` incrementor-decrementor commands and bindings (was: finger-pointer curser as default for mouse-face text) Drew Adams
2004-11-03 7:51 ` incrementor-decrementor commands and bindings (was: finger-pointercurser " Stephan Stahl
2004-11-03 15:26 ` Drew Adams
2004-11-04 9:51 ` Richard Stallman
2004-11-03 1:34 ` finger-pointer curser as default for mouse-face text Miles Bader
2004-11-03 9:31 ` Kim F. Storm
2004-11-03 9:26 ` Kim F. Storm
2004-11-03 10:20 ` David Kastrup
2004-11-03 17:04 ` Richard Stallman
2004-11-03 9:11 ` Kim F. Storm
2004-11-03 17:03 ` Richard Stallman
2004-10-27 17:34 ` Richard Stallman
2004-10-27 10:49 ` Richard Stallman
2004-10-27 12:24 ` Kim F. Storm
2004-10-27 13:03 ` Stefan Monnier
2004-10-27 13:18 ` David Kastrup
2004-10-28 2:27 ` Miles Bader
2004-10-27 7:22 ` Kai Grossjohann
2004-10-27 7:35 ` David Kastrup
2004-10-27 12:32 ` Kim F. Storm
2004-10-28 6:24 ` Richard Stallman
2004-10-27 10:47 ` Richard Stallman
2004-10-26 9:05 ` Richard Stallman
2004-10-25 8:31 ` Kim F. Storm
2004-10-25 10:01 ` David Kastrup
2004-10-25 12:32 ` Kim F. Storm
2004-10-26 9:05 ` Richard Stallman
2004-10-25 13:13 ` Richard Stallman
2004-10-21 14:09 ` David Kastrup
2004-10-21 14:42 ` Kim F. Storm
2004-10-21 15:21 ` David Kastrup
2004-10-21 19:55 ` Kim F. Storm
2004-10-21 20:09 ` Drew Adams
2004-10-21 21:45 ` Stefan Monnier
2004-10-21 22:09 ` David Kastrup
2004-10-22 9:10 ` Kim F. Storm
2004-10-22 12:45 ` David Kastrup
2004-10-22 15:03 ` Kim F. Storm
2004-10-22 15:56 ` David Kastrup
2004-10-17 19:27 Drew Adams
2004-10-18 11:19 ` Kim F. Storm
2004-10-18 13:59 ` Richard Stallman
2004-12-07 13:16 ` Per Abrahamsen
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=m3mzy7lz03.fsf@kfs-l.imdomain.dk \
--to=storm@cua.dk \
--cc=emacs-devel@gnu.org \
/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).