Gnus development mailing list
 help / color / mirror / Atom feed
* strange highlightings
@ 2000-04-24 16:38 Vladimir Volovich
  2000-04-24 18:47 ` Kai Großjohann
  0 siblings, 1 reply; 14+ messages in thread
From: Vladimir Volovich @ 2000-04-24 16:38 UTC (permalink / raw)


Hi!

with current CVS version of gnus, i get strange highlightings. e.g. in
the following line

# ping 10.95.3.38

the string 95.3.38 is highlighted and buttonized, which seems a bit
illogical.

Best,
v.




^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: strange highlightings
  2000-04-24 16:38 strange highlightings Vladimir Volovich
@ 2000-04-24 18:47 ` Kai Großjohann
  2000-04-24 19:40   ` Vladimir Volovich
  0 siblings, 1 reply; 14+ messages in thread
From: Kai Großjohann @ 2000-04-24 18:47 UTC (permalink / raw)
  Cc: ding

Vladimir Volovich <vvv@vvv.vsu.ru> writes:

> # ping 10.95.3.38
> 
> the string 95.3.38 is highlighted and buttonized, which seems a bit
> illogical.

The string looks like a URL.  You can click on it, and then you'll be
looking at http://95.3.38/...

I was about to report this, too, but then I thought what the heck.
It's very difficult to restrict the regexp without losing some actual
URLs.  And maybe it's useful for people to be able to click on
something as if it was a URL.  Mustn't click on something that isn't a
URL, though :-)

I think this will be highlighted as a URL: a.b.c

kai
-- 
Beware of flying birch trees.



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: strange highlightings
  2000-04-24 18:47 ` Kai Großjohann
@ 2000-04-24 19:40   ` Vladimir Volovich
  2000-04-25 11:06     ` Kai Großjohann
  2000-04-26 19:37     ` strange highlightings Karl EICHWALDER
  0 siblings, 2 replies; 14+ messages in thread
From: Vladimir Volovich @ 2000-04-24 19:40 UTC (permalink / raw)


"KG" == Kai Großjohann writes:

 >> # ping 10.95.3.38
 >> the string 95.3.38 is highlighted and buttonized, which seems a
 >> bit illogical.

 KG> The string looks like a URL.  You can click on it, and then
 KG> you'll be looking at http://95.3.38/...

well, the URL was guessed obviously wrong: the correct one is
10.95.3.38 but not 95.3.38. And often the text which has nothing close
to URLs is highlighted and buttonized which seems like an overkill
(and a bit annoying :). is there a config option to restore the
previous behavior? 8-)

	Best regards, -- Vladimir.



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: strange highlightings
  2000-04-24 19:40   ` Vladimir Volovich
@ 2000-04-25 11:06     ` Kai Großjohann
  2000-04-25 11:54       ` Daniel Pittman
                         ` (2 more replies)
  2000-04-26 19:37     ` strange highlightings Karl EICHWALDER
  1 sibling, 3 replies; 14+ messages in thread
From: Kai Großjohann @ 2000-04-25 11:06 UTC (permalink / raw)
  Cc: ding

Vladimir Volovich <vvv@vvv.vsu.ru> writes:

> well, the URL was guessed obviously wrong: the correct one is
> 10.95.3.38 but not 95.3.38. And often the text which has nothing close
> to URLs is highlighted and buttonized which seems like an overkill
> (and a bit annoying :). is there a config option to restore the
> previous behavior? 8-)

The question is, how to recognize text which is a URL and how to
recognize text which _isn't_ a URL?

Gnus currently looks `foo.foo.foo' type strings, with three words and
two dots.  And obviously, digits are allowed in the words
(www2.frob.org might be a valid URL).  Well...

Have you got a suggestion on improving the rules used by Gnus?

kai
-- 
Beware of flying birch trees.



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: strange highlightings
  2000-04-25 11:06     ` Kai Großjohann
