GNU bug report logs - #14670
Highlight visited links

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> jurta.org>

Date: Wed, 19 Jun 2013 22:38:02 UTC

Severity: wishlist

Tags: patch

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Juri Linkov <juri <at> jurta.org>
Cc: Stefan Monnier <monnier <at> iro.umontreal.ca>, 14670 <at> debbugs.gnu.org
Subject: bug#14670: Highlight visited links
Date: Wed, 24 Feb 2016 15:56:28 +1100
Juri Linkov <juri <at> jurta.org> writes:

> So without renaming link text-props, the patch to support
> text-prop links in Info becomes shorter:

I tried applying the patch and then going to an Info node that had an
URL, and I didn't really see any difference...  Is this patch still
applicable?

>
> === modified file 'lisp/info.el'
> --- lisp/info.el	2013-06-27 09:20:04 +0000
> +++ lisp/info.el	2013-06-27 23:31:27 +0000
> @@ -3863,6 +3919,8 @@ (defun Info-try-follow-nearest-node (&op
>  If FORK is non-nil, it is passed to `Info-goto-node'."
>    (let (node)
>      (cond
> +     ((and (setq node (get-text-property (point) 'link)) (not (eq node t)))
> +      (Info-goto-node node fork))
>       ((setq node (Info-get-token (point) "[hf]t?tps?://"
>  				 "\\([hf]t?tps?://[^ \t\n\"`({<>})']+\\)"))
>        (browse-url node)
> @@ -4701,6 +4766,18 @@ (defun Info-fontify-node ()
>              (add-text-properties (1- (match-beginning 2)) (match-end 2)
>                                   '(invisible t front-sticky nil rear-nonsticky t)))))
>
> +      ;; Fontify links
> +      (goto-char (point-min))
> +      (when not-fontified-p
> +	(let ((beg (next-single-property-change (point-min) 'link))
> +	      (end nil))
> +	  (while (and beg (setq end (next-single-property-change beg 'link)))
> +	    (add-text-properties beg end
> +				 '(font-lock-face info-xref
> +				   mouse-face highlight
> +				   help-echo "mouse-2: go to this link"))
> +	    (setq beg (next-single-property-change end 'link)))))
> +
>        ;; Fontify cross references
>        (goto-char (point-min))
>        (when (or not-fontified-p fontify-visited-p)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 5 years and 332 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.