GNU bug report logs - #6695
24.0.50; thing-at-point-url-at-point and ffap-guesser problem

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: minor; Reported by: "Drew Adams" <drew.adams@HIDDEN>; Keywords: patch; merged with #8439, #13087; dated Wed, 21 Jul 2010 18:17:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Forcibly Merged 6695 8439 13087. Request was from Glenn Morris <rgm@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Forcibly Merged 6695 8439. Request was from Lars Magne Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 6695 <at> debbugs.gnu.org:


Received: (at 6695) by debbugs.gnu.org; 14 Jul 2011 16:29:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jul 14 12:29:36 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1QhOnA-0004He-Av
	for submit <at> debbugs.gnu.org; Thu, 14 Jul 2011 12:29:36 -0400
Received: from acsinet15.oracle.com ([141.146.126.227])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <drew.adams@HIDDEN>) id 1QhOn8-0004HQ-R4
	for 6695 <at> debbugs.gnu.org; Thu, 14 Jul 2011 12:29:35 -0400
Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237])
	by acsinet15.oracle.com (Switch-3.4.4/Switch-3.4.4) with ESMTP id
	p6EGTRc1025075
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Thu, 14 Jul 2011 16:29:28 GMT
Received: from acsmt356.oracle.com (acsmt356.oracle.com [141.146.40.156])
	by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id
	p6EGTQgY009715
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Thu, 14 Jul 2011 16:29:26 GMT
Received: from abhmt106.oracle.com (abhmt106.oracle.com [141.146.116.58])
	by acsmt356.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id
	p6EGTLV8004678; Thu, 14 Jul 2011 11:29:21 -0500
Received: from dradamslap1 (/130.35.178.194)
	by default (Oracle Beehive Gateway v4.0)
	with ESMTP ; Thu, 14 Jul 2011 09:29:20 -0700
From: "Drew Adams" <drew.adams@HIDDEN>
To: "'Lars Magne Ingebrigtsen'" <larsi@HIDDEN>
References: <F573D4FF77CA40E0B566C245AF27E46E@HIDDEN>
	<m3tyap805m.fsf@HIDDEN>
Subject: RE: 24.0.50; thing-at-point-url-at-point and ffap-guesser problem
Date: Thu, 14 Jul 2011 09:29:19 -0700
Message-ID: <0C6ECB66B9154AEFB52AD5EDD9B54E6F@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Office Outlook 11
In-Reply-To: <m3tyap805m.fsf@HIDDEN>
Thread-Index: AcxCLqTv5DBw8p8IQEGbO1riX5DNAwAE7qKg
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6109
X-Source-IP: acsinet21.oracle.com [141.146.126.237]
X-Auth-Type: Internal IP
X-CT-RefId: str=0001.0A090202.4E1F1968.0111:SCFMA922111,ss=1,re=-4.000,fgs=0
X-Spam-Score: -4.3 (----)
X-Debbugs-Envelope-To: 6695
Cc: 6695 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -4.3 (----)

> These both return nil for me in Emacs 24.

Yes.  So it is still not fixed, but is broken in another way.

Well, to be fair, punting and returning nil is not incorrect in the sense that
it gives the wrong URL.  It is incorrect in that it does not give the (correct)
URL at all.  It says, in effect, there is no URL at point, which is wrong.

> > Neither of those is remotely correct.
> >
> > 3. Put the cursor on the g of Settings.
> >    M-: (ffap-guesser) => nil

In the case of `ffap-guesser' it is perhaps too strong to say that a nil value
indicates that there is no URL at point (as in the `thing-at-point' case).  It
is only claiming to "guess", whereas `thing-at-point' returning nil claims that
there is no URL at point, and programs should be able to depend on that.

> > What should happen:
> >
> > `ffap-guesser' should return
> > "c:/Documents and Settings/foobar/My Documents/MyStuff/foo.pdf"
> >
> > `thing-at-point-url-at-point should return
> > "http://c:/Documents and Settings/foobar/My 
> Documents/MyStuff/foo.pdf"
> 
> I don't really see how guessing that these things are file names is
> feasible.

Why not?  That's their job.

> Unless one adds special matches for Windows where [letter]:/ matches
> stuff until the end of the line or something...

Maybe.  Dunno.  It would be good for someone knowledgable in thingatpt.el and
ffap.el take a look and see how these cases can be improved.

In the case of ffap.el, I guess you could call this an enhancement request,
since returning `nil' is just giving up and saying it has no "guess".  In the
case of thingatpt.el, this is a bug: it claims incorrectly that there is no URL
at point.





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#6695; Package emacs. Full text available.

