emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FFAP


From: Juri Linkov
Subject: Re: FFAP
Date: Tue, 10 Nov 2009 09:44:04 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (x86_64-pc-linux-gnu)

>> Like URL part of `ffap-string-at-point-mode-alist', it counterpart
>> `thing-at-point-url-path-regexp' contains `,' as well.  Indeed,
>> calling (thing-at-point 'url) on an URL with `,' like
>> "http://www.google.com/search?q=foo,bar"; returns the complete URL.
>> Perhaps there are other differences, but the comma case seems to be
>> the same in both.
>
> Yes. You are correct. I am mistaking `thing-at-point' w/
> `url-get-url-at-point' and var `url-get-url-filename-chars'
> which do fail. Sorry for the noise.

So this is a third package to get an URL at point :)

> ,---- :FILE /url/url-util.el
> | (eval-and-compile
> |   (defvar url-get-url-filename-chars "address@hidden()_/:~=&"
> |     "Valid characters in a URL."))
> `----

Let's compare allowed URL characters for all of them:

ffap        "--:=&address@hidden:alpha:]~#,%;*"
thingatpt   "[^]\t\n \"'<>[^`{}]*[^]\t\n \"'<>[^`{}.,;]+"
url-util    "address@hidden()_/:~=&"

> Then evaluate `url-get-url-at-point' for following:
>
> http://www.vintagefashionguild.org/component/option,com_alphacontent/section,6/cat,59/task,view/id,496/Itemid,100/

This URL is from Joomla that uses commas to separate keywords.
Commas are also frequent in Drupal where they separate tags.
So I think a comma should be added to `url-get-url-filename-chars'.

> :SEE-ALSO Sam Steingold's function `get-quotes-pf' with commented
> gripes pertaining `,' in URL's:
> (URL 
> `http://clocc.cvs.sourceforge.net/*checkout*/clocc/clocc/src/cllib/gq.lisp')

`,' in URLs are very common nowadays.

-- 
Juri Linkov
http://www.jurta.org/emacs/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]