emacs-devel
[Top][All Lists]
Advanced

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

Another issue with thingatpt


From: Bob Rogers
Subject: Another issue with thingatpt
Date: Wed, 27 Dec 2006 15:29:02 -0500

   From: Werner LEMBERG <address@hidden>
   Date: Wed, 27 Dec 2006 11:50:42 +0100 (CET)

   Here's another problematic URL:

     http://mousai.kanji.zinbun.kyoto-u.ac.jp/ids-find?components=&U+20207;

   thingatpt ignores the final `;'.

       Werner

According to RFC3986 (aka STD066), this is wrong; ";" is legitimate
anywhere in a path or query part, including the end.  So are "." and
",", but thing-at-point-url-path-regexp also refuses to match these
characters at the end of the string.  Doing (ffap-string-at-point 'url)
drops these characters plus ":", "!", and (questionably) "?".

   It may not be possible to find a tradeoff between RFC compliance and
parsing dwimmery that would satisfy everybody.  Since stripping off
trailing punctuation is useful behavior (ISTR it's worked this way for a
while now), I would recommend against changing it now.  However, a case
could be made for making thing-at-point and ffap-string-at-point
consistent.  Perhaps "!:;.," would be best?  This is just the union of
the two sets but without the dubious inclusion of "?".

                                        -- Bob Rogers
                                           http://rgrjr.dyndns.org/




reply via email to

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