* Associating a region with a link
@ 2008-10-17 8:34 Nordlöw
2008-10-17 9:01 ` Lennart Borgman (gmail)
2008-10-17 9:13 ` Nikolaj Schumacher
0 siblings, 2 replies; 3+ messages in thread
From: Nordlöw @ 2008-10-17 8:34 UTC (permalink / raw
To: help-gnu-emacs
How do I make a buffer-region become a link which is followed by
clicking on it like in grep-mode. How do I change the color of a
region?
/Nordlöw
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Associating a region with a link
2008-10-17 8:34 Associating a region with a link Nordlöw
@ 2008-10-17 9:01 ` Lennart Borgman (gmail)
2008-10-17 9:13 ` Nikolaj Schumacher
1 sibling, 0 replies; 3+ messages in thread
From: Lennart Borgman (gmail) @ 2008-10-17 9:01 UTC (permalink / raw
To: Nordlöw; +Cc: help-gnu-emacs
Nordlöw wrote:
> How do I make a buffer-region become a link which is followed by
> clicking on it like in grep-mode. How do I change the color of a
> region?
There are many ways. One of the easiest is perhaps using buttons (for
example insert-text-button).
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Associating a region with a link
2008-10-17 8:34 Associating a region with a link Nordlöw
2008-10-17 9:01 ` Lennart Borgman (gmail)
@ 2008-10-17 9:13 ` Nikolaj Schumacher
1 sibling, 0 replies; 3+ messages in thread
From: Nikolaj Schumacher @ 2008-10-17 9:13 UTC (permalink / raw
To: Nordlöw; +Cc: help-gnu-emacs
Nordlöw <per.nordlow@gmail.com> wrote:
> How do I make a buffer-region become a link which is followed by
> clicking on it like in grep-mode. How do I change the color of a
> region?
I think the most comfortable way is the 'button package.
(define-button-type 'my-button
'follow-link t
'action 'my-action
'help-echo "mouse-2, RET: Jump...")
(defun my-action (button)
(goto-line (button-get button 'my-target)))
(let ((beg (point)))
(insert "link")
(make-text-button beg (point) 'type 'my-button 'my-target 25))
You can change the color by setting the 'face property.
regards,
Nikolaj Schumacher
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-10-17 9:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-17 8:34 Associating a region with a link Nordlöw
2008-10-17 9:01 ` Lennart Borgman (gmail)
2008-10-17 9:13 ` Nikolaj Schumacher
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.