unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#7614: Is (thing-at-point 'url) hallucinating too much?
@ 2010-12-11  1:06 Lennart Borgman
  2011-06-30  2:00 ` Lars Magne Ingebrigtsen
       [not found] ` <mailman.696.1309399332.785.bug-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 3+ messages in thread
From: Lennart Borgman @ 2010-12-11  1:06 UTC (permalink / raw)
  To: 7614

(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?

This thing-at-point lives in a trunk checkout from 2010-10-19.





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

* bug#7614: Is (thing-at-point 'url) hallucinating too much?
  2010-12-11  1:06 bug#7614: Is (thing-at-point 'url) hallucinating too much? Lennart Borgman
@ 2011-06-30  2:00 ` Lars Magne Ingebrigtsen
       [not found] ` <mailman.696.1309399332.785.bug-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 3+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-06-30  2:00 UTC (permalink / raw)
  To: Lennart Borgman; +Cc: 7614

Lennart Borgman <lennart.borgman@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/





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

* bug#7614: Is (thing-at-point 'url) hallucinating too much?
       [not found] ` <mailman.696.1309399332.785.bug-gnu-emacs@gnu.org>
@ 2011-06-30  2:06   ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 3+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-06-30  2:06 UTC (permalink / raw)
  To: Lennart Borgman; +Cc: 7614-close

Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

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

I've now committed this change.

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





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

end of thread, other threads:[~2011-06-30  2:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-11  1:06 bug#7614: Is (thing-at-point 'url) hallucinating too much? Lennart Borgman
2011-06-30  2:00 ` Lars Magne Ingebrigtsen
     [not found] ` <mailman.696.1309399332.785.bug-gnu-emacs@gnu.org>
2011-06-30  2:06   ` Lars Magne Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).