From: Chong Yidong <cyd@stupidchicken.com>
Cc: "Kim F.Storm" <storm@cua.dk>
Subject: Difficulty with mouse-1-click-follows-link
Date: Sun, 09 Oct 2005 13:57:59 -0400 [thread overview]
Message-ID: <877jcmlgig.fsf@stupidchicken.com> (raw)
I've figured out the trouble I have using mouse-1-click-follows-link.
It happens when I do the following (in rapid succession):
* down-mouse-1 on a link
* release the mouse button
* move the mouse cursor somewhere else
If I move the cursor away too soon, the follow-link behavior is
cancelled. That's counter-intuitive, because I already released the
mouse button. As a result, it *feels* as though
mouse-1-click-follows-link is unreliable.
The problematic code is in mouse.el:
(if (and on-link
...
(or remap-double-click
(and
(not (eq mouse-1-click-follows-link 'double))
(= click-count 0)
....
(or (not double-click-time)
(sit-for 0 (if (integerp double-click-time)
double-click-time 500) t)))))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(if (or (vectorp on-link) (stringp on-link))
(setq event (aref on-link 0))
(setcar event 'mouse-2)))
(push event unread-command-events))))
The sit-for call is intended to catch a second click, so that the
follow-link mechanism won't kick in when the user double-clicks.
However, it also catches mouse motion, which leads to the
unreliability described above.
The sit-for is also responsible for the small but irritating delay
between clicking on a link and the action taking place.
In practice, binding double-mouse-1 doesn't seem to work for links
anyway, so I suggest removing the sit-for. I've tried it out, and
follow-link seems to work much more smoothly.
Thoughts?
next reply other threads:[~2005-10-09 17:57 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-09 17:57 Chong Yidong [this message]
2005-10-09 18:51 ` Difficulty with mouse-1-click-follows-link Romain Francoise
2005-10-10 16:46 ` Chong Yidong
2005-10-11 17:16 ` Romain Francoise
2005-10-11 21:04 ` Kim F. Storm
2005-10-11 21:20 ` Chong Yidong
2005-10-12 9:32 ` Kim F. Storm
2005-10-12 13:11 ` Chong Yidong
2005-10-12 13:37 ` Kim F. Storm
2005-10-13 4:52 ` Richard M. Stallman
2005-10-13 14:39 ` Stefan Monnier
2005-10-13 15:33 ` Chong Yidong
2005-10-14 5:10 ` Richard M. Stallman
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=877jcmlgig.fsf@stupidchicken.com \
--to=cyd@stupidchicken.com \
--cc=storm@cua.dk \
/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).