From: storm@cua.dk (Kim F. Storm)
Cc: rms@gnu.org
Subject: Re: [NEW PATCH] mouse-1 click follows link
Date: Tue, 14 Dec 2004 16:15:26 +0100 [thread overview]
Message-ID: <m3acsg9ai9.fsf@kfs-l.imdomain.dk> (raw)
In-Reply-To: <E1CYJ5T-0002qS-UR@fencepost.gnu.org> (Richard Stallman's message of "Sun, 28 Nov 2004 02:03:11 -0500")
Richard Stallman <rms@gnu.org> writes:
> + (defcustom mouse-1-click-follows-link 350
> + "Non-nil means that clicking mouse-1 on a link follows the link.
> + This is only done for links which have the mouse-face property.
>
> That's not true any more, with the rest of your design, right?
True. I didn't fix the doc string.
>
> + If value is the symbol double, a double click follows the link.
>
> That should say `double'. Or should it be :double?
It is `double'.
>
>
> Aren't there more kinds of links that need to support this?
> For instance, what about Compilation mode and Dired.
Right -- there are more places that need to be adapted, but I'm
sure that if I check these changes into CVS, that will quickly
be spotted and fixed.
In most cases, it will be as trivial as for dired and compile
as illustrated below:
Should I install these changes (with proper doc string)?
On question is how to document this in the manuals.
Of course, the Lisp ref should explain that mouse-2 is the preferred
binding for "following links", but then in details explain how to make
mouse-1 automatically follow mouse-2 links.
But what about the Emacs manual? Would a it suffice to put a generic
mentioning like this somewhere (I would add this to NEWS as well):
** A mouse-1 click now follows links
For historical reasons, Emacs uses mouse-2 to take action on
clickable text in a buffer, typically to follow a link to a position
in another file or buffer. In most cases, clicking mouse-1 now also
follows a link; the exception being modes where mouse-1 has a
different binding on clickable text, or the mouse-2 action is
something more involved than just following a link.
If you want to set the cursor in the middle of a link, rather than
following the link, just hold down the mouse-1 button for half a
second or more before releasing it.
You can modify this behaviour by customizing the variable
`mouse-1-click-follows-link'.
*** dired.el 22 Nov 2004 22:01:22 +0100 1.298
--- dired.el 30 Nov 2004 01:12:12 +0100
***************
*** 1104,1109 ****
--- 1104,1110 ----
(let ((map (make-keymap)))
(suppress-keymap map)
(define-key map [mouse-2] 'dired-mouse-find-file-other-window)
+ (define-key map [follow-link] 'mouse-face)
;; Commands to mark or flag certain categories of files
(define-key map "#" 'dired-flag-auto-save-files)
(define-key map "." 'dired-clean-directory)
*** compile.el 25 Nov 2004 11:21:11 +0100 1.342
--- compile.el 14 Dec 2004 15:50:34 +0100
***************
*** 1044,1049 ****
--- 1044,1050 ----
(defvar compilation-minor-mode-map
(let ((map (make-sparse-keymap)))
(define-key map [mouse-2] 'compile-goto-error)
+ (define-key map [follow-link] 'mouse-face)
(define-key map "\C-c\C-c" 'compile-goto-error)
(define-key map "\C-m" 'compile-goto-error)
(define-key map "\C-c\C-k" 'kill-compilation)
***************
*** 1073,1078 ****
--- 1074,1080 ----
(defvar compilation-button-map
(let ((map (make-sparse-keymap)))
(define-key map [mouse-2] 'compile-goto-error)
+ (define-key map [follow-link] 'mouse-face)
(define-key map "\C-m" 'compile-goto-error)
map)
"Keymap for compilation-message buttons.")
***************
*** 1084,1089 ****
--- 1086,1092 ----
;; because that introduces a menu bar item we don't want.
;; That confuses C-down-mouse-3.
(define-key map [mouse-2] 'compile-goto-error)
+ (define-key map [follow-link] 'mouse-face)
(define-key map "\C-c\C-c" 'compile-goto-error)
(define-key map "\C-m" 'compile-goto-error)
(define-key map "\C-c\C-k" 'kill-compilation)
--
Kim F. Storm <storm@cua.dk> http://www.cua.dk
next prev parent reply other threads:[~2004-12-14 15:15 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-29 13:04 [PATCH] mouse-1 click follows link Kim F. Storm
2004-10-29 23:54 ` Luc Teirlinck
2004-10-30 22:04 ` Kim F. Storm
2004-10-31 0:09 ` Luc Teirlinck
2004-10-31 12:49 ` Kim F. Storm
2004-11-01 7:24 ` Richard Stallman
2004-10-31 0:34 ` Luc Teirlinck
2004-10-31 12:53 ` Kim F. Storm
2004-10-31 15:24 ` Luc Teirlinck
2004-10-31 18:37 ` David Kastrup
2004-10-31 20:03 ` Luc Teirlinck
2004-10-31 20:13 ` David Kastrup
2004-10-31 21:40 ` Stefan
2004-10-31 23:39 ` Kim F. Storm
2004-11-01 0:33 ` Stefan
2004-11-27 0:44 ` [NEW PATCH] " Kim F. Storm
[not found] ` <E1CYJ5T-0002qS-UR@fencepost.gnu.org>
2004-12-14 15:15 ` Kim F. Storm [this message]
2004-12-14 20:13 ` Robert J. Chassell
2004-12-14 23:33 ` Kim F. Storm
2004-12-16 23:08 ` Kevin Rodgers
2004-12-17 9:57 ` Kim F. Storm
2004-12-17 10:20 ` Alex Schroeder
2004-12-15 8:46 ` Richard Stallman
2004-12-16 12:24 ` Richard Stallman
2004-12-16 15:12 ` Kim F. Storm
2004-12-18 0:20 ` Richard Stallman
2004-12-18 13:50 ` Robert J. Chassell
2004-12-17 15:48 ` Kim F. Storm
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3acsg9ai9.fsf@kfs-l.imdomain.dk \
--to=storm@cua.dk \
--cc=rms@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.