GNU bug report logs - #14950
24.3.50; gnus: Fontification of URLs is not satisfactory

Previous Next

Packages: gnus, emacs;

Reported by: Jambunathan K <kjambunathan <at> gmail.com>

Date: Thu, 25 Jul 2013 10:11:02 UTC

Severity: minor

Found in version 24.3.50

Done: Katsumi Yamaoka <yamaoka <at> jpl.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Jambunathan K <kjambunathan <at> gmail.com>
To: Katsumi Yamaoka <yamaoka <at> jpl.org>
Cc: 14950 <at> debbugs.gnu.org
Subject: bug#14950: 24.3.50; gnus: Fontification of URLs is not satisfactory
Date: Thu, 25 Jul 2013 17:45:25 +0530
Katsumi Yamaoka <yamaoka <at> jpl.org> writes:

> Jambunathan K wrote:
>> Gnus is from Emacs repo.
>
>> Within Gnus,
>
>>   [Chicago Export filters for Org-mode]
>>   http://repo.or.cz/w/JabRefChicagoForOrgmode.git/blob_plain/HEAD:/net.sf.jabref.export.Chicago.ODF(English)-1.2.jar
>
>> How does the above URL below. Is it partly in bold and partly in default
>> font.  (See attached screenshot) Specifically, the URL is fontified only
>> till "1" (but doesn't include trailing ".2.jar" part).
>
> What should be improved is the default value of the user option
> `gnus-button-url-regexp'.  But it is too complicated to let me
> encourage to do it without enbugging.  Anyone?

I don't understand URLs.  

 (English)-1.2.jar
 ^       ^
 ^       ^

A quick X-ray operation with xr.el, suggested to me that the parenthesis
- () - around English could be the problem maker.  So I removed the ()
around English and re-builder matches the whole url.

Here is what xr.el reports.

xr.el is at http://debbugs.gnu.org/cgi/bugreport.cgi?msg=40;filename=xr.el;att=1;bug=13369

M-: (xr gnus-button-url-regexp)

--8<---------------cut here---------------start------------->8---

(seq
 word-boundary
 (group
  (group
   (or "www."
       (seq
	(group
	 (or
	  (seq
	   (opt "s")
	   "http"
	   (opt "s"))
	  "ftp" "file" "gopher" "nntp" "news" "telnet" "wais" "mailto" "info"))
	":")))
  (opt
   (group "//"
	  (one-or-more
	   (any "." "_" "0-9" "a-z" "-"))
	  ":"
	  (zero-or-more
	   (any "0-9"))))
  (or
   (seq
    (one-or-more
     (any "," "." ";" ":" "?" "!"
	  word "/" "\\" "+" "*" "&" "%" "~" "@" "$" "#" "=" "_" "0-9" "a-z" "-"))
    "("
    (one-or-more
     (any "," "." ";" ":" "?" "!"
	  word "/" "\\" "+" "*" "&" "%" "~" "@" "$" "#" "=" "_" "0-9" "a-z" "-"))
    (zero-or-more
     (any
      word "/" "\\" "+" "*" "&" "%" "~" "@" "$" "#" "=" "_" "0-9" "a-z" "-"))
    ")"
    (zero-or-more
     (any
      word "/" "\\" "+" "*" "&" "%" "~" "@" "$" "#" "=" "_" "0-9" "a-z" "-")))
   (seq
    (one-or-more
     (any "," "." ";" ":" "?" "!"
	  word "/" "\\" "+" "*" "&" "%" "~" "@" "$" "#" "=" "_" "0-9" "a-z" "-"))
    (any
     word "/" "\\" "+" "*" "&" "%" "~" "@" "$" "#" "=" "_" "0-9" "a-z" "-")))))

--8<---------------cut here---------------end--------------->8---


----------------------------------------------------------------

As an aside, 

If I do,
   
   M-x browse-url-emacs RET

with point on that link, I am prompted for the "whole" URL.  The
interactive spec for browse-url goes something like

  (interactive (browse-url-interactive-arg "URL: "))

which in turn relies on 

  (thing-at-point 'url t)

So may be Gnus, can fuzzily position itself on what looks like a URL and
then defer to `thing-at-point' to do the nasty work of identifying the
boundaries.  This way, atleast Gnus owners can blame someone else :-).




This bug report was last modified 11 years and 331 days ago.

Previous Next


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