@ 2000-04-25 11:54       ` Daniel Pittman
  2000-04-25 12:09       ` Vladimir Volovich
  2000-04-25 13:36       ` Per Abrahamsen
  2 siblings, 0 replies; 14+ messages in thread
From: Daniel Pittman @ 2000-04-25 11:54 UTC (permalink / raw)


On Tue, 25 Apr 2000, Kai Großjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE>
wrote:

> Vladimir Volovich <vvv@vvv.vsu.ru> writes:
> 
>> well, the URL was guessed obviously wrong: the correct one is
>> 10.95.3.38 but not 95.3.38. And often the text which has nothing
>> close to URLs is highlighted and buttonized which seems like an
>> overkill (and a bit annoying :). is there a config option to restore
>> the previous behavior? 8-)
> 
> The question is, how to recognize text which is a URL and how to
> recognize text which _isn't_ a URL?
> 
> Gnus currently looks `foo.foo.foo' type strings, with three words and
> two dots.  And obviously, digits are allowed in the words
> (www2.frob.org might be a valid URL).  Well...
> 
> Have you got a suggestion on improving the rules used by Gnus?

Hrm. Real URL paths refer to a fully qualified machine name, with a
(somewhat) restricted set of designations following. Wouldn't matching
the 'com', 'net' or 'org' make sense?

Except, of course, that would result in a regexp that specified all of
the registered top level domains, which would be (ahem) not so small. I
don't know what effect that would have on the performance of the
matcher...

        Daniel

-- 
Love like you'll never get hurt.
You've got to dance like no one is watching,
It's gotta come from the heart, if you want it to work.
        -- Susannah Clark



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: strange highlightings
  2000-04-25 11:06     ` Kai Großjohann
  2000-04-25 11:54       ` Daniel Pittman
@ 2000-04-25 12:09       ` Vladimir Volovich
  2000-04-25 13:36       ` Per Abrahamsen
  2 siblings, 0 replies; 14+ messages in thread
From: Vladimir Volovich @ 2000-04-25 12:09 UTC (permalink / raw)
  Cc: ding

"KG" == Kai Großjohann writes:

 >> well, the URL was guessed obviously wrong: the correct one is
 >> 10.95.3.38 but not 95.3.38. And often the text which has nothing
 >> close to URLs is highlighted and buttonized which seems like an
 >> overkill (and a bit annoying :). is there a config option to
 >> restore the previous behavior? 8-)

 KG> The question is, how to recognize text which is a URL and how to
 KG> recognize text which _isn't_ a URL?

 KG> Gnus currently looks `foo.foo.foo' type strings, with three words
 KG> and two dots.  And obviously, digits are allowed in the words
 KG> (www2.frob.org might be a valid URL).  Well...

Khm.. URLs can well be of the form foo.foo.foo.foo and even with more
words separated by dots.

Well, i really don't like this behavior. Why should one assume that a
given string which looks like foo.foo.foo is an URL and moreover, why
should it be assumes as an URL for HTTP? (why not ftp? why not telnet?
why not ICMP?)

It looks like in a lot of cases this new empirical behavior will give
incorrect results (i.e. which will misleadingly interpret some random
strings as HTTP URLs -- e.g. section numbers like 1.2.3, 1.2.4, etc).

 KG> Have you got a suggestion on improving the rules used by Gnus?

I'd rather prefer to reduce this empirical algorithm to previous form
(when only strings starting with ftp:// https:// http:// etc were
buttonized). At least, it would be nice to have an option to restore
that original behavior, e.g.

(setq gnus-buttonize-naked-urls nil)

(which would extend gnus-button-url-regexp if non-nil; i'd prefer to
have by default old behavior though)

Best,
v.




^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: strange highlightings
  2000-04-25 11:06     ` Kai Großjohann
  2000-04-25 11:54       ` Daniel Pittman
  2000-04-25 12:09       ` Vladimir Volovich
@ 2000-04-25 13:36       ` Per Abrahamsen
  2000-04-25 14:18         ` Kai Großjohann
  2 siblings, 1 reply; 14+ messages in thread
From: Per Abrahamsen @ 2000-04-25 13:36 UTC (permalink / raw)


Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:

> Gnus currently looks `foo.foo.foo' type strings, with three words and
> two dots.  And obviously, digits are allowed in the words
> (www2.frob.org might be a valid URL).  Well...
>
> Have you got a suggestion on improving the rules used by Gnus?

Well, it is obviously silly that 

        www.foo.bar.com 
            ***********

would highlight as above.  Or that

        smtp.foo-bar.com

would hit as a web adress. I think a more conservative

        \<www[-a-zA-Z0-9.]*\.[A-Za-z][A-Za-z][A-Za-z]?\>

would hit most of the intuitively obvious http adresses, yet have very
few false hits.  I.e. a word that starts with www and ends with dot
followed by two or three letters.



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: strange highlightings
  2000-04-25 13:36       ` Per Abrahamsen
