unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: storm@cua.dk (Kim F. Storm)
Cc: Luc Teirlinck <teirllm@dms.auburn.edu>, emacs-devel@gnu.org
Subject: Re: [PATCH] mouse-1 click follows link
Date: Mon, 01 Nov 2004 00:39:48 +0100	[thread overview]
Message-ID: <m3vfcqh2yj.fsf@kfs-l.imdomain.dk> (raw)
In-Reply-To: <m1654qlgg6.fsf-monnier+emacs@gnu.org> (Stefan's message of "Sun, 31 Oct 2004 16:40:27 -0500")

Stefan <monnier@iro.umontreal.ca> writes:

>> What would the keybinding in link-keymap be?  It has to resolve to
>> something different for each link.
>
> Yes, that's a problem.  Here are some ideas:
>
> 1 - (define-key link-parent-map [mouse-1] [mouse-2])
>     (define-key this-button-keymap [mouse-2] 'foobar)
>
> 2 - (define-key link-parent-map [mouse-1] [follow-link])
>     (define-key this-button-keymap [follow-link] 'foobar)
>
> 3 - (define-key link-parent-map [mouse-1] 'follow-link-command)
>     (define-key this-button-keymap [remap follow-link-command] 'foobar)


Yes, this would work quite nicely!

I prefer #2 -- it looks nice in this-button-keymap.

A way to customize this would be to define a number of keymaps, e.g.

legacy-emacs-follow-link-keymap   [mouse-2] -> [follow-link]
browser-follow-link-keymap        [mouse-1] -> [follow-link]

And then a customizable variable follow-link-keymap which is
a choice between the above keymaps:

(defcustom follow-link-keymap 'browser-follow-link-keymap
  ...)

The link keymaps will then set the parent keymap to the
symbol value of follow-link-keymap.


This approach does not allow use to use double clicks on a link,
as the first click follows the link -- but that's ok I guess.

One question remains:  How do you set point in a link ?


I'll look into this approach and see what it takes.  For starters,
it should cover:

link widgets
help buttons
apropos links
info links
url links

-- 
Kim F. Storm <storm@cua.dk> http://www.cua.dk

  reply	other threads:[~2004-10-31 23:39 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 [this message]
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
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

  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=m3vfcqh2yj.fsf@kfs-l.imdomain.dk \
    --to=storm@cua.dk \
    --cc=emacs-devel@gnu.org \
    --cc=teirllm@dms.auburn.edu \
    /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).