Message received at 6695 <at> debbugs.gnu.org:


Received: (at 6695) by debbugs.gnu.org; 14 Jul 2011 14:02:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jul 14 10:02:25 2011
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1QhMUf-00040v-45
	for submit <at> debbugs.gnu.org; Thu, 14 Jul 2011 10:02:25 -0400
Received: from hermes.netfonds.no ([80.91.224.195])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <larsi@HIDDEN>) id 1QhMUZ-00040S-Gv
	for 6695 <at> debbugs.gnu.org; Thu, 14 Jul 2011 10:02:19 -0400
Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58]
	helo=quimbies.gnus.org)
	by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16)
	(Exim 4.72) (envelope-from <larsi@HIDDEN>)
	id 1QhMUO-00071T-2U; Thu, 14 Jul 2011 16:02:04 +0200
From: Lars Magne Ingebrigtsen <larsi@HIDDEN>
To: "Drew Adams" <drew.adams@HIDDEN>
Subject: Re: 24.0.50; thing-at-point-url-at-point and ffap-guesser problem
In-Reply-To: <F573D4FF77CA40E0B566C245AF27E46E@HIDDEN> (Drew Adams's
	message of "Wed, 21 Jul 2010 11:16:25 -0700")
Date: Thu, 14 Jul 2011 15:25:09 +0200
Message-ID: <m3tyap805m.fsf@HIDDEN>
References: <F573D4FF77CA40E0B566C245AF27E46E@HIDDEN>
User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux)
X-Now-Playing: Depeche Mode's _Black Celebration_
X-Hashcash: 1:23:110714:6695 <at> debbugs.gnu.org::WEo1TVePx03LqOT4:00000000000000000000000000000000000000000u/pv
X-Hashcash: 1:23:110714:drew.adams@HIDDEN::QEBmBlo1jMbYew3d:0000000000000000000000000000000000000001pW1+
MIME-Version: 1.0
Content-Type: text/plain
X-MailScanner-ID: 1QhMUO-00071T-2U
X-Netfonds-MailScanner: Found to be clean
X-Netfonds-MailScanner-From: larsi@HIDDEN
MailScanner-NULL-Check: 1311256924.26677@eWMAfL5HLG4ehOJyjGk0yw
X-Spam-Status: No
X-Spam-Score: -2.7 (--)
X-Debbugs-Envelope-To: 6695
Cc: 6695 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.7 (--)

"Drew Adams" <drew.adams@HIDDEN> writes:

> Load thingatpt.el and ffap.el.  Use this test line of text:
>
> ;; c:/Documents and Settings/foobar/My Documents/MyStuff/foo.pdf
>
> 1. Put the cursor on the g of Settings.
>    M-: (thing-at-point-url-at-point) => "http://Settings/foobar/My"
>
> 2. Put the cursor on the S of MyStuff.
>    M-: (thing-at-point-url-at-point) =>
>    "http://Documents/MyStuff/foo.pdf"

These both return nil for me in Emacs 24.

> Neither of those is remotely correct.
>
> 3. Put the cursor on the g of Settings.
>    M-: (ffap-guesser) => nil

[...]

> What should happen:
>
> `ffap-guesser' should return
> "c:/Documents and Settings/foobar/My Documents/MyStuff/foo.pdf"
>
> `thing-at-point-url-at-point should return
> "http://c:/Documents and Settings/foobar/My Documents/MyStuff/foo.pdf"

I don't really see how guessing that these things are file names is
feasible.

Unless one adds special matches for Windows where [letter]:/ matches
stuff until the end of the line or something...

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




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#6695; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 21 Jul 2010 18:16:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jul 21 14:16:23 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Obdq7-0007i1-5r
	for submit <at> debbugs.gnu.org; Wed, 21 Jul 2010 14:16:23 -0400
Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <drew.adams@HIDDEN>) id 1Obdq5-0007hs-5z
	for submit <at> debbugs.gnu.org; Wed, 21 Jul 2010 14:16:17 -0400