@ 2000-04-25 14:18         ` Kai Großjohann
  2000-04-25 14:31           ` Per Abrahamsen
  2000-04-27 18:30           ` wrapped URLs (was: strange highlightings) Jussi Yli-Urpo
  0 siblings, 2 replies; 14+ messages in thread
From: Kai Großjohann @ 2000-04-25 14:18 UTC (permalink / raw)
  Cc: ding

Per Abrahamsen <abraham@dina.kvl.dk> writes:

> Well, it is obviously silly that 
> 
>         www.foo.bar.com 
>             ***********
> 
> would highlight as above.

This does not appear to happen.  Gnus highlights the whole string.
Hm.  I don't understand that rules at all.

> Or that
> 
>         smtp.foo-bar.com
> 
> would hit as a web adress. I think a more conservative
> 
>         \<www[-a-zA-Z0-9.]*\.[A-Za-z][A-Za-z][A-Za-z]?\>
> 
> would hit most of the intuitively obvious http adresses, yet have very
> few false hits.  I.e. a word that starts with www and ends with dot
> followed by two or three letters.

There are quite a few web addresses which do not have the `www' thing,
cf. http://web.de, or http://quimby.gnus.org/.
And even if, my home page is http://ls6-www.cs.uni-dortmund.de/...

But maybe grokking foo.bar.quux.blarfl type strings if `www' occurs in
foo, and requiring `http://' for all others would be a useful
compromise.

OTOH, people can just point at stuff and say M-x browse-url-at-point
RET.  Hm.  Is it possible to put browse-url-at-mouse into the
C-down-mouse-3 menu that occurs in the article buffer?

kai
-- 
Beware of flying birch trees.



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: strange highlightings
  2000-04-25 14:18         ` Kai Großjohann
@ 2000-04-25 14:31           ` Per Abrahamsen
  2000-04-25 19:24             ` Felix Lee
  2000-04-27 18:30           ` wrapped URLs (was: strange highlightings) Jussi Yli-Urpo
  1 sibling, 1 reply; 14+ messages in thread
From: Per Abrahamsen @ 2000-04-25 14:31 UTC (permalink / raw)


Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:

> There are quite a few web addresses which do not have the `www' thing,
> cf. http://web.de, or http://quimby.gnus.org/.

Yes, but I don't think it is reasonable to expect a heuristic to pick
up those.



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: strange highlightings
  2000-04-25 14:31           ` Per Abrahamsen
@ 2000-04-25 19:24             ` Felix Lee
  2000-04-25 20:16               ` Kai Großjohann
  0 siblings, 1 reply; 14+ messages in thread
From: Felix Lee @ 2000-04-25 19:24 UTC (permalink / raw)


how about, it's a URL if it starts with:
  \b[a-zA-Z]+://		(ftp://99.99.9.9/marklar/)
  \b[wW][wW][wW][0-9]*\.	(WWW9.Foo.Bar/marklar/)

I ran these patterns against my mail archive, and came up
with very few false positives.  the only one that troubles
me is 'comp.infosystems.www.misc', which can be handled by
making sure there isn't a '.' before 'www'.

Finding the end of a URL is a little tricky..  haven't
thought of a good way of doing that yet.
--



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: strange highlightings
  2000-04-25 19:24             ` Felix Lee
@ 2000-04-25 20:16               ` Kai Großjohann
  0 siblings, 0 replies; 14+ messages in thread
From: Kai Großjohann @ 2000-04-25 20:16 UTC (permalink / raw)
  Cc: ding

Felix Lee <flee@teleport.com> writes:

> Finding the end of a URL is a little tricky..  haven't
> thought of a good way of doing that yet.

I think the old buttonizing code did a very good job at this.

kai
-- 
Beware of flying birch trees.



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: strange highlightings
  2000-04-24 19:40   ` Vladimir Volovich
  2000-04-25 11:06     ` Kai Großjohann
