GNU bug report logs - #7614
Is (thing-at-point 'url) hallucinating too much?

Previous Next

Package: emacs;

Reported by: Lennart Borgman <lennart.borgman <at> gmail.com>

Date: Sat, 11 Dec 2010 01:01:02 UTC

Severity: wishlist

Done: Lars Magne Ingebrigtsen <lmi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: Lennart Borgman <lennart.borgman <at> gmail.com>
Cc: 7614 <at> debbugs.gnu.org
Subject: bug#7614: Is (thing-at-point 'url) hallucinating too much?
Date: Thu, 30 Jun 2011 04:00:53 +0200
Lennart Borgman <lennart.borgman <at> gmail.com> writes:

> (thing-at-point 'url) thinks WORD is the url http://WORD.
>
> (url-get-url-at-point) does not see any url there.
>
> I think thing-at-point is a bit too afraid of failing to find an url.
> Maybe the latter function could learn thing-at-point to be a bit
> braver and see reality a bit clearer?

Would it make sense just to have

(thing-at-point 'url)

just call

(url-get-url-at-point)

to avoid code duplication?  On the other hand, thingatpt is meant to be
really sloppy, so I'm not sure it's a bug at all.

For instance, `thing-at-point' will do the right thing with this "url":

gnus.org

while `url-get-url-at-point' doesn't...

So perhaps a sufficient fix would be to require that the word should
have a dot in it somewhere?

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




This bug report was last modified 13 years and 328 days ago.

Previous Next


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