Received: from lists.gnu.org ([199.232.76.165]:33966)
	by monty-python.gnu.org with esmtps
	(TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60)
	(envelope-from <drew.adams@HIDDEN>) id 1ObdqW-00042v-9N
	for submit <at> debbugs.gnu.org; Wed, 21 Jul 2010 14:16:44 -0400
Received: from [140.186.70.92] (port=47508 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1ObdqU-00049G-AR
	for bug-gnu-emacs@HIDDEN; Wed, 21 Jul 2010 14:16:43 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED,
	T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69)
	(envelope-from <drew.adams@HIDDEN>) id 1ObdqT-0000Sm-6K
	for bug-gnu-emacs@HIDDEN; Wed, 21 Jul 2010 14:16:42 -0400
Received: from rcsinet10.oracle.com ([148.87.113.121]:47666)
	by eggs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <drew.adams@HIDDEN>) id 1ObdqS-0000Sc-VT
	for bug-gnu-emacs@HIDDEN; Wed, 21 Jul 2010 14:16:41 -0400
Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227])
	by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id
	o6LIGcg2011411
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK)
	for <bug-gnu-emacs@HIDDEN>; Wed, 21 Jul 2010 18:16:39 GMT
Received: from acsmt354.oracle.com (acsmt354.oracle.com [141.146.40.154])
	by acsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id
	o6LGlbSl016687
	for <bug-gnu-emacs@HIDDEN>; Wed, 21 Jul 2010 18:16:30 GMT
Received: from abhmt006.oracle.com by acsmt353.oracle.com
	with ESMTP id 424747431279736184; Wed, 21 Jul 2010 11:16:24 -0700
Received: from dradamslap1 (/130.35.178.194)
	by default (Oracle Beehive Gateway v4.0)
	with ESMTP ; Wed, 21 Jul 2010 11:16:23 -0700
From: "Drew Adams" <drew.adams@HIDDEN>
To: <bug-gnu-emacs@HIDDEN>
Subject: 24.0.50; thing-at-point-url-at-point and ffap-guesser problem
Date: Wed, 21 Jul 2010 11:16:25 -0700
Message-ID: <F573D4FF77CA40E0B566C245AF27E46E@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Office Outlook 11
Thread-Index: AcspANTOhAAhUHlUQ0q1cLGazf6y3A==
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5931
X-Source-IP: acsmt354.oracle.com [141.146.40.154]
X-Auth-Type: Internal IP
X-CT-RefId: str=0001.0A090209.4C47397F.002D:SCFMA4539814,ss=1,fgs=0
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6,
	seldom 2.4 (older, 4)
X-Spam-Score: -6.3 (------)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -4.3 (----)

emacs -Q
 
Load thingatpt.el and ffap.el.  Use this test line of text:
 
;; c:/Documents and Settings/foobar/My Documents/MyStuff/foo.pdf
 
1. Put the cursor on the g of Settings.
   M-: (thing-at-point-url-at-point) => "http://Settings/foobar/My"
 
2. Put the cursor on the S of MyStuff.
   M-: (thing-at-point-url-at-point) =>
   "http://Documents/MyStuff/foo.pdf"
 
Neither of those is remotely correct.
 
3. Put the cursor on the g of Settings.
   M-: (ffap-guesser) => nil
 
   Same thing with cursor *anywhere* on the absolute file name, except:
   If the cursor is on any character in this string: "c:/Documents" then
   (ffap-guesser) returns "c:/Documents and Settings/" (which is also
   wrong).
 
What should happen:
 
`ffap-guesser' should return
"c:/Documents and Settings/foobar/My Documents/MyStuff/foo.pdf"
 
`thing-at-point-url-at-point should return
"http://c:/Documents and Settings/foobar/My Documents/MyStuff/foo.pdf"
 

In GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600)
 of 2010-07-19 on 3249CTO
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (4.4) --no-opt --cflags -Ic:/xpm/include'
 





Acknowledgement sent to "Drew Adams" <drew.adams@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#6695; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 31 Oct 2014 17:00:04 UTC

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