@ 2000-04-26 19:37     ` Karl EICHWALDER
  1 sibling, 0 replies; 14+ messages in thread
From: Karl EICHWALDER @ 2000-04-26 19:37 UTC (permalink / raw)


Vladimir Volovich <vvv@vvv.vsu.ru> writes:

> well, the URL was guessed obviously wrong: the correct one is
> 10.95.3.38 but not 95.3.38. And often the text which has nothing close
> to URLs is highlighted and buttonized which seems like an overkill
> (and a bit annoying :). is there a config option to restore the
> previous behavior? 8-)

Yes, please restore it.  asd.asd.com is not a valid URL, it's crap.  No
need to highlight it.  Also valid email addresses are wrongly
highlighted...

-- 
work : ke@suse.de                          |
     : http://www.suse.de/~ke/             |          ------    ,__o
home : ke@gnu.franken.de                   |         ------   _-\_<,
     : http://www.franken.de/users/gnu/ke/ |        ------   (*)/'(*)




^ permalink raw reply	[flat|nested] 14+ messages in thread

* wrapped URLs (was: strange highlightings)
  2000-04-25 14:18         ` Kai Großjohann
  2000-04-25 14:31           ` Per Abrahamsen
@ 2000-04-27 18:30           ` Jussi Yli-Urpo
  2000-04-28 11:39             ` Bill White
  1 sibling, 1 reply; 14+ messages in thread
From: Jussi Yli-Urpo @ 2000-04-27 18:30 UTC (permalink / raw)


Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:

> OTOH, people can just point at stuff and say M-x browse-url-at-point
> RET.  Hm.  Is it possible to put browse-url-at-mouse into the
> C-down-mouse-3 menu that occurs in the article buffer?

One related thing, could it be possible make handling of
wrapped URLs any easier? I often receive mails with long
(usually Lotus Notes) URLs that have been wrapped to two or
more lines and now I have to edit those mails manually
if I want to click them open.

Even function like browse-url-at-region (which would ignore
line breaks in region and use region as URL) would be really
cool. Does anyone already have something like that?

-- 
Jussi.



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: wrapped URLs (was: strange highlightings)
  2000-04-27 18:30           ` wrapped URLs (was: strange highlightings) Jussi Yli-Urpo
@ 2000-04-28 11:39             ` Bill White
  0 siblings, 0 replies; 14+ messages in thread
From: Bill White @ 2000-04-28 11:39 UTC (permalink / raw)


On 27 Apr 2000 21:30:58 +0300
in article <m3em7rqtul.fsf_-_@tavis.ton.tut.fi>
Jussi Yli-Urpo <jmy@h32.erkki.ton.tut.fi> said:

  > One related thing, could it be possible make handling of wrapped
  > URLs any easier? I often receive mails with long (usually Lotus
  > Notes) URLs that have been wrapped to two or more lines and now I
  > have to edit those mails manually if I want to click them open.

This doesn't specifically help you, but gnus groks <url:http://...>
when broken across lines.

This doesn't work:

http://www.telegraph.co.uk:80/et?ac=000405944438668&rtmo=
r3Q2F9hX&atmo=HHHHHH8L&pg=/et/00/2/21/wrom21.html

This works:

<url:http://www.telegraph.co.uk:80/et?ac=000405944438668&rtmo=
r3Q2F9hX&atmo=HHHHHH8L&pg=/et/00/2/21/wrom21.html>

-- 
Bill White . billw@wolfram.com . http://members.wri.com/billw
"No ma'am, we're musicians."




^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2000-04-28 11:39 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-04-24 16:38 strange highlightings Vladimir Volovich
2000-04-24 18:47 ` Kai Großjohann
2000-04-24 19:40   ` Vladimir Volovich
2000-04-25 11:06     ` Kai Großjohann
2000-04-25 11:54       ` Daniel Pittman
2000-04-25 12:09       ` Vladimir Volovich
2000-04-25 13:36       ` Per Abrahamsen
2000-04-25 14:18         ` Kai Großjohann
2000-04-25 14:31           ` Per Abrahamsen
2000-04-25 19:24             ` Felix Lee
2000-04-25 20:16               ` Kai Großjohann
2000-04-27 18:30           ` wrapped URLs (was: strange highlightings) Jussi Yli-Urpo
2000-04-28 11:39             ` Bill White
2000-04-26 19:37     ` strange highlightings Karl EICHWALDER

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 NNTP newsgroup(s).