all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: mail@xuchunyang.me
To: Davin Pearson <davin.pearson@gmail.com>,
	"help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org>
Subject: Re: Adding hypertlink buttons
Date: Wed, 31 Oct 2018 22:36:08 +0800	[thread overview]
Message-ID: <36711231540996568@sas1-d856b3d759c7.qloud-c.yandex.net> (raw)
In-Reply-To: <9da059a8-fc31-4fc2-bd3d-ebe727526dbe@googlegroups.com>

   A

   A

   26.10.2018, 08:21, "Davin Pearson" <davin.pearson@gmail.com>:

   > I have written a drop in replacement for speedbar,el called
   d-speedbar.el

   > and I want to get left mouse button hyperlinks online instead of
   pressing ENTER on the function browser window to take you to the
   corresponding line for that function in the code browser window.

   A

   After consultingA (info "(elisp) Clickable Text") yesterday, IA wrote
   the following to insert a link to the init file, I can click or press
   RET onA the link to open the file.

   A

   (insert
   A (propertize user-init-file
   A  A  A  A  A  A  A 'mouse-face 'highlight
   A  A  A  A  A  A  A 'help-echo "mouse-2: visit this file"
   A  A  A  A  A  A  A 'follow-link t
   A  A  A  A  A  A  A 'keymap
   A  A  A  A  A  A  A (let ((map (make-sparse-keymap))
   A  A  A  A  A  A  A  A  A  A (cmd (lambda ()
   A  A  A  A  A  A  A  A  A  A  A  A  A  (interactive)
   A  A  A  A  A  A  A  A  A  A  A  A  A  (find-file user-init-file))))
   A  A  A  A  A  A  A  A (define-key map [mouse-2] cmd)
   A  A  A  A  A  A  A  A (define-key map [?\C-m] cmd)
   A  A  A  A  A  A  A  A map))
   A ?\n)
   A
   I am not sure if `:follow-link t` is correct, but it seems it is
   required because I remember click won't work without it.


  parent reply	other threads:[~2018-10-31 14:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-26  0:16 Adding hypertlink buttons Davin Pearson
2018-10-29  1:13 ` Davin Pearson
2018-10-29 12:51   ` Stefan Monnier
     [not found]   ` <mailman.3002.1540817518.1284.help-gnu-emacs@gnu.org>
2018-10-30  3:38     ` Davin Pearson
2018-10-30  5:44       ` Yuri Khan
     [not found]       ` <mailman.3070.1540878268.1284.help-gnu-emacs@gnu.org>
2018-10-31  2:31         ` Davin Pearson
2018-10-31  5:22           ` Yuri Khan
2018-10-31 14:36 ` mail [this message]
     [not found] ` <mailman.3164.1540996581.1284.help-gnu-emacs@gnu.org>
2018-11-02 13:34   ` Davin Pearson

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=36711231540996568@sas1-d856b3d759c7.qloud-c.yandex.net \
    --to=mail@xuchunyang.me \
    --cc=davin.pearson@gmail.com \
    --cc=help-gnu-emacs@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.