From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: FFAP Date: Tue, 10 Nov 2009 09:44:04 +0200 Organization: JURTA Message-ID: <87my2vggvv.fsf@mail.jurta.org> References: <87my2w4gy6.fsf@mail.jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1257839551 28166 80.91.229.12 (10 Nov 2009 07:52:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 10 Nov 2009 07:52:31 +0000 (UTC) Cc: emacs-devel@gnu.org To: MON KEY Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 10 08:52:24 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1N7lWZ-0007aC-6a for ged-emacs-devel@m.gmane.org; Tue, 10 Nov 2009 08:52:23 +0100 Original-Received: from localhost ([127.0.0.1]:54664 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N7lWY-0007KA-Nr for ged-emacs-devel@m.gmane.org; Tue, 10 Nov 2009 02:52:22 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N7lWT-0007Jp-EW for emacs-devel@gnu.org; Tue, 10 Nov 2009 02:52:17 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N7lWO-0007JN-S4 for emacs-devel@gnu.org; Tue, 10 Nov 2009 02:52:17 -0500 Original-Received: from [199.232.76.173] (port=46115 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N7lWO-0007JK-O7 for emacs-devel@gnu.org; Tue, 10 Nov 2009 02:52:12 -0500 Original-Received: from mx20.gnu.org ([199.232.41.8]:17194) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1N7lWO-0002gw-7g for emacs-devel@gnu.org; Tue, 10 Nov 2009 02:52:12 -0500 Original-Received: from smtp-out1.starman.ee ([85.253.0.3] helo=mx1.starman.ee) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N7lWM-0006Xb-5p for emacs-devel@gnu.org; Tue, 10 Nov 2009 02:52:10 -0500 X-Virus-Scanned: by Amavisd-New at mx1.starman.ee Original-Received: from mail.starman.ee (62.65.211.91.cable.starman.ee [62.65.211.91]) by mx1.starman.ee (Postfix) with ESMTP id 602893F41DA; Tue, 10 Nov 2009 09:52:02 +0200 (EET) In-Reply-To: (MON KEY's message of "Mon, 9 Nov 2009 13:14:15 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (x86_64-pc-linux-gnu) X-detected-operating-system: by mx20.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:116792 Archived-At: >> 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 "-%.?@a-zA-Z0-9()_/:~=&" > | "Valid characters in a URL.")) > `---- Let's compare allowed URL characters for all of them: ffap "--:=&?$+@-Z_[:alpha:]~#,%;*" thingatpt "[^]\t\n \"'<>[^`{}]*[^]\t\n \"'<>[^`{}.,;]+" url-util "-%.?@a-zA-Z0-9()_/:~=&" > 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/