GNU bug report logs - #21391
24.5; `thing-at-point' returns error when called with arguments 'number t

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: Tino Calancha <f92capac@HIDDEN>; dated Tue, 1 Sep 2015 01:57:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

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


Received: (at 21391) by debbugs.gnu.org; 10 Nov 2016 19:59:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 10 14:59:16 2016
Received: from localhost ([127.0.0.1]:52688 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1c4vVE-0005YU-FX
	for submit <at> debbugs.gnu.org; Thu, 10 Nov 2016 14:59:16 -0500
Received: from eggs.gnu.org ([208.118.235.92]:40482)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1c4vVC-0005YI-OT
 for 21391 <at> debbugs.gnu.org; Thu, 10 Nov 2016 14:59:15 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1c4vV3-0007t8-Fd
 for 21391 <at> debbugs.gnu.org; Thu, 10 Nov 2016 14:59:09 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_40,RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:47874)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1c4vV3-0007t1-Ck; Thu, 10 Nov 2016 14:59:05 -0500
Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4938
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1c4vV1-0004Ae-ST; Thu, 10 Nov 2016 14:59:05 -0500
Date: Thu, 10 Nov 2016 21:59:01 +0200
Message-Id: <83pom3ds3e.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Dmitry Gutov <dgutov@HIDDEN>
In-reply-to: <73be4b9d-2df8-cc83-b873-398cb7dd043b@HIDDEN> (message from
 Dmitry Gutov on Thu, 10 Nov 2016 20:55:44 +0200)
Subject: Re: bug#21391: 24.5; `thing-at-point' should return a string
References: <alpine.LRH.2.20.1509011056480.5317@HIDDEN>
 <alpine.DEB.2.20.1610131558480.2834@calancha-pc>
 <0a68c2ae-0940-4e2c-8b3c-1faceb45c43c@default>
 <1773ab35-70b1-42f9-8a8b-fe07881487d1@default> <874m3krnb6.fsf_-_@HIDDEN>
 <83a8dbiaps.fsf@HIDDEN> <b2484b79-3aaf-4dde-a60f-420f8a2222b8@HIDDEN>
 <83pom7gjhl.fsf@HIDDEN> <0a8d76e4-4d1b-a26d-2b76-a2d9384d9f72@HIDDEN>
 <83mvhbgitf.fsf@HIDDEN> <25bb22e8-1388-275a-d0da-7e698acdf6da@HIDDEN>
 <83inrygggr.fsf@HIDDEN> <cc2e7eab-e58d-db76-b5ed-0ec9871fad9d@HIDDEN>
 <83y40sfyij.fsf@HIDDEN> <76505436-e66c-0ed3-6d7a-ce654f38ef30@HIDDEN>
 <83bmxnfhbi.fsf@HIDDEN> <73600483-1df5-597c-6066-232189bbdd4a@HIDDEN>
 <834m3ffeb9.fsf@HIDDEN> <fcb1bcf1-20f0-3eda-1c33-df7ba085d487@HIDDEN>
 <83twbfdvav.fsf@HIDDEN> <73be4b9d-2df8-cc83-b873-398cb7dd043b@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -7.9 (-------)
X-Debbugs-Envelope-To: 21391
Cc: 21391 <at> debbugs.gnu.org, tino.calancha@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://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: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -7.9 (-------)

> Cc: tino.calancha@HIDDEN, 21391 <at> debbugs.gnu.org
> From: Dmitry Gutov <dgutov@HIDDEN>
> Date: Thu, 10 Nov 2016 20:55:44 +0200
> 
> On 10.11.2016 20:49, Eli Zaretskii wrote:
> 
> >> If the consumer needs the text representation, they will call
> >>
> >> (thing-at-point 'foo)
> >>
> >> If they need the "real thing", they will call
> >>
> >> (foo-at-point)
> >>
> >> which we really expect to be defined.
> >
> > Which is again entirely backward incompatible, right?
> 
> Why do you think so?

Because currently they can call thing-at-point without defining
foo-at-point.  AFAIU, you suggest to deny them this possibility, and
force them to define foo-at-point for every foo.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21391; Package emacs. Full text available.

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


Received: (at 21391) by debbugs.gnu.org; 10 Nov 2016 18:55:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 10 13:55:55 2016
Received: from localhost ([127.0.0.1]:52647 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1c4uVv-00043w-GL
	for submit <at> debbugs.gnu.org; Thu, 10 Nov 2016 13:55:55 -0500
Received: from mail-wm0-f42.google.com ([74.125.82.42]:36225)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1c4uVu-00043j-N3
 for 21391 <at> debbugs.gnu.org; Thu, 10 Nov 2016 13:55:54 -0500
Received: by mail-wm0-f42.google.com with SMTP id g23so59041236wme.1
 for <21391 <at> debbugs.gnu.org>; Thu, 10 Nov 2016 10:55:54 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=sender:subject:to:references:cc:from:message-id:date:user-agent
 :mime-version:in-reply-to:content-language:content-transfer-encoding;
 bh=Dp10G+5LffYODLwTAVk3Vf9+mnMLoMEHhE1fBkJmP2I=;
 b=ERg4ubOlKq2WrBhkSxc/zT+Sg7xJmaVC/tCQbV7fIVSyGz0qw/XH+W5+zhvlxJrtS/
 rLSCroW9ZNRUEfNj3oH6Vlk43LPat4ZivOlgcYF00GjLVpsOopo6XnWRVZBXL2Nxjxub
 DzqdmtRjNf/1bGe9mfHDIfbyA1OGrWqbzAG4Jr2hqiTh+XKOYRj9orzNAmtlKKcJXwUe
 utGMy6Jt/AekOuoVZLS/eCXPCXv3B8eQ9PQwr4eOQVJ+eJGLogDFo7baXr5om4V96hG4
 jYdSFUTcbf/H3ajChG6Gs3cd9/eB8BZLGciQ8LQV82fwDaizQdnl5r1wkjCdEcJMKCHQ
 rD9w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:sender:subject:to:references:cc:from:message-id
 :date:user-agent:mime-version:in-reply-to:content-language
 :content-transfer-encoding;
 bh=Dp10G+5LffYODLwTAVk3Vf9+mnMLoMEHhE1fBkJmP2I=;
 b=BeZNikG3JtwM0NWeLXb7RyP8yotxyeaVrsD/vgU6zgUcdr8RWkqhFHzAVUHtHEm7zz
 sJMgGZejV6/RfsrXhr60JyAOw4hJFt3OEPJc2LvriWdGM6a588dcEtoAk8DZ6nQPBrH5
 DpvzvRUcpxinr3Hj+Dp34n8uBfTADs4rYOb8iLYHzye3uWleGK0dt8yZo4WfYNzHA7YR
 kQvmtSpRN1aAU7R8Uc4YJyl6Nzwct071A1MF+WmQY61galBSY28IxvEdmrhMqnIPDQPc
 thphD2hj81v35SZ1ZXwlzMgg4bbwBQR0rjXPoVOU170yMAQTd6ekCy6+PDqbule/cFhM
 RkDQ==
X-Gm-Message-State: ABUngvd5+rL0TxqNMjXXJdqCAKl1ahQ9G53+qomhnPA/ui0xAPPj2wfQ7Kjib1gqlPhXSw==
X-Received: by 10.28.4.199 with SMTP id 190mr30193291wme.11.1478804148906;
 Thu, 10 Nov 2016 10:55:48 -0800 (PST)
Received: from [192.168.1.3] ([185.105.173.41])
 by smtp.googlemail.com with ESMTPSA id pd2sm6954597wjb.31.2016.11.10.10.55.46
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Thu, 10 Nov 2016 10:55:48 -0800 (PST)
Subject: Re: bug#21391: 24.5; `thing-at-point' should return a string
To: Eli Zaretskii <eliz@HIDDEN>
References: <alpine.LRH.2.20.1509011056480.5317@HIDDEN>
 <alpine.DEB.2.20.1610131558480.2834@calancha-pc>
 <0a68c2ae-0940-4e2c-8b3c-1faceb45c43c@default>
 <1773ab35-70b1-42f9-8a8b-fe07881487d1@default> <874m3krnb6.fsf_-_@HIDDEN>
 <83a8dbiaps.fsf@HIDDEN> <b2484b79-3aaf-4dde-a60f-420f8a2222b8@HIDDEN>
 <83pom7gjhl.fsf@HIDDEN> <0a8d76e4-4d1b-a26d-2b76-a2d9384d9f72@HIDDEN>
 <83mvhbgitf.fsf@HIDDEN> <25bb22e8-1388-275a-d0da-7e698acdf6da@HIDDEN>
 <83inrygggr.fsf@HIDDEN> <cc2e7eab-e58d-db76-b5ed-0ec9871fad9d@HIDDEN>
 <83y40sfyij.fsf@HIDDEN> <76505436-e66c-0ed3-6d7a-ce654f38ef30@HIDDEN>
 <83bmxnfhbi.fsf@HIDDEN> <73600483-1df5-597c-6066-232189bbdd4a@HIDDEN>
 <834m3ffeb9.fsf@HIDDEN> <fcb1bcf1-20f0-3eda-1c33-df7ba085d487@HIDDEN>
 <83twbfdvav.fsf@HIDDEN>
From: Dmitry Gutov <dgutov@HIDDEN>
Message-ID: <73be4b9d-2df8-cc83-b873-398cb7dd043b@HIDDEN>
Date: Thu, 10 Nov 2016 20:55:44 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101
 Thunderbird/50.0
MIME-Version: 1.0
In-Reply-To: <83twbfdvav.fsf@HIDDEN>
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 21391
Cc: 21391 <at> debbugs.gnu.org, tino.calancha@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://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: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.5 (/)

On 10.11.2016 20:49, Eli Zaretskii wrote:

>> If the consumer needs the text representation, they will call
>>
>> (thing-at-point 'foo)
>>
>> If they need the "real thing", they will call
>>
>> (foo-at-point)
>>
>> which we really expect to be defined.
>
> Which is again entirely backward incompatible, right?

Why do you think so? This is the normal usage of thingatpt.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21391; Package emacs. Full text available.

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


Received: (at 21391) by debbugs.gnu.org; 10 Nov 2016 18:49:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 10 13:49:57 2016
Received: from localhost ([127.0.0.1]:52633 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1c4uQ9-0003uu-8W
	for submit <at> debbugs.gnu.org; Thu, 10 Nov 2016 13:49:57 -0500
Received: from eggs.gnu.org ([208.118.235.92]:41438)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1c4uQ7-0003ug-6T
 for 21391 <at> debbugs.gnu.org; Thu, 10 Nov 2016 13:49:55 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1c4uPy-00076f-0c
 for 21391 <at> debbugs.gnu.org; Thu, 10 Nov 2016 13:49:49 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_40,RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:47141)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1c4uPx-00076U-T1; Thu, 10 Nov 2016 13:49:45 -0500
Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4883
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1c4uPw-0001rs-Mt; Thu, 10 Nov 2016 13:49:45 -0500
Date: Thu, 10 Nov 2016 20:49:44 +0200
Message-Id: <83twbfdvav.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Dmitry Gutov <dgutov@HIDDEN>
In-reply-to: <fcb1bcf1-20f0-3eda-1c33-df7ba085d487@HIDDEN> (message from
 Dmitry Gutov on Thu, 10 Nov 2016 19:28:17 +0200)
Subject: Re: bug#21391: 24.5; `thing-at-point' should return a string
References: <alpine.LRH.2.20.1509011056480.5317@HIDDEN>
 <alpine.DEB.2.20.1610131558480.2834@calancha-pc>
 <0a68c2ae-0940-4e2c-8b3c-1faceb45c43c@default>
 <1773ab35-70b1-42f9-8a8b-fe07881487d1@default> <874m3krnb6.fsf_-_@HIDDEN>
 <83a8dbiaps.fsf@HIDDEN> <b2484b79-3aaf-4dde-a60f-420f8a2222b8@HIDDEN>
 <83pom7gjhl.fsf@HIDDEN> <0a8d76e4-4d1b-a26d-2b76-a2d9384d9f72@HIDDEN>
 <83mvhbgitf.fsf@HIDDEN> <25bb22e8-1388-275a-d0da-7e698acdf6da@HIDDEN>
 <83inrygggr.fsf@HIDDEN> <cc2e7eab-e58d-db76-b5ed-0ec9871fad9d@HIDDEN>
 <83y40sfyij.fsf@HIDDEN> <76505436-e66c-0ed3-6d7a-ce654f38ef30@HIDDEN>
 <83bmxnfhbi.fsf@HIDDEN> <73600483-1df5-597c-6066-232189bbdd4a@HIDDEN>
 <834m3ffeb9.fsf@HIDDEN> <fcb1bcf1-20f0-3eda-1c33-df7ba085d487@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -7.9 (-------)
X-Debbugs-Envelope-To: 21391
Cc: 21391 <at> debbugs.gnu.org, tino.calancha@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://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: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -7.9 (-------)

> Cc: tino.calancha@HIDDEN, 21391 <at> debbugs.gnu.org
> From: Dmitry Gutov <dgutov@HIDDEN>
> Date: Thu, 10 Nov 2016 19:28:17 +0200
> 
> On 10.11.2016 19:13, Eli Zaretskii wrote:
> 
> > But that's exactly my point: you cannot usefully return some objects
> > as strings.  Their text representation is much less useful than the
> > object itself.
> 
> If the consumer needs the text representation, they will call
> 
> (thing-at-point 'foo)
> 
> If they need the "real thing", they will call
> 
> (foo-at-point)
> 
> which we really expect to be defined.

Which is again entirely backward incompatible, right?

Sorry, this doesn't sound safe to me.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21391; Package emacs. Full text available.

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


Received: (at 21391) by debbugs.gnu.org; 10 Nov 2016 18:27:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 10 13:27:56 2016
Received: from localhost ([127.0.0.1]:52625 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1c4u4q-0003Oe-CV
	for submit <at> debbugs.gnu.org; Thu, 10 Nov 2016 13:27:56 -0500
Received: from userp1040.oracle.com ([156.151.31.81]:28252)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>) id 1c4u4o-0003OR-DE
 for 21391 <at> debbugs.gnu.org; Thu, 10 Nov 2016 13:27:54 -0500
Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233])
 by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id
 uAAIRl02003431
 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
 Thu, 10 Nov 2016 18:27:47 GMT
Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72])
 by aserv0021.oracle.com (8.13.8/8.13.8) with ESMTP id uAAIRkV1007958
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
 Thu, 10 Nov 2016 18:27:47 GMT
Received: from abhmp0008.oracle.com (abhmp0008.oracle.com [141.146.116.14])
 by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id uAAIRj4Q031324;
 Thu, 10 Nov 2016 18:27:46 GMT
MIME-Version: 1.0
Message-ID: <d56f4f85-fa89-4c5d-9738-6beba7fb6aca@default>
Date: Thu, 10 Nov 2016 10:27:44 -0800 (PST)
From: Drew Adams <drew.adams@HIDDEN>
To: Dmitry Gutov <dgutov@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>
Subject: RE: bug#21391: 24.5; `thing-at-point' should return a string
References: <alpine.LRH.2.20.1509011056480.5317@HIDDEN>
 <alpine.DEB.2.20.1610131558480.2834@calancha-pc>
 <0a68c2ae-0940-4e2c-8b3c-1faceb45c43c@default>
 <1773ab35-70b1-42f9-8a8b-fe07881487d1@default> <874m3krnb6.fsf_-_@HIDDEN>
 <83a8dbiaps.fsf@HIDDEN> <b2484b79-3aaf-4dde-a60f-420f8a2222b8@HIDDEN>
 <83pom7gjhl.fsf@HIDDEN> <0a8d76e4-4d1b-a26d-2b76-a2d9384d9f72@HIDDEN>
 <83mvhbgitf.fsf@HIDDEN> <25bb22e8-1388-275a-d0da-7e698acdf6da@HIDDEN>
 <83inrygggr.fsf@HIDDEN> <cc2e7eab-e58d-db76-b5ed-0ec9871fad9d@HIDDEN>
 <83y40sfyij.fsf@HIDDEN> <76505436-e66c-0ed3-6d7a-ce654f38ef30@HIDDEN>
 <83bmxnfhbi.fsf@HIDDEN> <73600483-1df5-597c-6066-232189bbdd4a@HIDDEN>
In-Reply-To: <73600483-1df5-597c-6066-232189bbdd4a@HIDDEN>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1  (1003210) [OL
 12.0.6753.5000 (x86)]
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Source-IP: aserv0021.oracle.com [141.146.126.233]
X-Spam-Score: -8.1 (--------)
X-Debbugs-Envelope-To: 21391
Cc: 21391 <at> debbugs.gnu.org, tino.calancha@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://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: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -8.1 (--------)

> And another inconsistency:
> (bounds-of-thing-at-point 'number) always returns nil.

It's not an inconsistency.  It's a bug.

`thingatpt.el' HAS bugs.  I've provided patches and filed bug
reports, pointing to code that fixes things.  All of that has
been ignored.  I've been using the fixed code for years, and
so have others.

In my code I do this, and things work fine:

(put 'number 'tap-bounds-of-thing-at-point 'tap-bounds-of-number-at-point)

(defun tap-bounds-of-number-at-point ()
  "Return the bounds of the number represented by the numeral at point.
Return nil if none is found."
  (and (number-at-point)  (tap-bounds-of-thing-at-point 'sexp)))

`bounds-of-thing-at-point' is broken.  I've provided a fix for it, which
you've rejected summarily, based on your own perceived "need" to force
`thing-at-point' to not respect "at point" but try to return things that
are only near point - things that are either here or there - no "at".

> We won't lose that if we go with either of my proposals: instead of
> printing objects inside the thing-at-point function, we would
> require that each returned thing is a string already. Any thing-at-point
> function that returns a non-string will be considered non-conformant.

You want to throw out the baby with the bathwater.  You have no use
for what is truly useful in thingatpt.  You ignore the design and
insist on your own interpretation of what's "useless" or "inconsistent".




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21391; Package emacs. Full text available.

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


Received: (at 21391) by debbugs.gnu.org; 10 Nov 2016 17:28:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 10 12:28:29 2016
Received: from localhost ([127.0.0.1]:52556 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1c4t9I-0001uD-H5
	for submit <at> debbugs.gnu.org; Thu, 10 Nov 2016 12:28:29 -0500
Received: from mail-wm0-f49.google.com ([74.125.82.49]:36561)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1c4t9F-0001ty-S5
 for 21391 <at> debbugs.gnu.org; Thu, 10 Nov 2016 12:28:26 -0500
Received: by mail-wm0-f49.google.com with SMTP id g23so54630053wme.1
 for <21391 <at> debbugs.gnu.org>; Thu, 10 Nov 2016 09:28:25 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=sender:subject:to:references:cc:from:message-id:date:user-agent
 :mime-version:in-reply-to:content-language:content-transfer-encoding;
 bh=D4g6jCVkxzYw5ry/GVUgqZmmkKSjZhgy0MqMm9xvik4=;
 b=G/UMsHuPB8E6zmX8seJbdpmxMU3rxvgscfvoRrtLGTU5yZNUTDGb9sDLWiraomdMGN
 d6n5wZ57abjiNo4p6RRoKk7jDiQv0eGxqVi/X0u00J8knzMFH2vedldEiTElzhVc7nSP
 0QSXUPgNDNbOW2eBBpNrivyK62QJCExQNpu9X1W3R+tnEW+cZ1nzyryvrDuO9BbOTCz9
 71RmeTxCuv8pbPDjcU3g4teUBDJmsoNBY5483HNXkzFAoKrm5CTIcWCI9LB2kRJmBVGo
 nznrpOsjQTTAAuLb6WMc97WmajZwCmNV2kjkIfPM21H987eQIl+FCack1naYjymsuUDZ
 eBwg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:sender:subject:to:references:cc:from:message-id
 :date:user-agent:mime-version:in-reply-to:content-language
 :content-transfer-encoding;
 bh=D4g6jCVkxzYw5ry/GVUgqZmmkKSjZhgy0MqMm9xvik4=;
 b=KvE/VB8Y3hxcgiOvrmsV4Khcsj37IYmjU9ARdUT0JmxUoZCkN/HaVIJR6dKt4YLyWT
 /T98gfUAtuMUWJE9dhB06sdfdJvykVOm5FTjw0Z6L+1ANR3m0NHhCllQ6RXIriXRtILg
 C9FRfVnBPPPgNM/woN85tId7hW3UiOGFtxutAzI+CuAxOX3dZIwfN8398LVYQbYDl4vJ
 wmLXLfAz3ZJJ9zCKPOQFhP2UR5MlqqWa8eFdYhM2g2Jeo+v8BTvWMGGWGoS3dH7p44tq
 BTU1ZUI+GmznPCISCJ3GOpT6RJnAKd5B6BS4J4APv3IUhbIwG8WyBVk2mVCAZ+gN9Gh6
 uQow==
X-Gm-Message-State: ABUngvdFxeYwkQgYrVFmsAppNuRMh50OQ+11PlA9YHvlHLKkZtiSWdjeuk0yYspD+cN0Rg==
X-Received: by 10.194.146.228 with SMTP id tf4mr5348844wjb.183.1478798900182; 
 Thu, 10 Nov 2016 09:28:20 -0800 (PST)
Received: from [192.168.1.3] ([185.105.173.41])
 by smtp.googlemail.com with ESMTPSA id v2sm6558575wja.41.2016.11.10.09.28.18
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Thu, 10 Nov 2016 09:28:19 -0800 (PST)
Subject: Re: bug#21391: 24.5; `thing-at-point' should return a string
To: Eli Zaretskii <eliz@HIDDEN>
References: <alpine.LRH.2.20.1509011056480.5317@HIDDEN>
 <alpine.DEB.2.20.1610131558480.2834@calancha-pc>
 <0a68c2ae-0940-4e2c-8b3c-1faceb45c43c@default>
 <1773ab35-70b1-42f9-8a8b-fe07881487d1@default> <874m3krnb6.fsf_-_@HIDDEN>
 <83a8dbiaps.fsf@HIDDEN> <b2484b79-3aaf-4dde-a60f-420f8a2222b8@HIDDEN>
 <83pom7gjhl.fsf@HIDDEN> <0a8d76e4-4d1b-a26d-2b76-a2d9384d9f72@HIDDEN>
 <83mvhbgitf.fsf@HIDDEN> <25bb22e8-1388-275a-d0da-7e698acdf6da@HIDDEN>
 <83inrygggr.fsf@HIDDEN> <cc2e7eab-e58d-db76-b5ed-0ec9871fad9d@HIDDEN>
 <83y40sfyij.fsf@HIDDEN> <76505436-e66c-0ed3-6d7a-ce654f38ef30@HIDDEN>
 <83bmxnfhbi.fsf@HIDDEN> <73600483-1df5-597c-6066-232189bbdd4a@HIDDEN>
 <834m3ffeb9.fsf@HIDDEN>
From: Dmitry Gutov <dgutov@HIDDEN>
Message-ID: <fcb1bcf1-20f0-3eda-1c33-df7ba085d487@HIDDEN>
Date: Thu, 10 Nov 2016 19:28:17 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101
 Thunderbird/50.0
MIME-Version: 1.0
In-Reply-To: <834m3ffeb9.fsf@HIDDEN>
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 21391
Cc: 21391 <at> debbugs.gnu.org, tino.calancha@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://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: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.5 (/)

On 10.11.2016 19:13, Eli Zaretskii wrote:

> But that's exactly my point: you cannot usefully return some objects
> as strings.  Their text representation is much less useful than the
> object itself.

If the consumer needs the text representation, they will call

(thing-at-point 'foo)

If they need the "real thing", they will call

(foo-at-point)

which we really expect to be defined.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21391; Package emacs. Full text available.

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


Received: (at 21391) by debbugs.gnu.org; 10 Nov 2016 17:13:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 10 12:13:54 2016
Received: from localhost ([127.0.0.1]:52537 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1c4svB-0001YM-SB
	for submit <at> debbugs.gnu.org; Thu, 10 Nov 2016 12:13:54 -0500
Received: from eggs.gnu.org ([208.118.235.92]:33214)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1c4svA-0001YA-B6
 for 21391 <at> debbugs.gnu.org; Thu, 10 Nov 2016 12:13:52 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1c4sv2-00048U-6d
 for 21391 <at> debbugs.gnu.org; Thu, 10 Nov 2016 12:13:47 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:45741)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1c4sv2-00048P-2F; Thu, 10 Nov 2016 12:13:44 -0500
Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4847
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1c4sv1-0005vx-BW; Thu, 10 Nov 2016 12:13:43 -0500
Date: Thu, 10 Nov 2016 19:13:46 +0200
Message-Id: <834m3ffeb9.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Dmitry Gutov <dgutov@HIDDEN>
In-reply-to: <73600483-1df5-597c-6066-232189bbdd4a@HIDDEN> (message from
 Dmitry Gutov on Thu, 10 Nov 2016 18:19:00 +0200)
Subject: Re: bug#21391: 24.5; `thing-at-point' should return a string
References: <alpine.LRH.2.20.1509011056480.5317@HIDDEN>
 <alpine.DEB.2.20.1610131558480.2834@calancha-pc>
 <0a68c2ae-0940-4e2c-8b3c-1faceb45c43c@default>
 <1773ab35-70b1-42f9-8a8b-fe07881487d1@default> <874m3krnb6.fsf_-_@HIDDEN>
 <83a8dbiaps.fsf@HIDDEN> <b2484b79-3aaf-4dde-a60f-420f8a2222b8@HIDDEN>
 <83pom7gjhl.fsf@HIDDEN> <0a8d76e4-4d1b-a26d-2b76-a2d9384d9f72@HIDDEN>
 <83mvhbgitf.fsf@HIDDEN> <25bb22e8-1388-275a-d0da-7e698acdf6da@HIDDEN>
 <83inrygggr.fsf@HIDDEN> <cc2e7eab-e58d-db76-b5ed-0ec9871fad9d@HIDDEN>
 <83y40sfyij.fsf@HIDDEN> <76505436-e66c-0ed3-6d7a-ce654f38ef30@HIDDEN>
 <83bmxnfhbi.fsf@HIDDEN> <73600483-1df5-597c-6066-232189bbdd4a@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -7.9 (-------)
X-Debbugs-Envelope-To: 21391
Cc: 21391 <at> debbugs.gnu.org, tino.calancha@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://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: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -7.9 (-------)

> Cc: tino.calancha@HIDDEN, 21391 <at> debbugs.gnu.org
> From: Dmitry Gutov <dgutov@HIDDEN>
> Date: Thu, 10 Nov 2016 18:19:00 +0200
> 
> > We'd also lose something else: some Lisp objects can be printed, but
> > their printed representation cannot be read back.  So for some
> > objects, requiring thing-at-point to return a string would lose
> > information.
> 
> We won't lose that if we go with either of my proposals: instead of 
> printing objects inside the thing-at-point function, we would require 
> that each returned thing is a string already.

But that's exactly my point: you cannot usefully return some objects
as strings.  Their text representation is much less useful than the
object itself.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21391; Package emacs. Full text available.

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


Received: (at 21391) by debbugs.gnu.org; 10 Nov 2016 16:19:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 10 11:19:11 2016
Received: from localhost ([127.0.0.1]:52448 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1c4s4F-0000Dh-6N
	for submit <at> debbugs.gnu.org; Thu, 10 Nov 2016 11:19:11 -0500
Received: from mail-wm0-f54.google.com ([74.125.82.54]:38425)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1c4s4D-0000DR-0R
 for 21391 <at> debbugs.gnu.org; Thu, 10 Nov 2016 11:19:09 -0500
Received: by mail-wm0-f54.google.com with SMTP id f82so41805952wmf.1
 for <21391 <at> debbugs.gnu.org>; Thu, 10 Nov 2016 08:19:08 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=sender:subject:to:references:cc:from:message-id:date:user-agent
 :mime-version:in-reply-to:content-language:content-transfer-encoding;
 bh=8sZyUg8FzF4+AMChqr7Tvoc6uUc2/iex+Gg+QzcG2Mg=;
 b=Sh7V6zR2bVs8USNaqfcE6mJlY65RdjhPTKe+53m7vEQhXcE4Nq7UX6Pw6CpuG+aMzH
 4P75Q1U+gn0id9jpti+ZAtiQ3gh2P0SB6PKT6MRCabm9kofT51HU11eg4kdDemBc8Mwi
 PJDAe5biYbKBQkFYTOQFz45vL74CFQmTo0g9RQyMD1NKjvMaTVCcyYBCi60RFKk0zZDX
 f/m340HoFL04zkjcsfBo0zC2M3b9OvGNRWmfq1WDSYBY7ZzUehmjbitLyTj7HqP96D2Y
 WL0CUMkSIzLIerK0VUZjr+LXuXe2MABZ1RVQq+0vJ9eHk3Y+L+Thm7U3vFtHe3ocNp0h
 tkGA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:sender:subject:to:references:cc:from:message-id
 :date:user-agent:mime-version:in-reply-to:content-language
 :content-transfer-encoding;
 bh=8sZyUg8FzF4+AMChqr7Tvoc6uUc2/iex+Gg+QzcG2Mg=;
 b=jn6v7w0TQ5oW+w9kYyulcvxZeg3vRc7br41S7EBHLMIkNhHOyHqFry9SRQwtxL9AKT
 JCCy8Va+YjnQwjMwe6IlizDKIzE0g+wUfWzTS0GWyUu4xAA+ibkJlCoX7hhdPHowxAA2
 fC7wtNkEiuUFIbpF+is9fqPRW2IkBFnGSKWSk1O4DaaLaiBrYpnM8EXbKjrvkShRCP/J
 fKOvMhyeBw0CnBIqmWLU9atklY2RUM2CIhh1K/E3cFhQV5npb0xXNldCKgDCy00qdM+w
 RZxUomxn4RrTfR9jw1v1gNAIyX9ajz0LJ3/TKeyUCDsNPCdGsr81h1k8cGb6d7WE3Nzg
 X4WQ==
X-Gm-Message-State: ABUngvd1hIoDs3DaH7y7ZQfizrrm7blEGZeIQKrX6IfXYQbnonAPZEosH0ysfePcgh3org==
X-Received: by 10.28.69.217 with SMTP id l86mr9103292wmi.129.1478794743314;
 Thu, 10 Nov 2016 08:19:03 -0800 (PST)
Received: from [192.168.0.133] ([212.50.99.193])
 by smtp.googlemail.com with ESMTPSA id bj1sm6292369wjc.17.2016.11.10.08.19.01
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Thu, 10 Nov 2016 08:19:02 -0800 (PST)
Subject: Re: bug#21391: 24.5; `thing-at-point' should return a string
To: Eli Zaretskii <eliz@HIDDEN>
References: <alpine.LRH.2.20.1509011056480.5317@HIDDEN>
 <alpine.DEB.2.20.1610131558480.2834@calancha-pc>
 <0a68c2ae-0940-4e2c-8b3c-1faceb45c43c@default>
 <1773ab35-70b1-42f9-8a8b-fe07881487d1@default> <874m3krnb6.fsf_-_@HIDDEN>
 <83a8dbiaps.fsf@HIDDEN> <b2484b79-3aaf-4dde-a60f-420f8a2222b8@HIDDEN>
 <83pom7gjhl.fsf@HIDDEN> <0a8d76e4-4d1b-a26d-2b76-a2d9384d9f72@HIDDEN>
 <83mvhbgitf.fsf@HIDDEN> <25bb22e8-1388-275a-d0da-7e698acdf6da@HIDDEN>
 <83inrygggr.fsf@HIDDEN> <cc2e7eab-e58d-db76-b5ed-0ec9871fad9d@HIDDEN>
 <83y40sfyij.fsf@HIDDEN> <76505436-e66c-0ed3-6d7a-ce654f38ef30@HIDDEN>
 <83bmxnfhbi.fsf@HIDDEN>
From: Dmitry Gutov <dgutov@HIDDEN>
Message-ID: <73600483-1df5-597c-6066-232189bbdd4a@HIDDEN>
Date: Thu, 10 Nov 2016 18:19:00 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101
 Thunderbird/50.0
MIME-Version: 1.0
In-Reply-To: <83bmxnfhbi.fsf@HIDDEN>
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 21391
Cc: 21391 <at> debbugs.gnu.org, tino.calancha@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://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: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.5 (/)

On 10.11.2016 18:08, Eli Zaretskii wrote:

> There's a tension here between consistency and backward compatibility.
> And since this function was "inconsistent" for a very long time, I'm
> not sure losing backward compatibility can be justified by consistency
> at this point.

I believe I've touched on this already.

And another inconsistency:

(bounds-of-thing-at-point 'number) always returns nil.

> We'd also lose something else: some Lisp objects can be printed, but
> their printed representation cannot be read back.  So for some
> objects, requiring thing-at-point to return a string would lose
> information.

We won't lose that if we go with either of my proposals: instead of 
printing objects inside the thing-at-point function, we would require 
that each returned thing is a string already. Any thing-at-point 
function that returns a non-string will be considered non-conformant.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21391; Package emacs. Full text available.

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


Received: (at 21391) by debbugs.gnu.org; 10 Nov 2016 16:09:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 10 11:09:00 2016
Received: from localhost ([127.0.0.1]:52434 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1c4ruN-0008Ph-TG
	for submit <at> debbugs.gnu.org; Thu, 10 Nov 2016 11:09:00 -0500
Received: from eggs.gnu.org ([208.118.235.92]:41869)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1c4ruM-0008PS-IE
 for 21391 <at> debbugs.gnu.org; Thu, 10 Nov 2016 11:08:58 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1c4ruC-0004r2-Ee
 for 21391 <at> debbugs.gnu.org; Thu, 10 Nov 2016 11:08:53 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:44897)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1c4ruC-0004qu-BJ; Thu, 10 Nov 2016 11:08:48 -0500
Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4738
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1c4ruB-0006uh-Pk; Thu, 10 Nov 2016 11:08:48 -0500
Date: Thu, 10 Nov 2016 18:08:49 +0200
Message-Id: <83bmxnfhbi.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Dmitry Gutov <dgutov@HIDDEN>
In-reply-to: <76505436-e66c-0ed3-6d7a-ce654f38ef30@HIDDEN> (message from
 Dmitry Gutov on Thu, 10 Nov 2016 01:30:20 +0200)
Subject: Re: bug#21391: 24.5; `thing-at-point' should return a string
References: <alpine.LRH.2.20.1509011056480.5317@HIDDEN>
 <alpine.DEB.2.20.1610131558480.2834@calancha-pc>
 <0a68c2ae-0940-4e2c-8b3c-1faceb45c43c@default>
 <1773ab35-70b1-42f9-8a8b-fe07881487d1@default> <874m3krnb6.fsf_-_@HIDDEN>
 <83a8dbiaps.fsf@HIDDEN> <b2484b79-3aaf-4dde-a60f-420f8a2222b8@HIDDEN>
 <83pom7gjhl.fsf@HIDDEN> <0a8d76e4-4d1b-a26d-2b76-a2d9384d9f72@HIDDEN>
 <83mvhbgitf.fsf@HIDDEN> <25bb22e8-1388-275a-d0da-7e698acdf6da@HIDDEN>
 <83inrygggr.fsf@HIDDEN> <cc2e7eab-e58d-db76-b5ed-0ec9871fad9d@HIDDEN>
 <83y40sfyij.fsf@HIDDEN> <76505436-e66c-0ed3-6d7a-ce654f38ef30@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -7.9 (-------)
X-Debbugs-Envelope-To: 21391
Cc: 21391 <at> debbugs.gnu.org, tino.calancha@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://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: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -7.9 (-------)

> Cc: tino.calancha@HIDDEN, 21391 <at> debbugs.gnu.org
> From: Dmitry Gutov <dgutov@HIDDEN>
> Date: Thu, 10 Nov 2016 01:30:20 +0200
> 
> See the attached patch.
> 
> Or to take a step further, we might want to deprecate the 
> `thing-at-point' property, and recommend to only use the 
> `bounds-of-thing-at-point' property. This way, we get the string-ness 
> guarantee automatically, and the bounds-of-thing-at-point function will 
> work for all things (it currently fails for `number').
> 
> >>> If
> >>> there is such code, why would we want to break it?  To what end?  And
> >>> if no code uses this loophole, why do we care that it exists?
> >>
> >> To make thing-at-point behavior more consistent.
> >
> > It is consistent now.
> 
> Put point on a number. Number is a sexp. Not all sexps are strings.
> 
> (thing-at-point 'number) => 123
> (thing-at-point 'sexp) => "123"
> 
> That doesn't looks consistent to me.

There's a tension here between consistency and backward compatibility.
And since this function was "inconsistent" for a very long time, I'm
not sure losing backward compatibility can be justified by consistency
at this point.

We'd also lose something else: some Lisp objects can be printed, but
their printed representation cannot be read back.  So for some
objects, requiring thing-at-point to return a string would lose
information.

> > The only way to make it inconsistent is to have
> > a 'thing-at-point' property that violates that, but we never do that
> > in Emacs proper, so if someone else does that, it would be their bug.
> 
> number's `thing-at-point' property is not like the others.

Right, I succeeded to forget that since the beginning of this thread.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21391; Package emacs. Full text available.

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


Received: (at 21391) by debbugs.gnu.org; 10 Nov 2016 08:55:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 10 03:55:57 2016
Received: from localhost ([127.0.0.1]:51636 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1c4l9J-0004ap-JE
	for submit <at> debbugs.gnu.org; Thu, 10 Nov 2016 03:55:57 -0500
Received: from mail-wm0-f50.google.com ([74.125.82.50]:34820)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1c4l9I-0004ab-5U
 for 21391 <at> debbugs.gnu.org; Thu, 10 Nov 2016 03:55:56 -0500
Received: by mail-wm0-f50.google.com with SMTP id a197so354179772wmd.0
 for <21391 <at> debbugs.gnu.org>; Thu, 10 Nov 2016 00:55:56 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=sender:subject:to:references:cc:from:message-id:date:user-agent
 :mime-version:in-reply-to:content-language:content-transfer-encoding;
 bh=md5oCIMVr4ItR8hSPriLG/N/XWZO8V94kE0XuxZ4M1I=;
 b=w1K39HNIn98Buk9vY/J+RAVnNwotAHDWhd611rjfbrmTiOp9Iq+zmUBs5O07rTuKNs
 WTt4IAkud1pQQ2JtW3xkAGoz9VliOQdLn2WihJJEGvMD/BMUDSRBu1XgobN0FtK9/UvQ
 I088qwB9vZjw+DWerpPns4LiDuStWdx4NeQ6v04rMb6ZQzA1Y4DI0cwCM/nahE44VhkE
 SHyUaRiGq87Fb5kA59Egi3MI1IBSw38ie26sPPpWMg/BVJQIfoF9CE0tZ9Qs5krSRA/N
 SZ9SLgIjcix5lDnHIYtRb9amtkrRAxeiA3zsXLDiKdWUhLpu4btRaSwJII1nf0XCyrUT
 SG1A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:sender:subject:to:references:cc:from:message-id
 :date:user-agent:mime-version:in-reply-to:content-language
 :content-transfer-encoding;
 bh=md5oCIMVr4ItR8hSPriLG/N/XWZO8V94kE0XuxZ4M1I=;
 b=MEWtSacMQTEYGqOCERYHHhXe67M2If/uFIOR+I6YEZK5jQqvCDwDYkppeOiOWJpl/z
 Zd6ttbm/ee5hklIXURoPg7xYwPmF1bBG/xriBXMiLv6QyCAzYK4tavEQP7RcpSshZSWl
 1hrwee9H6v4EY4220QUfLRUrPtwr+cMazrA2t3KYLetQ6qG105TS/yiyPmCgAeulRUH0
 Uiz+lU6NJ2S1nJZUFgW3joorEH5cpjB6/y63Yc16BlEelahFqTlIX5+Ye5eK4HW8qAnG
 HehSZ7TsFChf/xPIIMJTBHmvWMLxDvpaf+khUrWN/QdMLjoqSRtQIJnlmiBaaozY+cJP
 cTzA==
X-Gm-Message-State: ABUngvcI8LgwH73JNSQ5H+2L5FmKEu5JpZJcxQ/Hb0WsUvx0+GC2hlAbKDntp4E7dLEuPg==
X-Received: by 10.194.37.198 with SMTP id a6mr4048675wjk.57.1478768150183;
 Thu, 10 Nov 2016 00:55:50 -0800 (PST)
Received: from [192.168.1.3] ([185.105.173.41])
 by smtp.googlemail.com with ESMTPSA id f76sm4918148wmd.15.2016.11.10.00.55.48
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Thu, 10 Nov 2016 00:55:49 -0800 (PST)
Subject: Re: bug#21391: 24.5; `thing-at-point' should return a string
To: Drew Adams <drew.adams@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>
References: <alpine.LRH.2.20.1509011056480.5317@HIDDEN>
 <alpine.DEB.2.20.1610131558480.2834@calancha-pc>
 <0a68c2ae-0940-4e2c-8b3c-1faceb45c43c@default>
 <1773ab35-70b1-42f9-8a8b-fe07881487d1@default> <874m3krnb6.fsf_-_@HIDDEN>
 <83a8dbiaps.fsf@HIDDEN> <b2484b79-3aaf-4dde-a60f-420f8a2222b8@HIDDEN>
 <83pom7gjhl.fsf@HIDDEN> <0a8d76e4-4d1b-a26d-2b76-a2d9384d9f72@HIDDEN>
 <83mvhbgitf.fsf@HIDDEN> <25bb22e8-1388-275a-d0da-7e698acdf6da@HIDDEN>
 <83inrygggr.fsf@HIDDEN> <cc2e7eab-e58d-db76-b5ed-0ec9871fad9d@HIDDEN>
 <eca7481d-facf-45c5-881e-c58197ece8fb@default>
 <1c17de6b-2297-6e7e-9b06-e84b5b6df3eb@HIDDEN>
 <8c2b4b8b-0e49-42af-a98d-d82006f90354@default>
From: Dmitry Gutov <dgutov@HIDDEN>
Message-ID: <52250983-13a2-98ab-05cd-04b41a048866@HIDDEN>
Date: Thu, 10 Nov 2016 10:55:47 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101
 Thunderbird/50.0
MIME-Version: 1.0
In-Reply-To: <8c2b4b8b-0e49-42af-a98d-d82006f90354@default>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 21391
Cc: 21391 <at> debbugs.gnu.org, tino.calancha@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://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: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.5 (/)

On 10.11.2016 02:40, Drew Adams wrote:

> What do YOU think is the point of putting property `thing-at-point'
> on a THING type?

Being lazy or unable to make up your mind. Or maybe some kind of 
micro-optimization.

> You will see things like this in thingatpt.el:
>
> (put 'url 'thing-at-point 'thing-at-point-url-at-point)
>
> (put 'email 'thing-at-point
>      (lambda ()
>        (let ((boundary-pair (bounds-of-thing-at-point 'email)))
>          (if boundary-pair
>              (buffer-substring-no-properties
>               (car boundary-pair) (cdr boundary-pair))))))

Try removing these two in your local Emacs, save and restart (maybe do a 
rebuild as well, to be sure).

(thing-at-point 'url) and (thing-at-point 'email) will continue to work 
fine.

> (put 'number 'thing-at-point 'number-at-point)
>
> And that's only a few predefined uses of it.  One of the main
> points of the library is to provide tools that you can use to
> define your functions that implement providing a THING at point.

Search my messages for the word "third-party".




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21391; Package emacs. Full text available.

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


Received: (at 21391) by debbugs.gnu.org; 10 Nov 2016 00:40:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 09 19:40:20 2016
Received: from localhost ([127.0.0.1]:51481 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1c4dPg-0001OF-JZ
	for submit <at> debbugs.gnu.org; Wed, 09 Nov 2016 19:40:20 -0500
Received: from userp1040.oracle.com ([156.151.31.81]:21361)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>) id 1c4dPe-0001O2-Mz
 for 21391 <at> debbugs.gnu.org; Wed, 09 Nov 2016 19:40:19 -0500
Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233])
 by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id
 uAA0eB51010969
 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
 Thu, 10 Nov 2016 00:40:12 GMT
Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236])
 by aserv0021.oracle.com (8.13.8/8.13.8) with ESMTP id uAA0eBH2011162
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
 Thu, 10 Nov 2016 00:40:11 GMT
Received: from abhmp0014.oracle.com (abhmp0014.oracle.com [141.146.116.20])
 by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id uAA0eALf024896;
 Thu, 10 Nov 2016 00:40:10 GMT
MIME-Version: 1.0
Message-ID: <8c2b4b8b-0e49-42af-a98d-d82006f90354@default>
Date: Wed, 9 Nov 2016 16:40:09 -0800 (PST)
From: Drew Adams <drew.adams@HIDDEN>
To: Dmitry Gutov <dgutov@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>
Subject: RE: bug#21391: 24.5; `thing-at-point' should return a string
References: <alpine.LRH.2.20.1509011056480.5317@HIDDEN>
 <alpine.DEB.2.20.1610131558480.2834@calancha-pc>
 <0a68c2ae-0940-4e2c-8b3c-1faceb45c43c@default>
 <1773ab35-70b1-42f9-8a8b-fe07881487d1@default> <874m3krnb6.fsf_-_@HIDDEN>
 <83a8dbiaps.fsf@HIDDEN> <b2484b79-3aaf-4dde-a60f-420f8a2222b8@HIDDEN>
 <83pom7gjhl.fsf@HIDDEN> <0a8d76e4-4d1b-a26d-2b76-a2d9384d9f72@HIDDEN>
 <83mvhbgitf.fsf@HIDDEN> <25bb22e8-1388-275a-d0da-7e698acdf6da@HIDDEN>
 <83inrygggr.fsf@HIDDEN> <cc2e7eab-e58d-db76-b5ed-0ec9871fad9d@HIDDEN>
 <eca7481d-facf-45c5-881e-c58197ece8fb@default>
 <1c17de6b-2297-6e7e-9b06-e84b5b6df3eb@HIDDEN>
In-Reply-To: <1c17de6b-2297-6e7e-9b06-e84b5b6df3eb@HIDDEN>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1  (1003210) [OL
 12.0.6753.5000 (x86)]
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Source-IP: aserv0021.oracle.com [141.146.126.233]
X-Spam-Score: -8.1 (--------)
X-Debbugs-Envelope-To: 21391
Cc: 21391 <at> debbugs.gnu.org, tino.calancha@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://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: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -8.1 (--------)

> > (get 'number 'thing-at-point) returns `number-at-point', which
> > is 100% reasonable.
>=20
> Not at all. As I've explained previously.

No, you have not.  This is the whole point of symbol property
`thing-at-point', and it always has been.

What do YOU think is the point of putting property `thing-at-point'
on a THING type?

> > Not wanting someone to use (thing-at-point 'number) to return
> > a number via (get 'number 'thing-at-point) is one thing.
> > And it is already addressed by what I proposed.
>=20
> I must have missed that proposal.

I showed three possibilities, and I pointed out which one I prefer.
The bug thread is there, in case you really missed it.

> > Not wanting to let (get 'number 'thing-at-point) to return a
> > function that returns a number is quite another thing altogether.
> > And it is totally uncalled for.
>=20
> Isn't that one and the same?

Of course not.  The use of (get 'number 'thing-at-point) in the
definition of `thing-at-point' is only _one_ use of it.  That's
apparently what you've missed from the beginning: the point of
symbol property `thing-at-point'.

You will see things like this in thingatpt.el:

(put 'url 'thing-at-point 'thing-at-point-url-at-point)

(put 'email 'thing-at-point
     (lambda ()
       (let ((boundary-pair (bounds-of-thing-at-point 'email)))
         (if boundary-pair
             (buffer-substring-no-properties
              (car boundary-pair) (cdr boundary-pair))))))

(put 'number 'thing-at-point 'number-at-point)

And that's only a few predefined uses of it.  One of the main
points of the library is to provide tools that you can use to
define your functions that implement providing a THING at point.
And by that I do not mean just a string at point that names a
thing - I mean a Lisp THING (list, sexp, number, color name,
file name,... whatever).

It is irrelevant to the design of thingatpt.el, and its intended
use cases, that the THINGs defined for `url' and `email' are
string values.  They are no more "normal" cases for the design
than is `number'.  What is important is that the design provides
this functionality for _any_ kind of THING - any Lisp value.

Examples of other THING-returning definitions:

(put 'list 'thing-at-point 'my-list-at-point)
(put 'unquoted-list 'thing-at-point 'my-unquoted-list-at-point)
(put 'non-nil-symbol-name 'thing-at-point 'my-non-nil-symbol-name-at-point)
(put 'symbol-name 'thing-at-point 'my-symbol-name-at-point)
(put 'region-or-word 'thing-at-point 'my-region-or-word-at-point)
(put 'color 'thing-at-point 'my-color-at-point)
(put 'decimal-number 'thing-at-point 'my-number-at-point-decimal)
(put 'hex-number 'thing-at-point 'my-number-at-point-hex)
(put 'string 'thing-at-point 'my-string-at-point)

Some of those THING types are strings; some are lists; some are
symbols; some are numbers.  The THING possibilities are limitless.

Practically the entire design of thingatpt.el revolves around
putting properties on THING-type symbols and function symbols.
This includes property `thing-at-point'.

> > I disagreed with it strongly in the context of bug #9300, where
> > you were the lone voice proclaiming it.  You apparently view the only
> > use of this functionality as returning a string near (not at)
> > point that can be used as an input default value.  thingatpt.el is much
> > more than that.  It is very important that it be able to be used
> > to test whether there (really) is a given THING _at_ point (not
> > just somewhere near point).
>=20
> That seems orthogonal to the current discussion.

It points to the fact that you apparently have only a limited view
of what thingatpt.el is for and what features it provides.  You've
missed two for two, so far - and important ones, at that.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21391; Package emacs. Full text available.

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


Received: (at 21391) by debbugs.gnu.org; 9 Nov 2016 23:35:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 09 18:35:33 2016
Received: from localhost ([127.0.0.1]:51424 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1c4cOz-0008IN-FR
	for submit <at> debbugs.gnu.org; Wed, 09 Nov 2016 18:35:33 -0500
Received: from mail-wm0-f42.google.com ([74.125.82.42]:35843)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1c4cOx-0008I8-50
 for 21391 <at> debbugs.gnu.org; Wed, 09 Nov 2016 18:35:31 -0500
Received: by mail-wm0-f42.google.com with SMTP id g23so9902230wme.1
 for <21391 <at> debbugs.gnu.org>; Wed, 09 Nov 2016 15:35:31 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=sender:subject:to:references:cc:from:message-id:date:user-agent
 :mime-version:in-reply-to:content-language:content-transfer-encoding;
 bh=VGgD9ER9dmkvdTxk380rAkjSlI0yic2q6vyzNnIrxdA=;
 b=jyC9n4QfzjjKOmlc7HWgpSNsZauxoG76s8It5NAg4OXZjNYAXzYFzU7XU+3MfPnUiE
 YZNkgwPnq82PHxm8+6QIGbdYi8ovxXShbwn4TB84Q5jreE7Th6yes0TafuYnF7gkEBK2
 rPERwYtYjW9GTJ7s8ciXKgzRnSfJMFeTEoWPmrTxgTj6c0SvboT1rbskyNCjZI4N5yIo
 PMjpd6qkpfhpwz6vS9SayD+TpLYSbERjxcE6d6WyWk9S7AwXp+zpheN9M44sh1Lk7Fdf
 pMlC8NWtSKdfYbfkSLuJgUIeO0RdsrVkfDZplh2RUXWPt0TfJKPMeHHvhZfEWUmENODQ
 Ke+A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:sender:subject:to:references:cc:from:message-id
 :date:user-agent:mime-version:in-reply-to:content-language
 :content-transfer-encoding;
 bh=VGgD9ER9dmkvdTxk380rAkjSlI0yic2q6vyzNnIrxdA=;
 b=Uz+fcPJ9H4TD9ORjppwBV2zy/cMrffifmWrTH3kTlltXvTeazYv6WWKF+G5bGxBgON
 BLTmBiH4Q4Tim1ruGTrW89zqAUYy1FIgQoCGfJz7a9Gdeicn0sVNPuOBBq/BacFPzy90
 mjAtHC5bwsfBB8eTp4qQ4FcrV3iVe7Sf14QqBnarvCg68yYgxzuY9F6TUEnE3RZ5eGSv
 EfIOq3LONaNScJCZglMPwdsFnEzuL3zi3A9LrVe4gdl4/p42zP+ZhRsQ+1VaLQHPw5YR
 s1OYCiz7ngjdR73qbrh+QNFcnV0YdeEooWJTu2EBzrvb7+Ez/i0GlWhdCk4Mr8Wp8xSd
 8+dQ==
X-Gm-Message-State: ABUngveu47pB61HpsFkzOy+xvFV1nlSWAdbYjVmk7eH6VmJvZNUmjc0hntG0b2Uwrqsnhw==
X-Received: by 10.28.51.141 with SMTP id z135mr2676239wmz.109.1478734525449;
 Wed, 09 Nov 2016 15:35:25 -0800 (PST)
Received: from [192.168.1.3] ([185.105.173.41])
 by smtp.googlemail.com with ESMTPSA id k2sm2224839wjv.11.2016.11.09.15.35.24
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Wed, 09 Nov 2016 15:35:24 -0800 (PST)
Subject: Re: bug#21391: 24.5; `thing-at-point' should return a string
To: Drew Adams <drew.adams@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>
References: <alpine.LRH.2.20.1509011056480.5317@HIDDEN>
 <alpine.DEB.2.20.1610131558480.2834@calancha-pc>
 <0a68c2ae-0940-4e2c-8b3c-1faceb45c43c@default>
 <1773ab35-70b1-42f9-8a8b-fe07881487d1@default> <874m3krnb6.fsf_-_@HIDDEN>
 <83a8dbiaps.fsf@HIDDEN> <b2484b79-3aaf-4dde-a60f-420f8a2222b8@HIDDEN>
 <83pom7gjhl.fsf@HIDDEN> <0a8d76e4-4d1b-a26d-2b76-a2d9384d9f72@HIDDEN>
 <83mvhbgitf.fsf@HIDDEN> <25bb22e8-1388-275a-d0da-7e698acdf6da@HIDDEN>
 <83inrygggr.fsf@HIDDEN> <cc2e7eab-e58d-db76-b5ed-0ec9871fad9d@HIDDEN>
 <eca7481d-facf-45c5-881e-c58197ece8fb@default>
From: Dmitry Gutov <dgutov@HIDDEN>
Message-ID: <1c17de6b-2297-6e7e-9b06-e84b5b6df3eb@HIDDEN>
Date: Thu, 10 Nov 2016 01:35:23 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101
 Thunderbird/50.0
MIME-Version: 1.0
In-Reply-To: <eca7481d-facf-45c5-881e-c58197ece8fb@default>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 21391
Cc: 21391 <at> debbugs.gnu.org, tino.calancha@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://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: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.5 (/)

On 09.11.2016 19:58, Drew Adams wrote:

> It has no problem that I'm aware of.  What's the problem?
> `number-at-point' returns a number, as it should.
> `list-at-point' returns a list, as it should, and so on.

No problem there.

> (get 'number 'thing-at-point) returns `number-at-point', which
> is 100% reasonable.

Not at all. As I've explained previously.

>> or people will have to remain content not to use thing-at-point
>> with NO-PROPERTIES argument on them.
>
> What is "them"?

The third-party things.

> Not wanting someone to use (thing-at-point 'number) to return
> a number via (get 'number 'thing-at-point) is one thing.
> And it is already addressed by what I proposed.

I must have missed that proposal.

> Not wanting to let (get 'number 'thing-at-point) to return a
> function that returns a number is quite another thing altogether.
> And it is totally uncalled for.

Isn't that one and the same?

> I disagreed with it strongly in the context of bug #9300, where you
> were the lone voice proclaiming it.  You apparently view the only
> use of this functionality as returning a string near (not at) point
> that can be used as an input default value.  thingatpt.el is much
> more than that.  It is very important that it be able to be used
> to test whether there (really) is a given THING _at_ point (not
> just somewhere near point).

That seems orthogonal to the current discussion.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21391; Package emacs. Full text available.

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


Received: (at 21391) by debbugs.gnu.org; 9 Nov 2016 23:30:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 09 18:30:30 2016
Received: from localhost ([127.0.0.1]:51414 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1c4cK5-0008Av-Ri
	for submit <at> debbugs.gnu.org; Wed, 09 Nov 2016 18:30:30 -0500
Received: from mail-wm0-f44.google.com ([74.125.82.44]:37441)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1c4cK4-0008Ai-9a
 for 21391 <at> debbugs.gnu.org; Wed, 09 Nov 2016 18:30:28 -0500
Received: by mail-wm0-f44.google.com with SMTP id t79so330633595wmt.0
 for <21391 <at> debbugs.gnu.org>; Wed, 09 Nov 2016 15:30:28 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=sender:subject:to:references:cc:from:message-id:date:user-agent
 :mime-version:in-reply-to:content-language;
 bh=+tPGMnAF6UpejGsLILfBs04G0w1amhG8osICaoGdeJU=;
 b=nF4QBZwMuP7d2V8E6SxqpPLlxmnnQNYi9FMofIQoBYYpcoUMBga7ZrEEOVIIla6MCM
 GI3kLEd/g3UyYQBbxuXQMBVq5ctGFp7WzQ2Y7LZRVuBGK3ugOk8fIbpMjX+NtJffDWVd
 PgQplqpeqAN1CpEDgedd4uBH9bQ7xWo1yZF2gqnH8j400/O/sqaM+oRvcZPMs5uzrmCC
 9Os4m6Q67Wm8ciGkGFvpf9QLTeq0zc8qnwUiyvNthKqJ7Ie+mV9l6sOAMEKhflQmZbOe
 8JBC7XSt7myHh+wWYc2NKDXg78MUDg5ViAxQY1MVPf5Q0G2MMkJzIFe8yXGZQjOXXR54
 CRVw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:sender:subject:to:references:cc:from:message-id
 :date:user-agent:mime-version:in-reply-to:content-language;
 bh=+tPGMnAF6UpejGsLILfBs04G0w1amhG8osICaoGdeJU=;
 b=HsyRO4l+kyEgG84rL5ovo/eVF93VR6Guf028EWzU+pgYyhodd5OGRYkS8jmri+wKXl
 8C8kBcZq9msn0sYa/Bh+vGBoNa+ZTP7ouBHStq//snSUkZoAG/XnMvE0lMfzGYYdTqKk
 kOy6OuUrZ9HdkyMAl06rkvcL3/nazRSc35+OoPBfHp94nCcLsAZdoLqEioWP49TOo9eI
 kRCcSD9ffz2RAHrM2yMOtReSQwUNvFFxJaXxfGAuyVXXBNjb1gj9e0f/gQzH+6Mwfts/
 Zrs8FL8YNZw7McfdupwKlcUJ/Arejb//a37CJgoW6jbDtkVilA5bWLYQYb4gYnpioknB
 MOEA==
X-Gm-Message-State: ABUngveZ8GXR7ltrlt1T9nZOtLyOnT+3oTW+VE0mQPLL3FnPq4Cj3HO30B4kiYmrpM08jw==
X-Received: by 10.194.176.40 with SMTP id cf8mr1814940wjc.68.1478734222621;
 Wed, 09 Nov 2016 15:30:22 -0800 (PST)
Received: from [192.168.1.3] ([185.105.173.41])
 by smtp.googlemail.com with ESMTPSA id w65sm2843459wmd.23.2016.11.09.15.30.21
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Wed, 09 Nov 2016 15:30:21 -0800 (PST)
Subject: Re: bug#21391: 24.5; `thing-at-point' should return a string
To: Eli Zaretskii <eliz@HIDDEN>
References: <alpine.LRH.2.20.1509011056480.5317@HIDDEN>
 <alpine.DEB.2.20.1610131558480.2834@calancha-pc>
 <0a68c2ae-0940-4e2c-8b3c-1faceb45c43c@default>
 <1773ab35-70b1-42f9-8a8b-fe07881487d1@default> <874m3krnb6.fsf_-_@HIDDEN>
 <83a8dbiaps.fsf@HIDDEN> <b2484b79-3aaf-4dde-a60f-420f8a2222b8@HIDDEN>
 <83pom7gjhl.fsf@HIDDEN> <0a8d76e4-4d1b-a26d-2b76-a2d9384d9f72@HIDDEN>
 <83mvhbgitf.fsf@HIDDEN> <25bb22e8-1388-275a-d0da-7e698acdf6da@HIDDEN>
 <83inrygggr.fsf@HIDDEN> <cc2e7eab-e58d-db76-b5ed-0ec9871fad9d@HIDDEN>
 <83y40sfyij.fsf@HIDDEN>
From: Dmitry Gutov <dgutov@HIDDEN>
Message-ID: <76505436-e66c-0ed3-6d7a-ce654f38ef30@HIDDEN>
Date: Thu, 10 Nov 2016 01:30:20 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101
 Thunderbird/50.0
MIME-Version: 1.0
In-Reply-To: <83y40sfyij.fsf@HIDDEN>
Content-Type: multipart/mixed; boundary="------------F9952C605D30E7F792E52751"
Content-Language: en-US
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 21391
Cc: 21391 <at> debbugs.gnu.org, tino.calancha@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://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: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.5 (/)

This is a multi-part message in MIME format.
--------------F9952C605D30E7F792E52751
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 7bit

On 09.11.2016 17:45, Eli Zaretskii wrote:

> I don't think I understand what you are suggesting.  Can you show a
> proposed patch, so I could see the light?

See the attached patch.

Or to take a step further, we might want to deprecate the 
`thing-at-point' property, and recommend to only use the 
`bounds-of-thing-at-point' property. This way, we get the string-ness 
guarantee automatically, and the bounds-of-thing-at-point function will 
work for all things (it currently fails for `number').

>>> If
>>> there is such code, why would we want to break it?  To what end?  And
>>> if no code uses this loophole, why do we care that it exists?
>>
>> To make thing-at-point behavior more consistent.
>
> It is consistent now.

Put point on a number. Number is a sexp. Not all sexps are strings.

(thing-at-point 'number) => 123
(thing-at-point 'sexp) => "123"

That doesn't looks consistent to me. And there's no way to guess the 
return value type in advance without knowing which exact function is the 
thing's `thing-at-point' property.

> The only way to make it inconsistent is to have
> a 'thing-at-point' property that violates that, but we never do that
> in Emacs proper, so if someone else does that, it would be their bug.

number's `thing-at-point' property is not like the others.

--------------F9952C605D30E7F792E52751
Content-Type: text/x-diff;
 name="thingatpt-number.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="thingatpt-number.diff"

diff --git a/lisp/thingatpt.el b/lisp/thingatpt.el
index 9920fa0..1c630f7 100644
--- a/lisp/thingatpt.el
+++ b/lisp/thingatpt.el
@@ -128,7 +128,7 @@ bounds-of-thing-at-point
 
 ;;;###autoload
 (defun thing-at-point (thing &optional no-properties)
-  "Return the THING at point.
+  "Return the THING at point as a string.
 THING should be a symbol specifying a type of syntactic entity.
 Possibilities include `symbol', `list', `sexp', `defun',
 `filename', `url', `email', `word', `sentence', `whitespace',
@@ -145,7 +145,7 @@ thing-at-point
            (let ((bounds (bounds-of-thing-at-point thing)))
              (when bounds
                (buffer-substring (car bounds) (cdr bounds)))))))
-    (when (and text no-properties (sequencep text))
+    (when (and text no-properties)
       (set-text-properties 0 (length text) nil text))
     text))
 
@@ -557,6 +557,14 @@ thing-at-point-email-regexp
 (put 'buffer 'end-op (lambda () (goto-char (point-max))))
 (put 'buffer 'beginning-op (lambda () (goto-char (point-min))))
 
+;;  Number
+
+(put 'number 'thing-at-point
+     (lambda ()
+       (let ((thing (thing-at-point 'sexp)))
+         (when (numberp (thing-at-point--read-from-whole-string thing))
+           thing))))
+
 ;;  Aliases
 
 (defun word-at-point ()
@@ -604,7 +612,6 @@ symbol-at-point
 (defun number-at-point ()
   "Return the number at point, or nil if none is found."
   (form-at-point 'sexp 'numberp))
-(put 'number 'thing-at-point 'number-at-point)
 ;;;###autoload
 (defun list-at-point ()
   "Return the Lisp list at point, or nil if none is found."

--------------F9952C605D30E7F792E52751--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21391; Package emacs. Full text available.

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


Received: (at 21391) by debbugs.gnu.org; 9 Nov 2016 17:58:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 09 12:58:24 2016
Received: from localhost ([127.0.0.1]:51187 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1c4X8i-0006ts-In
	for submit <at> debbugs.gnu.org; Wed, 09 Nov 2016 12:58:24 -0500
Received: from userp1040.oracle.com ([156.151.31.81]:19688)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>) id 1c4X8g-0006tf-Qi
 for 21391 <at> debbugs.gnu.org; Wed, 09 Nov 2016 12:58:23 -0500
Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233])
 by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id
 uA9HwGAr013100
 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
 Wed, 9 Nov 2016 17:58:16 GMT
Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75])
 by aserv0021.oracle.com (8.13.8/8.13.8) with ESMTP id uA9HwDnC026320
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
 Wed, 9 Nov 2016 17:58:15 GMT
Received: from abhmp0014.oracle.com (abhmp0014.oracle.com [141.146.116.20])
 by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id uA9HwD8k005439;
 Wed, 9 Nov 2016 17:58:13 GMT
MIME-Version: 1.0
Message-ID: <eca7481d-facf-45c5-881e-c58197ece8fb@default>
Date: Wed, 9 Nov 2016 09:58:12 -0800 (PST)
From: Drew Adams <drew.adams@HIDDEN>
To: Dmitry Gutov <dgutov@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>
Subject: RE: bug#21391: 24.5; `thing-at-point' should return a string
References: <alpine.LRH.2.20.1509011056480.5317@HIDDEN>
 <alpine.DEB.2.20.1610131558480.2834@calancha-pc>
 <0a68c2ae-0940-4e2c-8b3c-1faceb45c43c@default>
 <1773ab35-70b1-42f9-8a8b-fe07881487d1@default> <874m3krnb6.fsf_-_@HIDDEN>
 <83a8dbiaps.fsf@HIDDEN> <b2484b79-3aaf-4dde-a60f-420f8a2222b8@HIDDEN>
 <83pom7gjhl.fsf@HIDDEN> <0a8d76e4-4d1b-a26d-2b76-a2d9384d9f72@HIDDEN>
 <83mvhbgitf.fsf@HIDDEN> <25bb22e8-1388-275a-d0da-7e698acdf6da@HIDDEN>
 <83inrygggr.fsf@HIDDEN> <cc2e7eab-e58d-db76-b5ed-0ec9871fad9d@HIDDEN>
In-Reply-To: <cc2e7eab-e58d-db76-b5ed-0ec9871fad9d@HIDDEN>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1  (1003210) [OL
 12.0.6753.5000 (x86)]
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Source-IP: aserv0021.oracle.com [141.146.126.233]
X-Spam-Score: -8.1 (--------)
X-Debbugs-Envelope-To: 21391
Cc: 21391 <at> debbugs.gnu.org, tino.calancha@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://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: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -8.1 (--------)

> If we agree that the return value of thing-at-point should be a
> string, (get 'number 'thing-at-point) can't return `number-at-point', it
> should return a function that will return the said number as a string.

Oh, God, no.  That would be among the most misguided proposals
I've heard in a long time.  That truly throws out the baby with
the bathwater.

It is not property `thing-at-point' that should return (a function
that returns) a string; it is function `thing-at-point' that should
return a string - if anything should.

> And of all things enumerated in thing-at-point's docstring,

That list is only an indication of some of what is possible.

> IIUC only number has such problem.=20

It has no problem that I'm aware of.  What's the problem?
`number-at-point' returns a number, as it should.
`list-at-point' returns a list, as it should, and so on.

(get 'number 'thing-at-point) returns `number-at-point', which
is 100% reasonable.

> Which leaves third-party things, but, they will either need
> to be fixed,

I get the impression that your idea of what is broken and needs
to be fixed is very different from mine.

> or people will have to remain content not to use thing-at-point
> with NO-PROPERTIES argument on them.

What is "them"?

What Eli has suggested is one reasonable approach: just prevent
raising the stupid error.  I proposed at least two other
reasonable approaches.

In none of those suggestions is there a problem with calling
`thing-at-point' on ANY kind of THING while using non-nil
NO-PROPERTIES.

It is not clear what you are seeing as a problem, for which
you think that requiring or prescribing that property
`thing-at-point' return a (function that returns a) string is
the solution.

> I can't imagine that loophole to be too useful. The proposal above
> should leave all such uses of third-party things alone. But yes,
> anyone who uses (thing-at-point 'number) as a (longer, pointless)
> substitute for (number-at-point) will have to change their code.

Not wanting someone to use (thing-at-point 'number) to return
a number via (get 'number 'thing-at-point) is one thing.
And it is already addressed by what I proposed.

Not wanting to let (get 'number 'thing-at-point) to return a
function that returns a number is quite another thing altogether.
And it is totally uncalled for.=20

> To make thing-at-point behavior more consistent. This kind of thing
> is usually performed with future new uses in mind. But it also might
> help with code maintenance a bit, for existing users (not likely to make
> much of a difference, but still; the danger of breakage is not very
> significant either).

I really disagree with what seems to be your view of thingatpt.el
functionality.

I disagreed with it strongly in the context of bug #9300, where you
were the lone voice proclaiming it.  You apparently view the only
use of this functionality as returning a string near (not at) point
that can be used as an input default value.  thingatpt.el is much
more than that.  It is very important that it be able to be used
to test whether there (really) is a given THING _at_ point (not
just somewhere near point).




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21391; Package emacs. Full text available.

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


Received: (at 21391) by debbugs.gnu.org; 9 Nov 2016 15:45:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 09 10:45:19 2016
Received: from localhost ([127.0.0.1]:51090 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1c4V3v-0003hI-8W
	for submit <at> debbugs.gnu.org; Wed, 09 Nov 2016 10:45:19 -0500
Received: from eggs.gnu.org ([208.118.235.92]:37020)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1c4V3t-0003h4-88
 for 21391 <at> debbugs.gnu.org; Wed, 09 Nov 2016 10:45:17 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1c4V3l-0004aV-2c
 for 21391 <at> debbugs.gnu.org; Wed, 09 Nov 2016 10:45:12 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:55557)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1c4V3k-0004aQ-V9; Wed, 09 Nov 2016 10:45:08 -0500
Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3788
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1c4V3k-0004FF-72; Wed, 09 Nov 2016 10:45:08 -0500
Date: Wed, 09 Nov 2016 17:45:08 +0200
Message-Id: <83y40sfyij.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Dmitry Gutov <dgutov@HIDDEN>
In-reply-to: <cc2e7eab-e58d-db76-b5ed-0ec9871fad9d@HIDDEN> (message from
 Dmitry Gutov on Wed, 9 Nov 2016 02:04:20 +0200)
Subject: Re: bug#21391: 24.5; `thing-at-point' should return a string
References: <alpine.LRH.2.20.1509011056480.5317@HIDDEN>
 <alpine.DEB.2.20.1610131558480.2834@calancha-pc>
 <0a68c2ae-0940-4e2c-8b3c-1faceb45c43c@default>
 <1773ab35-70b1-42f9-8a8b-fe07881487d1@default> <874m3krnb6.fsf_-_@HIDDEN>
 <83a8dbiaps.fsf@HIDDEN> <b2484b79-3aaf-4dde-a60f-420f8a2222b8@HIDDEN>
 <83pom7gjhl.fsf@HIDDEN> <0a8d76e4-4d1b-a26d-2b76-a2d9384d9f72@HIDDEN>
 <83mvhbgitf.fsf@HIDDEN> <25bb22e8-1388-275a-d0da-7e698acdf6da@HIDDEN>
 <83inrygggr.fsf@HIDDEN> <cc2e7eab-e58d-db76-b5ed-0ec9871fad9d@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -7.9 (-------)
X-Debbugs-Envelope-To: 21391
Cc: 21391 <at> debbugs.gnu.org, tino.calancha@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://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: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -7.9 (-------)

> Cc: tino.calancha@HIDDEN, 21391 <at> debbugs.gnu.org
> From: Dmitry Gutov <dgutov@HIDDEN>
> Date: Wed, 9 Nov 2016 02:04:20 +0200
> 
> On 08.11.2016 17:05, Eli Zaretskii wrote:
> 
> > But then somehow the discussion shifted to be about whether to _force_
> > thing-at-point value to be a string, even if it isn't for some reason.
> 
> I'd suggest trying to fix that from the other end, as one alternative. 
> If we agree that the return value of thing-at-point should be a string, 
> (get 'number 'thing-at-point) can't return `number-at-point', it should 
> return a function that will return the said number as a string.
> 
> And of all things enumerated in thing-at-point's docstring, IIUC only 
> number has such problem. Which leaves third-party things, but, they will 
> either need to be fixed, or people will have to remain content not to 
> use thing-at-point with NO-PROPERTIES argument on them.

I don't think I understand what you are suggesting.  Can you show a
proposed patch, so I could see the light?

> > If
> > there is such code, why would we want to break it?  To what end?  And
> > if no code uses this loophole, why do we care that it exists?
> 
> To make thing-at-point behavior more consistent.

It is consistent now.  The only way to make it inconsistent is to have
a 'thing-at-point' property that violates that, but we never do that
in Emacs proper, so if someone else does that, it would be their bug.

> > IOW, thing-at-point no longer has any known bugs, and we are talking
> > about forcibly breaking a use case that does no harm to us, and can
> > only happen if someone abuses the 'thing-at-point' property, which
> > would make it that someone's bug/misfeature, for them to fix.
> 
> Yes. The fix is very easy, though, for projects that retain at least 
> somewhat active maintainer.

I might agree when I see a concrete proposal.

Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21391; Package emacs. Full text available.

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


Received: (at submit) by debbugs.gnu.org; 9 Nov 2016 06:35:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 09 01:35:27 2016
Received: from localhost ([127.0.0.1]:50313 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1c4MTn-0002l0-Kk
	for submit <at> debbugs.gnu.org; Wed, 09 Nov 2016 01:35:27 -0500
Received: from eggs.gnu.org ([208.118.235.92]:38338)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <andreas.roehler@HIDDEN>) id 1c4MTm-0002ko-C9
 for submit <at> debbugs.gnu.org; Wed, 09 Nov 2016 01:35:26 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <andreas.roehler@HIDDEN>) id 1c4MTg-0004lC-EJ
 for submit <at> debbugs.gnu.org; Wed, 09 Nov 2016 01:35:21 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled
 version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:39861)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <andreas.roehler@HIDDEN>)
 id 1c4MTg-0004l8-B7
 for submit <at> debbugs.gnu.org; Wed, 09 Nov 2016 01:35:20 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:57536)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <andreas.roehler@HIDDEN>) id 1c4MTf-0002sE-Az
 for bug-gnu-emacs@HIDDEN; Wed, 09 Nov 2016 01:35:20 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <andreas.roehler@HIDDEN>) id 1c4MTa-0004kV-DQ
 for bug-gnu-emacs@HIDDEN; Wed, 09 Nov 2016 01:35:19 -0500
Received: from mout.kundenserver.de ([217.72.192.74]:63222)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <andreas.roehler@HIDDEN>)
 id 1c4MTa-0004jB-3u
 for bug-gnu-emacs@HIDDEN; Wed, 09 Nov 2016 01:35:14 -0500
Received: from [192.168.178.35] ([77.12.14.120]) by mrelayeu.kundenserver.de
 (mreue102) with ESMTPSA (Nemesis) id 0Lw10f-1cuBqW1LmH-017ncg; Wed, 09 Nov
 2016 07:35:05 +0100
Subject: Re: bug#21391: 24.5; `thing-at-point' should return a string
To: bug-gnu-emacs@HIDDEN
References: <alpine.LRH.2.20.1509011056480.5317@HIDDEN>
 <alpine.DEB.2.20.1610131558480.2834@calancha-pc>
 <0a68c2ae-0940-4e2c-8b3c-1faceb45c43c@default>
 <1773ab35-70b1-42f9-8a8b-fe07881487d1@default> <874m3krnb6.fsf_-_@HIDDEN>
 <83a8dbiaps.fsf@HIDDEN> <b2484b79-3aaf-4dde-a60f-420f8a2222b8@HIDDEN>
 <83pom7gjhl.fsf@HIDDEN> <0a8d76e4-4d1b-a26d-2b76-a2d9384d9f72@HIDDEN>
 <83mvhbgitf.fsf@HIDDEN> <25bb22e8-1388-275a-d0da-7e698acdf6da@HIDDEN>
 <83inrygggr.fsf@HIDDEN> <cc2e7eab-e58d-db76-b5ed-0ec9871fad9d@HIDDEN>
From: =?UTF-8?Q?Andreas_R=c3=b6hler?= <andreas.roehler@HIDDEN>
Message-ID: <492c00fc-d6ba-6842-312b-99514f55f6d1@HIDDEN>
Date: Wed, 9 Nov 2016 07:43:31 +0100
User-Agent: Mozilla/5.0 (X11; Linux i686; rv:45.0) Gecko/20100101
 Icedove/45.4.0
MIME-Version: 1.0
In-Reply-To: <cc2e7eab-e58d-db76-b5ed-0ec9871fad9d@HIDDEN>
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K0:VVNncMMhnuwvIqhr/yKRewDJpFgZX1jobPRTLT1tviPrN5+fgQs
 cTv+l1n5FzNv8SROPTJ9BydBaqY9JDtqIVARznSxmnWdgHw/Ks80A+WLTZy3F1KHFIGKQVx
 7wZEraqvTHQ2EkxPPr9y8mmZk19LB1xXKH9bYuX9dUY2pkAUZwE6OjnAsPev5by1AaC41Jv
 utJq4eED4kChA5z8NNT/A==
X-UI-Out-Filterresults: notjunk:1;V01:K0:lmoSaCgx1fI=:wmvsjo34TXTny1oeHq1YTP
 R9dh38qBKAu79V3QgYPBWDE1WXXtXkD5NW3iA4NoNmc7HOWqd38t6/ffh7A5GSyK/FIXA9P1D
 M1D4RiFtGdvkSAWxA/xb5EdhVEFiAuRyLTFGGI1ANdm7VuGPIBHdH08IOLWa9TmxKmW/hQRl8
 JgNJWAiYY/YJEEpO/bv6+b3yftPJm2qcV1kvhjlJXQjbahi2N6lyFsnUkpa7xtj2pCCd+WDdt
 b8moX5I6aQh4HOhFmEGkqb7fJjFrXGtKsoY8MQf/RsK0i6SBgKuabskz5Wf/Jp2UTQF6OvX1b
 XjkXsXwFt0cldYuoFMLoSKzXpKrnToSKA6gb+/o149cuh89TDX3p40nRaMc0x0SThUdQrY029
 m4EYhFmJ2LY7eHTR3xAY/c+Eu4O2aSc13TmTyhqipuxBNO03esPoJ+eVK7V46dwuHvFduUJl1
 5XkUYeg9YoUvSZgWCqoRtVrC9WKCRTRjMTtOQrjYIvsVE2zW30DSbqjA41hdVOkkfy71Xa0Wx
 dVne3TVr6AcawWPFZrOqujj/BHpAV8hLrh4m728hFHEtYXaKfAfAEJQdQ6UmuGvib92cQ+B4D
 Y7nI4oHWzrc5XgP7O9h23FgJxYV/dssYtVIr+RCvnCljT7D2rB1fLgFC0cGRMEBvL1kg2YuOe
 iBDUTPD3QYsHA/l/E5w3+Nsdvo0y8tNN+vl10V6SUz+BHjItEVgNNpgrwIbCaKFKrN/2+4WGE
 1fnqERf2IdLyTCIj
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: submit
Cc: Tino Calancha <tino.calancha@HIDDEN>, Drew Adams <drew.adams@HIDDEN>,
 Dmitry Gutov <dgutov@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://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: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)



On 09.11.2016 01:04, Dmitry Gutov wrote:
> On 08.11.2016 17:05, Eli Zaretskii wrote:
>
>> But then somehow the discussion shifted to be about whether to _force_
>> thing-at-point value to be a string, even if it isn't for some reason.
>
> I'd suggest trying to fix that from the other end, as one alternative. 
> If we agree that the return value of thing-at-point should be a 
> string, (get 'number 'thing-at-point) can't return `number-at-point', 
> it should return a function that will return the said number as a string.

It might be worth noticing that result of thing-at-point natively is a 
string. In case these string is not returned for now, additional 
functions are called upon. For example "intern" in case of 
symbol-at-point, which makes me frown. ;)





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21391; Package emacs. Full text available.

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


Received: (at 21391) by debbugs.gnu.org; 9 Nov 2016 00:04:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 08 19:04:30 2016
Received: from localhost ([127.0.0.1]:50164 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1c4GNS-0008OP-Gd
	for submit <at> debbugs.gnu.org; Tue, 08 Nov 2016 19:04:30 -0500
Received: from mail-wm0-f45.google.com ([74.125.82.45]:37319)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1c4GNQ-0008OB-Fu
 for 21391 <at> debbugs.gnu.org; Tue, 08 Nov 2016 19:04:28 -0500
Received: by mail-wm0-f45.google.com with SMTP id t79so270434208wmt.0
 for <21391 <at> debbugs.gnu.org>; Tue, 08 Nov 2016 16:04:28 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=sender:subject:to:references:cc:from:message-id:date:user-agent
 :mime-version:in-reply-to:content-language:content-transfer-encoding;
 bh=wNrQbOC4V97pv1BrWSVHGgCMB4eF0d1MA54bUm3aQ+0=;
 b=BiMyvkEs2qYlPEMhq442kR9SHqo6iuXB1OJbBj3grAIdkgumrrsaqNTb8Gu3A0IQLY
 +8vXnm4+A87+hPnHHGBa0YeT9jErfjWg7gyoFoOb14A1lchIASqlBRgG1Bo6dBEaQ+G5
 siNotH1+p4alWEvUq5B2BLw81yc9WG6AH8yGAjV6ENhLiRptPM9a9/gdT7Y+mC84Oh6A
 gHuIUAyiCMclSGx4n2rUxmEjsSxK2YBkxHPYAq1j86Posjt44JPutfpulIyrg7sH+Qee
 Fwt5szKVncV2XBMG9R7nYDVL0BmLX4qwM3AdNqd2xrXlZ4mCaUBde0FoEVe5k9OGJHuF
 DdJw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:sender:subject:to:references:cc:from:message-id
 :date:user-agent:mime-version:in-reply-to:content-language
 :content-transfer-encoding;
 bh=wNrQbOC4V97pv1BrWSVHGgCMB4eF0d1MA54bUm3aQ+0=;
 b=alGL7c00rMat3sDdyAYUiUYmbCYGmBVfF9o2PXWGm0qJmuEO2h3pYQFdPZtdT3L5Fs
 6BUlJQKz7PB0lPxIVkxhLnfeRRMp5nTHSqKY232Nv+NNIbZIgNbWatDSomXF4sSpNuEE
 M3WSRXzVA0vG/GWx1kLsjdxvMJWjS5jUqRHG1j1feypXhif3Md4D/LgCtWVTgZ69bOmr
 hYSGWxfbO0r/aju/L/WbTHCm6LMoU0XRlS3SBfZ/TOVLGslH+CB1tHCBqb1TkslbGSB/
 q1jiOQfRZ3Vow+Jg/ewOePR5EPqjSaicZ4/0iJk2cCN1g3nLWi//2U7ues9xR5ohtZmY
 2ABQ==
X-Gm-Message-State: ABUngvcGElrQD298C4R+ju2/qFaL+YZhxSPGBS0sskSS+N3zCxwS9tIEOudnOuTygF3Ltw==
X-Received: by 10.28.216.65 with SMTP id p62mr16900364wmg.92.1478649862800;
 Tue, 08 Nov 2016 16:04:22 -0800 (PST)
Received: from [192.168.1.3] ([185.105.173.41])
 by smtp.googlemail.com with ESMTPSA id y2sm39758096wjx.20.2016.11.08.16.04.21
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Tue, 08 Nov 2016 16:04:22 -0800 (PST)
Subject: Re: bug#21391: 24.5; `thing-at-point' should return a string
To: Eli Zaretskii <eliz@HIDDEN>
References: <alpine.LRH.2.20.1509011056480.5317@HIDDEN>
 <alpine.DEB.2.20.1610131558480.2834@calancha-pc>
 <0a68c2ae-0940-4e2c-8b3c-1faceb45c43c@default>
 <1773ab35-70b1-42f9-8a8b-fe07881487d1@default> <874m3krnb6.fsf_-_@HIDDEN>
 <83a8dbiaps.fsf@HIDDEN> <b2484b79-3aaf-4dde-a60f-420f8a2222b8@HIDDEN>
 <83pom7gjhl.fsf@HIDDEN> <0a8d76e4-4d1b-a26d-2b76-a2d9384d9f72@HIDDEN>
 <83mvhbgitf.fsf@HIDDEN> <25bb22e8-1388-275a-d0da-7e698acdf6da@HIDDEN>
 <83inrygggr.fsf@HIDDEN>
From: Dmitry Gutov <dgutov@HIDDEN>
Message-ID: <cc2e7eab-e58d-db76-b5ed-0ec9871fad9d@HIDDEN>
Date: Wed, 9 Nov 2016 02:04:20 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101
 Thunderbird/50.0
MIME-Version: 1.0
In-Reply-To: <83inrygggr.fsf@HIDDEN>
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 21391
Cc: 21391 <at> debbugs.gnu.org, tino.calancha@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://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: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.5 (/)

On 08.11.2016 17:05, Eli Zaretskii wrote:

> But then somehow the discussion shifted to be about whether to _force_
> thing-at-point value to be a string, even if it isn't for some reason.

I'd suggest trying to fix that from the other end, as one alternative. 
If we agree that the return value of thing-at-point should be a string, 
(get 'number 'thing-at-point) can't return `number-at-point', it should 
return a function that will return the said number as a string.

And of all things enumerated in thing-at-point's docstring, IIUC only 
number has such problem. Which leaves third-party things, but, they will 
either need to be fixed, or people will have to remain content not to 
use thing-at-point with NO-PROPERTIES argument on them.

> I don't understand the rationale for such a change.  Yes,
> thing-at-point was most probably always meant to return a string.
> Yes, Lisp code that causes it to return some other object is probably
> wrong.  However, the change that allowed this was introduced 19 years
> ago; who knows what code out there actually uses this loophole?

I can't imagine that loophole to be too useful. The proposal above 
should leave all such uses of third-party things alone. But yes, anyone 
who uses (thing-at-point 'number) as a (longer, pointless) substitute 
for (number-at-point) will have to change their code.

> If
> there is such code, why would we want to break it?  To what end?  And
> if no code uses this loophole, why do we care that it exists?

To make thing-at-point behavior more consistent. This kind of thing is 
usually performed with future new uses in mind. But it also might help 
with code maintenance a bit, for existing users (not likely to make much 
of a difference, but still; the danger of breakage is not very 
significant either).

> IOW, thing-at-point no longer has any known bugs, and we are talking
> about forcibly breaking a use case that does no harm to us, and can
> only happen if someone abuses the 'thing-at-point' property, which
> would make it that someone's bug/misfeature, for them to fix.

Yes. The fix is very easy, though, for projects that retain at least 
somewhat active maintainer.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21391; Package emacs. Full text available.

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


Received: (at 21391) by debbugs.gnu.org; 8 Nov 2016 16:31:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 08 11:31:12 2016
Received: from localhost ([127.0.0.1]:49842 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1c49Im-0003zL-5Z
	for submit <at> debbugs.gnu.org; Tue, 08 Nov 2016 11:31:12 -0500
Received: from aserp1040.oracle.com ([141.146.126.69]:18577)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>) id 1c49Ik-0003z6-TI
 for 21391 <at> debbugs.gnu.org; Tue, 08 Nov 2016 11:31:11 -0500
Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234])
 by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id
 uA8GV4tk031544
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Tue, 8 Nov 2016 16:31:04 GMT
Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235])
 by aserv0022.oracle.com (8.14.4/8.13.8) with ESMTP id uA8GV38N025936
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
 Tue, 8 Nov 2016 16:31:04 GMT
Received: from abhmp0002.oracle.com (abhmp0002.oracle.com [141.146.116.8])
 by aserv0121.oracle.com (8.13.8/8.13.8) with ESMTP id uA8GV1is014152;
 Tue, 8 Nov 2016 16:31:02 GMT
MIME-Version: 1.0
Message-ID: <be3c2c08-aa68-49d3-b6b4-3ed9a97e3dd6@default>
Date: Tue, 8 Nov 2016 08:31:00 -0800 (PST)
From: Drew Adams <drew.adams@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>, Dmitry Gutov <dgutov@HIDDEN>
Subject: RE: bug#21391: 24.5; `thing-at-point' should return a string
References: <<alpine.LRH.2.20.1509011056480.5317@HIDDEN>
 <alpine.DEB.2.20.1610131558480.2834@calancha-pc>
 <0a68c2ae-0940-4e2c-8b3c-1faceb45c43c@default>
 <1773ab35-70b1-42f9-8a8b-fe07881487d1@default>	<874m3krnb6.fsf_-_@HIDDEN>>
 <<83a8dbiaps.fsf@HIDDEN>	<b2484b79-3aaf-4dde-a60f-420f8a2222b8@HIDDEN>
 <83pom7gjhl.fsf@HIDDEN>	<0a8d76e4-4d1b-a26d-2b76-a2d9384d9f72@HIDDEN>
 <83mvhbgitf.fsf@HIDDEN>	<25bb22e8-1388-275a-d0da-7e698acdf6da@HIDDEN>>
 <<83inrygggr.fsf@HIDDEN>>
In-Reply-To: <<83inrygggr.fsf@HIDDEN>>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1  (1003210) [OL
 12.0.6753.5000 (x86)]
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Source-IP: aserv0022.oracle.com [141.146.126.234]
X-Spam-Score: -7.8 (-------)
X-Debbugs-Envelope-To: 21391
Cc: 21391 <at> debbugs.gnu.org, tino.calancha@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://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: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -7.8 (-------)

> I'm not sure what issue we are discussing and what problem we are
> trying to solve.  Let me take a step back and describe the situation
> as I see it.
>=20
> This bug report started because thing-at-point would signal an error
> for some of its calls.  That bug is already fixed.  Tino was unhappy
> with using sequencep and wanted to replace that with stringp -- fine
> with me, I don't object to such a change.
>=20
> From my POV the issue should be closed once we agree on the
> predicate
> to use when deciding whether or not stripping the text properties is
> appropriate.
>=20
> But then somehow the discussion shifted to be about whether to
> _force_ thing-at-point value to be a string, even if it isn't
> for some reason.
>
> I don't understand the rationale for such a change.  Yes,
> thing-at-point was most probably always meant to return a string.
> Yes, Lisp code that causes it to return some other object is
> probably wrong.  However, the change that allowed this was
> introduced 19 years ago; who knows what code out there actually
> uses this loophole? If there is such code, why would we want to
> break it?  To what end? And if no code uses this loophole, why
> do we care that it exists?
>=20
> IOW, thing-at-point no longer has any known bugs, and we are talking
> about forcibly breaking a use case that does no harm to us, and can
> only happen if someone abuses the 'thing-at-point' property, which
> would make it that someone's bug/misfeature, for them to fix.
>=20
> So why would we want to make such a change?  What am I missing?

FWIW, I agree with you here, in general.

(I do not agree that thingatpt no longer has any known bugs,
however.  See bug #9300, which is a very important bug, to me.)

On the other hand, I'm pretty sure that some Emacs Dev deciders
have previously proclaimed that it is wrong for someone to exploit
this "loophole" and thus have `t-a-p' return something other than
a string.  And, as Tino points out, the doc says clearly that it
returns a string - no ifs, ands, or buts about that.

So yes, enforcing returning a string would be an incompatible
change.  But it would (apparently) do what Emacs Dev has said the
function should do, and it would do what the doc says it does
((elisp) `Buffer Contents').

Yes, deciding to enforce returning a string is outside the error
that was reported in this bug report.  On the other hand, the bug
title is precisely, explicitly this question we are discussing now:
Should `t-a-p' return a string?

I can work with this either way.  Long ago, I adapted my own code
to fit the prescription that `t-a-p' must return a string.  But I
guess I could make an incompatible change to my code, to once again
realign it with allowing a non-string return value.

My preference, at least so far, would be for us to do the following:

1. Enforce a string return value, in the way suggested.

2. CLEARLY point out, in the high-level doc, that returning a
   THING at point can mean two different things:

   * For `thing-at-point' it means return text (a string) that
     names/represents a THING.

   * For `form-at-point' and its callers (e.g., `symbol-at-point',
     `list-at-point', `sexp-at-point', `number-at-point'), it
     means return a THING, not its name.  That is, it returns an
     Emacs-Lisp entity - any kind of value that Lisp can return.

If we do NOT go down this road, but we instead stick with what is
there now (i.e., we do not enforce a string value for `t-a-p')
then I think it is imperative that we point out, in the doc,
that `t-a-p', like `form-at-point' and its callers, can return
a Lisp THING of any kind OR a string naming such a THING, and
that the former case is realized via property `thing-at-point'
on the THING-argument symbol.

Being clear and explicit about what it does and how will help
avoid the kinds of ambiguity that have plagued this function
for a long time now.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21391; Package emacs. Full text available.

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


Received: (at submit) by debbugs.gnu.org; 8 Nov 2016 16:31:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 08 11:31:30 2016
Received: from localhost ([127.0.0.1]:49845 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1c49J4-0003zt-Fp
	for submit <at> debbugs.gnu.org; Tue, 08 Nov 2016 11:31:30 -0500
Received: from eggs.gnu.org ([208.118.235.92]:49481)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>) id 1c49J2-0003zd-BL
 for submit <at> debbugs.gnu.org; Tue, 08 Nov 2016 11:31:28 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <drew.adams@HIDDEN>) id 1c49Iw-0005g6-B6
 for submit <at> debbugs.gnu.org; Tue, 08 Nov 2016 11:31:23 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled
 version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:55138)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <drew.adams@HIDDEN>)
 id 1c49Iw-0005fy-8b
 for submit <at> debbugs.gnu.org; Tue, 08 Nov 2016 11:31:22 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:40450)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <drew.adams@HIDDEN>) id 1c49Iv-0002dn-7x
 for bug-gnu-emacs@HIDDEN; Tue, 08 Nov 2016 11:31:22 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <drew.adams@HIDDEN>) id 1c49Iu-0005fW-Cj
 for bug-gnu-emacs@HIDDEN; Tue, 08 Nov 2016 11:31:21 -0500
Received: from aserp1040.oracle.com ([141.146.126.69]:51705)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <drew.adams@HIDDEN>)
 id 1c49Io-0005cd-Ir; Tue, 08 Nov 2016 11:31:14 -0500
Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234])
 by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id
 uA8GV9vr031645
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Tue, 8 Nov 2016 16:31:09 GMT
Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236])
 by aserv0022.oracle.com (8.14.4/8.13.8) with ESMTP id uA8GV9Is026298
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Tue, 8 Nov 2016 16:31:09 GMT
Received: from abhmp0002.oracle.com (abhmp0002.oracle.com [141.146.116.8])
 by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id uA8GV8LA010057;
 Tue, 8 Nov 2016 16:31:08 GMT
MIME-Version: 1.0
Message-ID: <4b4e0908-827a-4c61-a0f5-b91e053f1f3d@default>
Date: Tue, 8 Nov 2016 08:31:07 -0800 (PST)
From: Drew Adams <drew.adams@HIDDEN>
To: =?utf-8?B?QW5kcmVhcyBSw7ZobGVy?= <andreas.roehler@HIDDEN>,
 bug-gnu-emacs@HIDDEN
Subject: RE: bug#21391: 24.5; `thing-at-point' returns error when called with
 arguments 'number t)
References: <alpine.LRH.2.20.1509011056480.5317@HIDDEN>
 <alpine.DEB.2.20.1610131558480.2834@calancha-pc>
 <0a68c2ae-0940-4e2c-8b3c-1faceb45c43c@default>
 <1773ab35-70b1-42f9-8a8b-fe07881487d1@default>
 <302c1b51-e840-a2ca-5b8f-e3f64532eda8@HIDDEN>
 <2857cfd4-94db-49ae-902e-a010c0571868@default>
 <66b2bee0-a07f-6d51-8119-89decd6b2cae@HIDDEN>
In-Reply-To: <66b2bee0-a07f-6d51-8119-89decd6b2cae@HIDDEN>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1  (1003210) [OL
 12.0.6753.5000 (x86)]
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Source-IP: aserv0022.oracle.com [141.146.126.234]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-Debbugs-Envelope-To: submit
Cc: Eli Zaretskii <eliz@HIDDEN>, Tino Calancha <tino.calancha@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://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: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.0 (----)

> >>> `thing-at-point' should always return a string.
> >>
> >> Indeed. Which would require some normalization WRT number-at-
> >> point etc.
> >
> > `number-at-point' uses `form-at-point'.  It returns a number (or
> > nil), not a numeral (string).  It satisfies `numberp', not `stringp'.
> >
> > What normalization do you have in mind?
>=20
> Still think detecting buffer-substrings according to THING and
> returning them if found at  point --nil otherwise-- is most
> straightforward.

Sorry, but I don't follow you.  Just what are you proposing?

> >>> `list-at-point', `form-at-point', etc. are a different
> >>> story - they can return anything.
> >>
> >> Interesting question. Maybe returns the symbol if found - nil
> >> otherwise?
> >
> > That's what `symbol-at-point' does.
>=20
> Unfortunately it does more - it might change the symbol-table.
> Expect a passive, plain report instead.

I don't understand.  Please specify what you are proposing (maybe
in a different bug report, if that is more appropriate).




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21391; Package emacs. Full text available.

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


Received: (at 21391) by debbugs.gnu.org; 8 Nov 2016 15:04:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 08 10:04:47 2016
Received: from localhost ([127.0.0.1]:49779 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1c47x8-0001tm-P4
	for submit <at> debbugs.gnu.org; Tue, 08 Nov 2016 10:04:46 -0500
Received: from eggs.gnu.org ([208.118.235.92]:53218)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1c47x6-0001tW-JP
 for 21391 <at> debbugs.gnu.org; Tue, 08 Nov 2016 10:04:45 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1c47wy-0008Uu-6q
 for 21391 <at> debbugs.gnu.org; Tue, 08 Nov 2016 10:04:39 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:57577)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1c47wy-0008Uq-3F; Tue, 08 Nov 2016 10:04:36 -0500
Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2899
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1c47wx-00053c-4T; Tue, 08 Nov 2016 10:04:35 -0500
Date: Tue, 08 Nov 2016 17:05:08 +0200
Message-Id: <83inrygggr.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Dmitry Gutov <dgutov@HIDDEN>
In-reply-to: <25bb22e8-1388-275a-d0da-7e698acdf6da@HIDDEN> (message from
 Dmitry Gutov on Mon, 7 Nov 2016 22:03:58 +0200)
Subject: Re: bug#21391: 24.5; `thing-at-point' should return a string
References: <alpine.LRH.2.20.1509011056480.5317@HIDDEN>
 <alpine.DEB.2.20.1610131558480.2834@calancha-pc>
 <0a68c2ae-0940-4e2c-8b3c-1faceb45c43c@default>
 <1773ab35-70b1-42f9-8a8b-fe07881487d1@default> <874m3krnb6.fsf_-_@HIDDEN>
 <83a8dbiaps.fsf@HIDDEN> <b2484b79-3aaf-4dde-a60f-420f8a2222b8@HIDDEN>
 <83pom7gjhl.fsf@HIDDEN> <0a8d76e4-4d1b-a26d-2b76-a2d9384d9f72@HIDDEN>
 <83mvhbgitf.fsf@HIDDEN> <25bb22e8-1388-275a-d0da-7e698acdf6da@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -7.9 (-------)
X-Debbugs-Envelope-To: 21391
Cc: 21391 <at> debbugs.gnu.org, tino.calancha@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://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: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -7.9 (-------)

> Cc: tino.calancha@HIDDEN, 21391 <at> debbugs.gnu.org
> From: Dmitry Gutov <dgutov@HIDDEN>
> Date: Mon, 7 Nov 2016 22:03:58 +0200
> 
>     Didn't the function behave that way for quite some time?  If so, how
>     come it's suddenly a problem?
> 
> Someone tried to use it for the first time?

I'm not sure what issue we are discussing and what problem we are
trying to solve.  Let me take a step back and describe the situation
as I see it.

This bug report started because thing-at-point would signal an error
for some of its calls.  That bug is already fixed.  Tino was unhappy
with using sequencep and wanted to replace that with stringp -- fine
with me, I don't object to such a change.

From my POV the issue should be closed once we agree on the predicate
to use when deciding whether or not stripping the text properties is
appropriate.

But then somehow the discussion shifted to be about whether to _force_
thing-at-point value to be a string, even if it isn't for some reason.
I don't understand the rationale for such a change.  Yes,
thing-at-point was most probably always meant to return a string.
Yes, Lisp code that causes it to return some other object is probably
wrong.  However, the change that allowed this was introduced 19 years
ago; who knows what code out there actually uses this loophole?  If
there is such code, why would we want to break it?  To what end?  And
if no code uses this loophole, why do we care that it exists?

IOW, thing-at-point no longer has any known bugs, and we are talking
about forcibly breaking a use case that does no harm to us, and can
only happen if someone abuses the 'thing-at-point' property, which
would make it that someone's bug/misfeature, for them to fix.

So why would we want to make such a change?  What am I missing?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21391; Package emacs. Full text available.

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


Received: (at 21391) by debbugs.gnu.org; 8 Nov 2016 13:15:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 08 08:15:39 2016
Received: from localhost ([127.0.0.1]:49159 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1c46FX-0007fb-5Z
	for submit <at> debbugs.gnu.org; Tue, 08 Nov 2016 08:15:39 -0500
Received: from mail-pf0-f170.google.com ([209.85.192.170]:36186)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <tino.calancha@HIDDEN>) id 1c46FV-0007fO-H2
 for 21391 <at> debbugs.gnu.org; Tue, 08 Nov 2016 08:15:37 -0500
Received: by mail-pf0-f170.google.com with SMTP id 189so108390115pfz.3
 for <21391 <at> debbugs.gnu.org>; Tue, 08 Nov 2016 05:15:37 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=from:date:to:cc:subject:in-reply-to:message-id:references
 :user-agent:mime-version;
 bh=wocUb2He0dN858plfMJeZKrcOcKnVyCnnmLmj6Jf6m8=;
 b=imYFvCGS5/IaOfH8+LDtA4a8Vo1DkZir25U8/IzyN3kq1hQzbak/zulc5CTbwsU30D
 ZJZ30UVPK3b/CoKRTl259v5a/sO9zcLsrHI/3VXzIU8+NFR6hN1WOF/+HzvltcpLqy2+
 ZfX6+QdwY7TQ1YyJJFhops9o3ER4HtuZ1XRp34bjemu3B1VVwrEbguya9wXf/jOrGexs
 D/QzSg94AY1Ir591jG8PfN3IM3dAi7ZQJzuBoDqEUlmpWRHB+aco6SB9t6a5ZceaTYL/
 9fBMCrNe1M9EeLxzF90GTXB2uWyODiVZVazu9oUf592DMtpgevSZD3dPTp0FWT2gCgiE
 K+1g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:from:date:to:cc:subject:in-reply-to:message-id
 :references:user-agent:mime-version;
 bh=wocUb2He0dN858plfMJeZKrcOcKnVyCnnmLmj6Jf6m8=;
 b=VeoFW/1FgKUFvQnCOi7I32JjC6aNpo/bQe98x3mSkcYm0hBBah4oC61FRhi0VyuE6n
 hYKNbbsTueAYYLY7Z5ASs35L8zPkfT1apjGtAs3LsnQ96Q+4DOKsi0egqua1wUlruZux
 XR1fkrZ32kU7zA0/RrKnbXiMaSxns76iL8CgXCtTnvACY1ze/6enDwck5uYu7fuaxXoD
 jq7yrv6z0LXz74C+ppZKy7zsCJuS5Dk87Plsp4mGboXGzOELOqggi9MPQE1IVKb8Sfsh
 GkTUvvWNQlrWyj3GjbLBi+2YBR55UdeDH1JpBC2OqxDQOFsVRuhITkdsz2fIhYxkXl9f
 lO6A==
X-Gm-Message-State: ABUngvfs86sOnmz18GIvjse8H75+Tgj7xq/+pzgMxQ1MTKvbrk8P56BSZ+I72FpzOpC3+A==
X-Received: by 10.99.98.2 with SMTP id w2mr18688099pgb.59.1478610931737;
 Tue, 08 Nov 2016 05:15:31 -0800 (PST)
Received: from calancha-pc (57.92.100.220.dy.bbexcite.jp. [220.100.92.57])
 by smtp.gmail.com with ESMTPSA id g78sm48289480pfe.19.2016.11.08.05.15.29
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Tue, 08 Nov 2016 05:15:31 -0800 (PST)
From: Tino Calancha <tino.calancha@HIDDEN>
X-Google-Original-From: Tino Calancha <calancha@HIDDEN>
Date: Tue, 8 Nov 2016 22:15:28 +0900 (JST)
X-X-Sender: calancha@calancha-pc
To: Dmitry Gutov <dgutov@HIDDEN>
Subject: Re: bug#21391: 24.5; `thing-at-point' should return a string
In-Reply-To: <25bb22e8-1388-275a-d0da-7e698acdf6da@HIDDEN>
Message-ID: <alpine.DEB.2.20.1611082210040.13578@calancha-pc>
References: <alpine.LRH.2.20.1509011056480.5317@HIDDEN>
 <alpine.DEB.2.20.1610131558480.2834@calancha-pc>
 <0a68c2ae-0940-4e2c-8b3c-1faceb45c43c@default>
 <1773ab35-70b1-42f9-8a8b-fe07881487d1@default> <874m3krnb6.fsf_-_@HIDDEN>
 <83a8dbiaps.fsf@HIDDEN>
 <b2484b79-3aaf-4dde-a60f-420f8a2222b8@HIDDEN> <83pom7gjhl.fsf@HIDDEN>
 <0a8d76e4-4d1b-a26d-2b76-a2d9384d9f72@HIDDEN> <83mvhbgitf.fsf@HIDDEN>
 <25bb22e8-1388-275a-d0da-7e698acdf6da@HIDDEN>
User-Agent: Alpine 2.20 (DEB 67 2015-01-07)
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII; format=flowed
X-Spam-Score: -3.3 (---)
X-Debbugs-Envelope-To: 21391
Cc: Eli Zaretskii <eliz@HIDDEN>, 21391 <at> debbugs.gnu.org,
 tino.calancha@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://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: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)



On Mon, 7 Nov 2016, Dmitry Gutov wrote:

> On 07.11.2016 22:02, Eli Zaretskii wrote:
>
>> Didn't the function behave that way for quite some time?  If so, how
>> come it's suddenly a problem?
>
> Someone tried to use it for the first time?
I started to use it ~ 1 year ago.

I want to recall that the manual says that this function
returns _always_ a string:
Return the @var{thing} around or next to point, as a string.
(see at: doc/lispref/text.texi (Buffer Contents)

But as you know, that is not true if
(get thing 'thing-at-point)

returns a non-nil value.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21391; Package emacs. Full text available.

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


Received: (at submit) by debbugs.gnu.org; 8 Nov 2016 08:35:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 08 03:35:45 2016
Received: from localhost ([127.0.0.1]:49011 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1c41se-0007ma-Ud
	for submit <at> debbugs.gnu.org; Tue, 08 Nov 2016 03:35:45 -0500
Received: from eggs.gnu.org ([208.118.235.92]:53522)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <andreas.roehler@HIDDEN>) id 1c41sd-0007mP-WA
 for submit <at> debbugs.gnu.org; Tue, 08 Nov 2016 03:35:44 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <andreas.roehler@HIDDEN>) id 1c41sX-0001nc-PO
 for submit <at> debbugs.gnu.org; Tue, 08 Nov 2016 03:35:38 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: *
X-Spam-Status: No, score=1.3 required=5.0 tests=BAYES_50,RCVD_IN_SORBS_SPAM
 autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:55260)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <andreas.roehler@HIDDEN>)
 id 1c41sX-0001nT-Lw
 for submit <at> debbugs.gnu.org; Tue, 08 Nov 2016 03:35:37 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:44487)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <andreas.roehler@HIDDEN>) id 1c41sW-00014L-6B
 for bug-gnu-emacs@HIDDEN; Tue, 08 Nov 2016 03:35:37 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <andreas.roehler@HIDDEN>) id 1c41sS-0001mC-84
 for bug-gnu-emacs@HIDDEN; Tue, 08 Nov 2016 03:35:36 -0500
Received: from mout.kundenserver.de ([212.227.126.134]:50522)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <andreas.roehler@HIDDEN>)
 id 1c41sR-0001ln-UA; Tue, 08 Nov 2016 03:35:32 -0500
Received: from [192.168.178.35] ([77.12.86.218]) by mrelayeu.kundenserver.de
 (mreue003) with ESMTPSA (Nemesis) id 0MbLNo-1cMnBB0d2i-00IjcQ; Tue, 08 Nov
 2016 09:35:25 +0100
Subject: Re: bug#21391: 24.5; `thing-at-point' returns error when called with
 arguments 'number t)
To: Drew Adams <drew.adams@HIDDEN>, bug-gnu-emacs@HIDDEN
References: <alpine.LRH.2.20.1509011056480.5317@HIDDEN>
 <alpine.DEB.2.20.1610131558480.2834@calancha-pc>
 <0a68c2ae-0940-4e2c-8b3c-1faceb45c43c@default>
 <1773ab35-70b1-42f9-8a8b-fe07881487d1@default>
 <302c1b51-e840-a2ca-5b8f-e3f64532eda8@HIDDEN>
 <2857cfd4-94db-49ae-902e-a010c0571868@default>
From: =?UTF-8?Q?Andreas_R=c3=b6hler?= <andreas.roehler@HIDDEN>
Message-ID: <66b2bee0-a07f-6d51-8119-89decd6b2cae@HIDDEN>
Date: Tue, 8 Nov 2016 09:43:46 +0100
User-Agent: Mozilla/5.0 (X11; Linux i686; rv:45.0) Gecko/20100101
 Icedove/45.4.0
MIME-Version: 1.0
In-Reply-To: <2857cfd4-94db-49ae-902e-a010c0571868@default>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K0:BdqmbJu2pmS84VWz2Z+RWAvZOckTEOAVYIpMViaz65DiucoLeoz
 5sm4z1qD+NDtEC+cS3IXTemvScp2e104h9cg5c23BZmvYqh9Hc8hPJyo0dqxsxzLMWU7BQK
 QACrt8LePBOMMZcFOj9TDKBfV2BQU5CmlbuKx3T9UhPxUxaZLoiMALs+d8LHBmiHsOxKjbD
 yLU/MKdNqJEhNAt3BceNg==
X-UI-Out-Filterresults: notjunk:1;V01:K0:igqCbP5ZvXI=:ItDsQ7b6i2Jyp1QB7EXy97
 hFNJcjJlbSPGGjHd8zjuCgVMI8bLoL2MQIT3EHNyrxFtKRReFpHytFYom7TbQ8NJf39RuJeEb
 dOiRTldlO9Gr3Ntx68VvltsvtpjX/UpgC8J4PGF1miW8KM3w1/lYPjwvg4wnPhLu/oyaztOJV
 ziBqPN6tQtaRwOTDxAxZLgk3d9O/7CBVLWHpbsMJf0yAkSkfkq4GApGC2529/tk+z8/YAxZ6U
 vZ282mo7s4GgqqOrP5dEEleHkJqpDeQPYMydBpNrU1pU+LjWDXt6yvaEdlAKGTjkVfl3R6m4/
 WajVEln7nBvwv/IjGoB0f9QB3V6QZTN9XyZT69NA/TaC/c3v8LBvn5OcbL2Y7C4izjFSQ/RbS
 4KVBXwTN7RykWKMMLeZW+GZ7UNKLsDM74cJDAkghsa1D2HFe2vBk6YUEzZlFjbqJDhTk/SA2Q
 0b+ZN3H7K+2Lxs+9i6kCk4wPq2pfYhLnlN59laNnKPg+K4VipBUPhxQmcd7Jxx4hA3pgDX6pu
 c9Lx9GpnphzQq7pALEc3AZzSmvszNkN5D7/UgNt3cCN0lqWoP4WPmKXMEXnNdpz/seUXL8231
 dSBdGR28zhYi3qrBNSYTp+QSSsSLBRk9Q0JOeG6DVG/PS6bf61ALbDzjiOauDIxfMr+YXRUnD
 EIGlxxoNotYfYYG5LgrSfZ4wav+U2tkFe1kUnTSlyTbCLHVX/pKPIx07S7kIq1ZG4DiCs1Moe
 xKRANIYmsdSJdA7J
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -1.9 (-)
X-Debbugs-Envelope-To: submit
Cc: Eli Zaretskii <eliz@HIDDEN>, Tino Calancha <tino.calancha@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://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: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.9 (-)



On 07.11.2016 18:37, Drew Adams wrote:
>>> `thing-at-point' should always return a string.
>> Indeed. Which would require some normalization WRT number-at-point
>> etc.
> `number-at-point' uses `form-at-point'.  It returns a number (or nil),
> not a numeral (string).  It satisfies `numberp', not `stringp'.
>
> What normalization do you have in mind?

Still think detecting buffer-substrings according to THING and returning 
them if found at  point --nil otherwise-- is most straightforward.


> (I have also `decimal-number-at-point' and `hex-number-at-point', FWIW.)
>
>>> `list-at-point', `form-at-point', etc. are a different
>>> story - they can return anything.
>> Interesting question. Maybe returns the symbol if found - nil
>> otherwise?
> That's what `symbol-at-point' does.

Unfortunately it does more - it might change the symbol-table. Expect a 
passive, plain report instead.


>    However, since `nil' is a
> symbol, `symbol-at-point' does not distinguish between finding
> that symbol and not finding any symbol at point.
>
> The others return a thing of the given type (or nil, if none).
>
> `list-at-point', like `symbol-at-point', does not distinguish
> between an empty list at point (buffer text "nil" or "()" or "(  )"
> etc.) and no list at point.  The doc for `list-at-point' should in
> fact say that it returns the _non-nil_ list at point, or nil if none.
>
> It should also return the list (quote (1 2)) when on '(1 2) (it's
> broken, IMO).  (I also have a function `unquoted-list-at-point'.)





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21391; Package emacs. Full text available.

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


Received: (at submit) by debbugs.gnu.org; 8 Nov 2016 08:14:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 08 03:14:16 2016
Received: from localhost ([127.0.0.1]:49007 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1c41Xs-0007HO-3O
	for submit <at> debbugs.gnu.org; Tue, 08 Nov 2016 03:14:16 -0500
Received: from eggs.gnu.org ([208.118.235.92]:48349)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <andreas.roehler@HIDDEN>) id 1c41Xr-0007Gx-E8
 for submit <at> debbugs.gnu.org; Tue, 08 Nov 2016 03:14:15 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <andreas.roehler@HIDDEN>) id 1c41Xl-0001Pd-Jn
 for submit <at> debbugs.gnu.org; Tue, 08 Nov 2016 03:14:10 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled
 version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:36893)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <andreas.roehler@HIDDEN>)
 id 1c41Xl-0001PZ-Ga
 for submit <at> debbugs.gnu.org; Tue, 08 Nov 2016 03:14:09 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:39316)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <andreas.roehler@HIDDEN>) id 1c41Xk-0007Xr-EN
 for bug-gnu-emacs@HIDDEN; Tue, 08 Nov 2016 03:14:09 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <andreas.roehler@HIDDEN>) id 1c41Xj-0001OU-IS
 for bug-gnu-emacs@HIDDEN; Tue, 08 Nov 2016 03:14:08 -0500
Received: from mout.kundenserver.de ([217.72.192.73]:50476)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <andreas.roehler@HIDDEN>)
 id 1c41Xe-0001LS-RV; Tue, 08 Nov 2016 03:14:03 -0500
Received: from [192.168.178.35] ([77.12.86.218]) by mrelayeu.kundenserver.de
 (mreue101) with ESMTPSA (Nemesis) id 0LsyHC-1cojLf1IyY-012Wa4; Tue, 08 Nov
 2016 09:14:01 +0100
Subject: Re: bug#21391: 24.5; `thing-at-point' should return a string
To: bug-gnu-emacs@HIDDEN
References: <alpine.LRH.2.20.1509011056480.5317@HIDDEN>
 <alpine.DEB.2.20.1610131558480.2834@calancha-pc>
 <0a68c2ae-0940-4e2c-8b3c-1faceb45c43c@default>
 <1773ab35-70b1-42f9-8a8b-fe07881487d1@default> <874m3krnb6.fsf_-_@HIDDEN>
 <83a8dbiaps.fsf@HIDDEN> <b2484b79-3aaf-4dde-a60f-420f8a2222b8@HIDDEN>
 <83pom7gjhl.fsf@HIDDEN> <0a8d76e4-4d1b-a26d-2b76-a2d9384d9f72@HIDDEN>
 <83mvhbgitf.fsf@HIDDEN>
From: =?UTF-8?Q?Andreas_R=c3=b6hler?= <andreas.roehler@HIDDEN>
Message-ID: <97f5732b-1c05-6b73-9200-8284ef341def@HIDDEN>
Date: Tue, 8 Nov 2016 09:22:24 +0100
User-Agent: Mozilla/5.0 (X11; Linux i686; rv:45.0) Gecko/20100101
 Icedove/45.4.0
MIME-Version: 1.0
In-Reply-To: <83mvhbgitf.fsf@HIDDEN>
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K0:6s2rrpP6dwsIwCotBBryrEeE0oKlKUXWQSO7B2qrpuVbR5cZA0V
 76ev5oNjA6leONyoeaCuizElZFRxuFyHESbOCFeXD45z+J82H+GMOdpmXXNBZvq1eFkvZQ6
 5VeWl/aFaaRCZiJR5fFLZOPd2tMM4qKTQ2Js/jOG/+7N6EzVFr0oWVtn6IzVskV0R8+mSXt
 +UWYCHNHEMRLci3ungtJQ==
X-UI-Out-Filterresults: notjunk:1;V01:K0:YVrLGANQQrY=:5acbtPPweWvyM0YCgLrPnP
 SYOHkysJsPqUir2hHlTDsmvRhYoRC+yLqnBlBO6hSO9aNKEAD7xXTsHWaYWnMr1P4RmO8/B6o
 g1sMtC+Fdcjr3t9DljG/6TpSUQaWff1wkUe1NlS8RVu+Gr73Bt85JYRKjmA2tkrVDZjn06yl4
 S8UOlnwnjH/S2guP00HR5aKlLHOCIshm7niFU4/OlfSMYbDXivvPcQ14g1OyLeKcZ95XJ+tz4
 T2HK2fSKqmU8ew+TREYg/SgLgkPcv5dnGcuDhGJVdxPnHo9u93XLU+pjxCpaQI2zI3nrw2JCo
 zXC6UqiPoCa3vGrfzCPwiSnxLHdbzUd3FB+0Vi8cR6n/7PHFTICzbqxkCm7iT71bdtp+bQs//
 ZAvYyXd189EFagjjoMPxE8J7Eeanx5oAiRvOu21YFIvbqgkaj564ihfY9grQPp1sUxcNoElYW
 TCzx4GMMwCi304vDTU9cwqxV8sPReY3lGcEkF4OV+okVfg9z1+qzXTjJ9TqOKE9y2h09DnFa2
 RH8od1z7Sy+vBSbsLcLY6OcML6Q00x9o7F6NMeWVvbPfLopX2TjdEQ1kpolXVfiyngEzcwP/3
 hkuex+/8m85rLuw08SlP+O+VtROVGbC9AmWSvLhwNqwrIFaazQhUTj8djCL0xh51cOaSgix5z
 43KaaVVtixpEPXpMWX7becifEkkP06oiFDqJiPA8zWpnJ84Z9VLfAnV3q7P1wPxD0/oTuvAWG
 QA78AMu6N/C6X7S5
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: submit
Cc: Eli Zaretskii <eliz@HIDDEN>, Dmitry Gutov <dgutov@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://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: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)



On 07.11.2016 21:02, Eli Zaretskii wrote:
>> Cc: tino.calancha@HIDDEN, 21391 <at> debbugs.gnu.org
>> From: Dmitry Gutov <dgutov@HIDDEN>
>> Date: Mon, 7 Nov 2016 21:51:23 +0200
>>
>>>> It's pretty clearly a bug: most other "things" behave otherwise (list,
>>>> sexp, symbol). I'd very much rather we didn't retain conceptual problems
>>>> like that just for the sake of compatibility.
>>> Not sure which behavior you have in mind.  The removal of properties?
>>> Or something else?
>> Returning something other than a string or nil from thing-at-point.
> Didn't the function behave that way for quite some time?  If so, how
> come it's suddenly a problem?
>
>
>

Assume a lot of bugs open like #21391.
These library, which is excellent in base, needs a cleanup, resp. 
reconsideration.





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21391; Package emacs. Full text available.

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


Received: (at 21391) by debbugs.gnu.org; 7 Nov 2016 20:04:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 07 15:04:11 2016
Received: from localhost ([127.0.0.1]:48721 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1c3q9L-0005cx-2V
	for submit <at> debbugs.gnu.org; Mon, 07 Nov 2016 15:04:11 -0500
Received: from mail-wm0-f45.google.com ([74.125.82.45]:37077)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1c3q9I-0005ck-N4
 for 21391 <at> debbugs.gnu.org; Mon, 07 Nov 2016 15:04:08 -0500
Received: by mail-wm0-f45.google.com with SMTP id t79so199195226wmt.0
 for <21391 <at> debbugs.gnu.org>; Mon, 07 Nov 2016 12:04:08 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=sender:subject:to:references:cc:from:message-id:date:user-agent
 :mime-version:in-reply-to:content-language:content-transfer-encoding;
 bh=aAJeoa6DL63Ov6BoZPiFu/ZuSOaVfvt2615iqjATXCs=;
 b=ebw8BJYUiQHCrFUJO0FFdGJLAho/w+uLQcjyQsji0m34hckyj7ccvUouOKnM4Hl02Q
 gu//vwTHOucv/9Q/fmZ9XRCNYAUr+MruoplV4s59jwWh4ppiQ1qa9e9lJk3GsqfdrXta
 Rem4zbZ3etM6iVjz7VyzSH2C1PgS1JGvK3jFruNu1JHXcwDwvSxmPM9bizwrC+EtH+ef
 oQf1Y7jvo5L7gzP4INrkZEKsBQo9vpIqvgONZqMexRM4W9keVePpGQNw+vVg6LVu7xxk
 8IPO6JUP71rW+zIlKn56yIKAm7tsemkb5Y3dNokVkw2ADJqQ7dtjGQvdgxDkWPo6qRy5
 nvmw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:sender:subject:to:references:cc:from:message-id
 :date:user-agent:mime-version:in-reply-to:content-language
 :content-transfer-encoding;
 bh=aAJeoa6DL63Ov6BoZPiFu/ZuSOaVfvt2615iqjATXCs=;
 b=Ywgm2JWeXgx4VN3UHpwV+6frFY+Ako6/yJh7osuIYl6eoaVygbAKREQu1XnZAKTBD7
 rZJ0+OYXl8Ch7LEoF/edgINjbOXvQhrhHitjs+TNgCeOkrdNZlSjFzJfZPeC1+OnHeHD
 yhxbA4lE+FjSsfAPo/z77vQ95hDA9ZP3YP7s7Nlx94S2oIDocG8qnMKNDcTTdhQ/DrVd
 KmizpyaQLCIcaHa10EVzzCQJxCgxK3S7aD10Hp/o39CUHzToUQz39yjKzLANfq/x/SNd
 KjWWnayaHB6RFu9iKvyWca5kkEiCLk1CMeMP0Y36Tb8byWZpkQQIubSKb9cwExuNw35n
 vi1g==
X-Gm-Message-State: ABUngveHMDX0DzRGlJgnDoBS5xVywCOfMOqTRQWPItAZS8s3O7FAIyqT6oC8frz8s0c3Jw==
X-Received: by 10.28.74.133 with SMTP id n5mr11522557wmi.132.1478549041407;
 Mon, 07 Nov 2016 12:04:01 -0800 (PST)
Received: from [192.168.1.3] ([185.105.173.41])
 by smtp.googlemail.com with ESMTPSA id
 t186sm15373146wmt.22.2016.11.07.12.04.00
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Mon, 07 Nov 2016 12:04:00 -0800 (PST)
Subject: Re: bug#21391: 24.5; `thing-at-point' should return a string
To: Eli Zaretskii <eliz@HIDDEN>
References: <alpine.LRH.2.20.1509011056480.5317@HIDDEN>
 <alpine.DEB.2.20.1610131558480.2834@calancha-pc>
 <0a68c2ae-0940-4e2c-8b3c-1faceb45c43c@default>
 <1773ab35-70b1-42f9-8a8b-fe07881487d1@default> <874m3krnb6.fsf_-_@HIDDEN>
 <83a8dbiaps.fsf@HIDDEN> <b2484b79-3aaf-4dde-a60f-420f8a2222b8@HIDDEN>
 <83pom7gjhl.fsf@HIDDEN> <0a8d76e4-4d1b-a26d-2b76-a2d9384d9f72@HIDDEN>
 <83mvhbgitf.fsf@HIDDEN>
From: Dmitry Gutov <dgutov@HIDDEN>
Message-ID: <25bb22e8-1388-275a-d0da-7e698acdf6da@HIDDEN>
Date: Mon, 7 Nov 2016 22:03:58 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101
 Thunderbird/50.0
MIME-Version: 1.0
In-Reply-To: <83mvhbgitf.fsf@HIDDEN>
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 21391
Cc: 21391 <at> debbugs.gnu.org, tino.calancha@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://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: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.5 (/)

On 07.11.2016 22:02, Eli Zaretskii wrote:

> Didn't the function behave that way for quite some time?  If so, how
> come it's suddenly a problem?

Someone tried to use it for the first time?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21391; Package emacs. Full text available.

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


Received: (at 21391) by debbugs.gnu.org; 7 Nov 2016 20:01:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 07 15:01:48 2016
Received: from localhost ([127.0.0.1]:48717 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1c3q72-0005Yr-IS
	for submit <at> debbugs.gnu.org; Mon, 07 Nov 2016 15:01:48 -0500
Received: from eggs.gnu.org ([208.118.235.92]:43657)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1c3q71-0005Yd-5l
 for 21391 <at> debbugs.gnu.org; Mon, 07 Nov 2016 15:01:47 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1c3q6s-0002dy-R5
 for 21391 <at> debbugs.gnu.org; Mon, 07 Nov 2016 15:01:42 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:41777)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1c3q6s-0002du-No; Mon, 07 Nov 2016 15:01:38 -0500
Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2421
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1c3q6r-0007DL-3I; Mon, 07 Nov 2016 15:01:38 -0500
Date: Mon, 07 Nov 2016 22:02:04 +0200
Message-Id: <83mvhbgitf.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Dmitry Gutov <dgutov@HIDDEN>
In-reply-to: <0a8d76e4-4d1b-a26d-2b76-a2d9384d9f72@HIDDEN> (message from
 Dmitry Gutov on Mon, 7 Nov 2016 21:51:23 +0200)
Subject: Re: bug#21391: 24.5; `thing-at-point' should return a string
References: <alpine.LRH.2.20.1509011056480.5317@HIDDEN>
 <alpine.DEB.2.20.1610131558480.2834@calancha-pc>
 <0a68c2ae-0940-4e2c-8b3c-1faceb45c43c@default>
 <1773ab35-70b1-42f9-8a8b-fe07881487d1@default> <874m3krnb6.fsf_-_@HIDDEN>
 <83a8dbiaps.fsf@HIDDEN> <b2484b79-3aaf-4dde-a60f-420f8a2222b8@HIDDEN>
 <83pom7gjhl.fsf@HIDDEN> <0a8d76e4-4d1b-a26d-2b76-a2d9384d9f72@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -7.9 (-------)
X-Debbugs-Envelope-To: 21391
Cc: 21391 <at> debbugs.gnu.org, tino.calancha@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://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: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -7.9 (-------)

> Cc: tino.calancha@HIDDEN, 21391 <at> debbugs.gnu.org
> From: Dmitry Gutov <dgutov@HIDDEN>
> Date: Mon, 7 Nov 2016 21:51:23 +0200
> 
> >> It's pretty clearly a bug: most other "things" behave otherwise (list,
> >> sexp, symbol). I'd very much rather we didn't retain conceptual problems
> >> like that just for the sake of compatibility.
> >
> > Not sure which behavior you have in mind.  The removal of properties?
> > Or something else?
> 
> Returning something other than a string or nil from thing-at-point.

Didn't the function behave that way for quite some time?  If so, how
come it's suddenly a problem?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21391; Package emacs. Full text available.

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


Received: (at 21391) by debbugs.gnu.org; 7 Nov 2016 19:51:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 07 14:51:34 2016
Received: from localhost ([127.0.0.1]:48703 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1c3px8-0005Ew-0P
	for submit <at> debbugs.gnu.org; Mon, 07 Nov 2016 14:51:34 -0500
Received: from mail-wm0-f42.google.com ([74.125.82.42]:37832)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1c3px6-0005Ej-SW
 for 21391 <at> debbugs.gnu.org; Mon, 07 Nov 2016 14:51:33 -0500
Received: by mail-wm0-f42.google.com with SMTP id t79so198582934wmt.0
 for <21391 <at> debbugs.gnu.org>; Mon, 07 Nov 2016 11:51:32 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=sender:subject:to:references:cc:from:message-id:date:user-agent
 :mime-version:in-reply-to:content-language:content-transfer-encoding;
 bh=fAvvkoOZLVFfVzDgLTF4t/huojvHHvAPH76uSlukBjI=;
 b=jOkMi57AOH8sXoBq/naXH1gDPP/HsbOy73mspNGRx9ffudXZ2FJoNK+5obMUL6zyE+
 eUlGrLJDGvyRJIhwqGeWz8zsKDOgyqLt3S1vHqbGc+KDGI3PxpzwvMS0u5I2cv1Kimhb
 ZdnaqpRjsoBV+oyP7JOvbpMGZ876Z72jQmtts0boOcGdLG3tN1WDOZfAYqE58AToYhKs
 B6oo6JuCPrWDeSc2W/HNDatD2YyranrHGknRh5V6f9ImXTkTm5ruBZuxsjzUjOwpEC4A
 37a3CqVisNu30yHlYE5WjycRS3uKZvQm/Sax09sSIkTckQS6t2CKtJercB+wUBJdb6cr
 eKhQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:sender:subject:to:references:cc:from:message-id
 :date:user-agent:mime-version:in-reply-to:content-language
 :content-transfer-encoding;
 bh=fAvvkoOZLVFfVzDgLTF4t/huojvHHvAPH76uSlukBjI=;
 b=Cy86olkH+mjTChFtWwCxCEp+V14qTXPMM2aECAoVSsGxcCySbm69eqmF+TjW0xnmzy
 87gpQZ1xSV+upHsnrIRdhtQeU4CXdz6a6xVb0Bn8jAElSwWJurq/dggHLj8KFm94dkVF
 irXo29Hn9a3Bd9JEse/QOk+D1TWNdV/kT+/mxSCqK2Y5QALsEOoTWJai4YmN35ZN18KK
 V+wnpHdTFQYGjZNHsxt4+PF6bWKgrrZT1j9tWOy2VC2o4jRmuyXBhRyFmar841NjJ9xA
 7iOMi59ZqqlGSxtASXw3QUxAzckyBjxRljGxcjeFZXiaL2TMI5SwnCth7cO+V2bG5MQm
 GIMw==
X-Gm-Message-State: ABUngvcYj5NL9MrOFDlXXCbZBBmFoG80v03xnV+PZivRkhWq/fH3lKg3AMz1scM8O5t7gw==
X-Received: by 10.194.86.165 with SMTP id q5mr1360492wjz.178.1478548286883;
 Mon, 07 Nov 2016 11:51:26 -0800 (PST)
Received: from [192.168.1.3] ([185.105.173.41])
 by smtp.googlemail.com with ESMTPSA id cl10sm24386793wjb.4.2016.11.07.11.51.25
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Mon, 07 Nov 2016 11:51:26 -0800 (PST)
Subject: Re: bug#21391: 24.5; `thing-at-point' should return a string
To: Eli Zaretskii <eliz@HIDDEN>
References: <alpine.LRH.2.20.1509011056480.5317@HIDDEN>
 <alpine.DEB.2.20.1610131558480.2834@calancha-pc>
 <0a68c2ae-0940-4e2c-8b3c-1faceb45c43c@default>
 <1773ab35-70b1-42f9-8a8b-fe07881487d1@default> <874m3krnb6.fsf_-_@HIDDEN>
 <83a8dbiaps.fsf@HIDDEN> <b2484b79-3aaf-4dde-a60f-420f8a2222b8@HIDDEN>
 <83pom7gjhl.fsf@HIDDEN>
From: Dmitry Gutov <dgutov@HIDDEN>
Message-ID: <0a8d76e4-4d1b-a26d-2b76-a2d9384d9f72@HIDDEN>
Date: Mon, 7 Nov 2016 21:51:23 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101
 Thunderbird/50.0
MIME-Version: 1.0
In-Reply-To: <83pom7gjhl.fsf@HIDDEN>
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 21391
Cc: 21391 <at> debbugs.gnu.org, tino.calancha@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://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: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.5 (/)

On 07.11.2016 21:47, Eli Zaretskii wrote:

>> When thing is a number? Maybe. I don't imagine it's used very often.
>
> But previously it could be used.  After this change, it would be
> impossible.

The callers will need to switch to `number-at-point', probably. The 
resulting code will work with both new and older versions of Emacs.

>> It's pretty clearly a bug: most other "things" behave otherwise (list,
>> sexp, symbol). I'd very much rather we didn't retain conceptual problems
>> like that just for the sake of compatibility.
>
> Not sure which behavior you have in mind.  The removal of properties?
> Or something else?

Returning something other than a string or nil from thing-at-point.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21391; Package emacs. Full text available.

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


Received: (at 21391) by debbugs.gnu.org; 7 Nov 2016 19:47:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 07 14:47:20 2016
Received: from localhost ([127.0.0.1]:48694 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1c3pt2-000579-5e
	for submit <at> debbugs.gnu.org; Mon, 07 Nov 2016 14:47:20 -0500
Received: from eggs.gnu.org ([208.118.235.92]:38602)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1c3pt0-00056v-T0
 for 21391 <at> debbugs.gnu.org; Mon, 07 Nov 2016 14:47:19 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1c3psr-0003Ks-OH
 for 21391 <at> debbugs.gnu.org; Mon, 07 Nov 2016 14:47:13 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:41545)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1c3psr-0003Kn-LD; Mon, 07 Nov 2016 14:47:09 -0500
Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2406
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1c3psq-0005Pq-7l; Mon, 07 Nov 2016 14:47:09 -0500
Date: Mon, 07 Nov 2016 21:47:34 +0200
Message-Id: <83pom7gjhl.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Dmitry Gutov <dgutov@HIDDEN>
In-reply-to: <b2484b79-3aaf-4dde-a60f-420f8a2222b8@HIDDEN> (message from
 Dmitry Gutov on Mon, 7 Nov 2016 21:12:07 +0200)
Subject: Re: bug#21391: 24.5; `thing-at-point' should return a string
References: <alpine.LRH.2.20.1509011056480.5317@HIDDEN>
 <alpine.DEB.2.20.1610131558480.2834@calancha-pc>
 <0a68c2ae-0940-4e2c-8b3c-1faceb45c43c@default>
 <1773ab35-70b1-42f9-8a8b-fe07881487d1@default> <874m3krnb6.fsf_-_@HIDDEN>
 <83a8dbiaps.fsf@HIDDEN> <b2484b79-3aaf-4dde-a60f-420f8a2222b8@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -7.9 (-------)
X-Debbugs-Envelope-To: 21391
Cc: 21391 <at> debbugs.gnu.org, tino.calancha@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://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: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -7.9 (-------)

> Cc: 21391 <at> debbugs.gnu.org
> From: Dmitry Gutov <dgutov@HIDDEN>
> Date: Mon, 7 Nov 2016 21:12:07 +0200
> 
> On 07.11.2016 17:14, Eli Zaretskii wrote:
> 
> >> It's natural if `thing-at-point' returns the thing as a string.
> >> When the user don't want a string then s?he can use the specific
> >> functions, like `number-at-point' or `list-at-point'.
> >
> > Isn't that completely backward-incompatible?
> 
> When thing is a number? Maybe. I don't imagine it's used very often.

But previously it could be used.  After this change, it would be
impossible.

> > If so, I don't think we
> > can do that.
> 
> It's pretty clearly a bug: most other "things" behave otherwise (list, 
> sexp, symbol). I'd very much rather we didn't retain conceptual problems 
> like that just for the sake of compatibility.

Not sure which behavior you have in mind.  The removal of properties?
Or something else?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21391; Package emacs. Full text available.

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


Received: (at 21391) by debbugs.gnu.org; 7 Nov 2016 19:12:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 07 14:12:19 2016
Received: from localhost ([127.0.0.1]:48678 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1c3pL9-0004Dp-Ms
	for submit <at> debbugs.gnu.org; Mon, 07 Nov 2016 14:12:19 -0500
Received: from mail-wm0-f52.google.com ([74.125.82.52]:37783)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1c3pL8-0004Dc-1W
 for 21391 <at> debbugs.gnu.org; Mon, 07 Nov 2016 14:12:18 -0500
Received: by mail-wm0-f52.google.com with SMTP id t79so196685458wmt.0
 for <21391 <at> debbugs.gnu.org>; Mon, 07 Nov 2016 11:12:18 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=sender:subject:to:references:cc:from:message-id:date:user-agent
 :mime-version:in-reply-to:content-language:content-transfer-encoding;
 bh=JCf8W3ZY+VYIfPZ/4qrBwcjQKk417iJaq7329zMpNko=;
 b=VBB69Bwwq6SWBzbxtFHJnPkR/sc/z+sy5FaWpMqutdGUXd/UuShLcnhK2Beh8ItXxU
 sGqR/R2wFra3g9bARtGaAhcOJ0Vr0NRHDGRZrhiT9STxS0kaw55PdyoHRpbXYqpXNeBY
 Tgg3tJeC5tLPYZXFIanJw77Dud2FIRsKuefOhEpQUcGnMROoTiDUsgnVPU4mtQ8Jvoa1
 WvLZENfatocuKPbudeXhGqQIYgVA7KuNk8pdWJlXXA67HWXHoSEI81lzLQBNGo6Jv+D+
 i4K/zTNUMgiSbz46KsuxtysXrKEmhWBA3TpaeDlGn58/ByJLpeZlo4sVY8WM0JQRuATB
 Ae+Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:sender:subject:to:references:cc:from:message-id
 :date:user-agent:mime-version:in-reply-to:content-language
 :content-transfer-encoding;
 bh=JCf8W3ZY+VYIfPZ/4qrBwcjQKk417iJaq7329zMpNko=;
 b=CEFoR5WwnX/MWHzLDkhe+h/pbOHrFGUgwfUkIfanPhzB4lMSMnkf8hMPwaRPluqRzv
 FoFnEwDqD1gKLtihHvWuYg/hRdH1MFYvczg2/tCNpYA+uxQkmjo3BsviMbZ91KH2jXrF
 LCUVckq2Ru516o0Kr6BDTa/nk5mygdBcIyy9Df3cCWLVxAHkAIY1qTujoqjF/4XvEZCq
 LtzZoQTPYU98WtTY2amqw8+qYH6OMze/+jEss+i3A6OxgUBUjgiVMtE+s4QQlYCRjYuz
 Ld5H9tgIGUJTZZ/BovhDQN42BInlssVWG78bixVLX+tYT3gkOT8NkzXRDacZVQNqr8fE
 gD6A==
X-Gm-Message-State: ABUngvf0LkZnzAv5YlCC2vgr8J8LgUd+QRwQfwvvyb4eWgslMmk+roFn2Jfp0HIEqny5BA==
X-Received: by 10.28.234.201 with SMTP id g70mr8051952wmi.104.1478545932232;
 Mon, 07 Nov 2016 11:12:12 -0800 (PST)
Received: from [192.168.1.3] ([185.105.173.41])
 by smtp.googlemail.com with ESMTPSA id wh3sm32603566wjb.49.2016.11.07.11.12.10
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Mon, 07 Nov 2016 11:12:11 -0800 (PST)
Subject: Re: bug#21391: 24.5; `thing-at-point' should return a string
To: Eli Zaretskii <eliz@HIDDEN>, Tino Calancha <tino.calancha@HIDDEN>
References: <alpine.LRH.2.20.1509011056480.5317@HIDDEN>
 <alpine.DEB.2.20.1610131558480.2834@calancha-pc>
 <0a68c2ae-0940-4e2c-8b3c-1faceb45c43c@default>
 <1773ab35-70b1-42f9-8a8b-fe07881487d1@default> <874m3krnb6.fsf_-_@HIDDEN>
 <83a8dbiaps.fsf@HIDDEN>
From: Dmitry Gutov <dgutov@HIDDEN>
Message-ID: <b2484b79-3aaf-4dde-a60f-420f8a2222b8@HIDDEN>
Date: Mon, 7 Nov 2016 21:12:07 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101
 Thunderbird/50.0
MIME-Version: 1.0
In-Reply-To: <83a8dbiaps.fsf@HIDDEN>
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 21391
Cc: 21391 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://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: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.5 (/)

On 07.11.2016 17:14, Eli Zaretskii wrote:

>> It's natural if `thing-at-point' returns the thing as a string.
>> When the user don't want a string then s?he can use the specific
>> functions, like `number-at-point' or `list-at-point'.
>
> Isn't that completely backward-incompatible?

When thing is a number? Maybe. I don't imagine it's used very often.

> If so, I don't think we
> can do that.

It's pretty clearly a bug: most other "things" behave otherwise (list, 
sexp, symbol). I'd very much rather we didn't retain conceptual problems 
like that just for the sake of compatibility.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21391; Package emacs. Full text available.

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


Received: (at 21391) by debbugs.gnu.org; 7 Nov 2016 18:37:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 07 13:37:28 2016
Received: from localhost ([127.0.0.1]:48661 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1c3onQ-0003Op-C6
	for submit <at> debbugs.gnu.org; Mon, 07 Nov 2016 13:37:28 -0500
Received: from userp1040.oracle.com ([156.151.31.81]:27939)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>) id 1c3onO-0003Oa-7c
 for 21391 <at> debbugs.gnu.org; Mon, 07 Nov 2016 13:37:26 -0500
Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233])
 by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id
 uA7IbJ89018413
 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
 Mon, 7 Nov 2016 18:37:19 GMT
Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235])
 by aserv0021.oracle.com (8.13.8/8.13.8) with ESMTP id uA7IbJqi004497
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
 Mon, 7 Nov 2016 18:37:19 GMT
Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7])
 by aserv0121.oracle.com (8.13.8/8.13.8) with ESMTP id uA7IbGm4012600;
 Mon, 7 Nov 2016 18:37:17 GMT
MIME-Version: 1.0
Message-ID: <0e01c7ea-13b2-47ca-92c9-5de40b29379f@default>
Date: Mon, 7 Nov 2016 10:37:14 -0800 (PST)
From: Drew Adams <drew.adams@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: RE: bug#21391: 24.5; `thing-at-point' should return a string
References: <<<alpine.LRH.2.20.1509011056480.5317@HIDDEN>
 <alpine.DEB.2.20.1610131558480.2834@calancha-pc>
 <0a68c2ae-0940-4e2c-8b3c-1faceb45c43c@default>
 <1773ab35-70b1-42f9-8a8b-fe07881487d1@default>>>
 <<<874m3krnb6.fsf_-_@HIDDEN>>> <<<83a8dbiaps.fsf@HIDDEN>>>
 <<123efdfd-3a87-4b39-9567-a56ecc3ea82e@default>> <<831syni2u1.fsf@HIDDEN>>
In-Reply-To: <<831syni2u1.fsf@HIDDEN>>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1  (1003210) [OL
 12.0.6753.5000 (x86)]
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Source-IP: aserv0021.oracle.com [141.146.126.233]
X-Spam-Score: -7.8 (-------)
X-Debbugs-Envelope-To: 21391
Cc: 21391 <at> debbugs.gnu.org, tino.calancha@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://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: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -7.8 (-------)

> This is already fixed in the current sources.  We now only remove
> the text properties if the object supports that.  Why isn't that enough?

My understanding was, as I said, that Emacs Dev wanted `t-a-p' to
always return a string (or nil), and that `form-at-point' is to be
used to return something else.  The advantage of that, I suppose,
was considered to be that callers could count on the return type,
without regard to the THING arg.

I don't have emacs-devel or bug-report messages to hand, to
support my understanding, but I thought that was the point of view
taken by those deciding, so far, wrt thingatpt.el.  I know that I
made an effort to adjust my code, to accommodate that approach.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21391; Package emacs. Full text available.

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


Received: (at 21391) by debbugs.gnu.org; 7 Nov 2016 18:04:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 07 13:04:03 2016
Received: from localhost ([127.0.0.1]:48641 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1c3oH4-0002cV-V4
	for submit <at> debbugs.gnu.org; Mon, 07 Nov 2016 13:04:03 -0500
Received: from eggs.gnu.org ([208.118.235.92]:38215)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1c3oH3-0002c2-BJ
 for 21391 <at> debbugs.gnu.org; Mon, 07 Nov 2016 13:04:01 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1c3oGt-00031S-VF
 for 21391 <at> debbugs.gnu.org; Mon, 07 Nov 2016 13:03:56 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:40108)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1c3oGt-00031K-Sj; Mon, 07 Nov 2016 13:03:51 -0500
Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2179
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1c3oGs-000831-W1; Mon, 07 Nov 2016 13:03:51 -0500
Date: Mon, 07 Nov 2016 20:04:22 +0200
Message-Id: <831syni2u1.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Drew Adams <drew.adams@HIDDEN>
In-reply-to: <123efdfd-3a87-4b39-9567-a56ecc3ea82e@default> (message from Drew
 Adams on Mon, 7 Nov 2016 08:10:34 -0800 (PST))
Subject: Re: bug#21391: 24.5; `thing-at-point' should return a string
References: <<alpine.LRH.2.20.1509011056480.5317@HIDDEN>
 <alpine.DEB.2.20.1610131558480.2834@calancha-pc>
 <0a68c2ae-0940-4e2c-8b3c-1faceb45c43c@default>
 <1773ab35-70b1-42f9-8a8b-fe07881487d1@default>>
 <<874m3krnb6.fsf_-_@HIDDEN>> <<83a8dbiaps.fsf@HIDDEN>>
 <123efdfd-3a87-4b39-9567-a56ecc3ea82e@default>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -7.9 (-------)
X-Debbugs-Envelope-To: 21391
Cc: 21391 <at> debbugs.gnu.org, tino.calancha@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://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: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -7.9 (-------)

> Date: Mon, 7 Nov 2016 08:10:34 -0800 (PST)
> From: Drew Adams <drew.adams@HIDDEN>
> Cc: 21391 <at> debbugs.gnu.org, drew.adams@HIDDEN
> 
> What is new (since Emacs 24.4) is that someone added this at the end
> of the definition of `thing-at-point', and made it pertain to _both_
> branches of the `if'.  In addition, they named the result of the `if'
> by the variable `text'.
> 
> (when (and text no-properties)
>   (set-text-properties 0 (length text) nil text))
> 
> They apparently paid no attention to the important `thing-at-point'
> behavior provided by the first `if' clause, and instead just assumed
> that the `if' always returned a string.

This is already fixed in the current sources.  We now only remove the
text properties if the object supports that.  Why isn't that enough?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21391; Package emacs. Full text available.

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


Received: (at submit) by debbugs.gnu.org; 7 Nov 2016 17:37:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 07 12:37:59 2016
Received: from localhost ([127.0.0.1]:48621 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1c3nrr-00020Z-8w
	for submit <at> debbugs.gnu.org; Mon, 07 Nov 2016 12:37:59 -0500
Received: from eggs.gnu.org ([208.118.235.92]:57984)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>) id 1c3nrp-00020M-DC
 for submit <at> debbugs.gnu.org; Mon, 07 Nov 2016 12:37:58 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <drew.adams@HIDDEN>) id 1c3nrf-0000u4-9x
 for submit <at> debbugs.gnu.org; Mon, 07 Nov 2016 12:37:52 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled
 version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:35618)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <drew.adams@HIDDEN>)
 id 1c3nrf-0000tx-7J
 for submit <at> debbugs.gnu.org; Mon, 07 Nov 2016 12:37:47 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:48933)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <drew.adams@HIDDEN>) id 1c3nre-0008Pt-5h
 for bug-gnu-emacs@HIDDEN; Mon, 07 Nov 2016 12:37:46 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <drew.adams@HIDDEN>) id 1c3nrd-0000tM-Cs
 for bug-gnu-emacs@HIDDEN; Mon, 07 Nov 2016 12:37:46 -0500
Received: from userp1040.oracle.com ([156.151.31.81]:41375)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <drew.adams@HIDDEN>)
 id 1c3nrY-0000pt-Ql; Mon, 07 Nov 2016 12:37:41 -0500
Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234])
 by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id
 uA7HbYh3001597
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Mon, 7 Nov 2016 17:37:34 GMT
Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75])
 by aserv0022.oracle.com (8.14.4/8.13.8) with ESMTP id uA7HbXMq011976
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Mon, 7 Nov 2016 17:37:34 GMT
Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7])
 by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id uA7HbVNr024626;
 Mon, 7 Nov 2016 17:37:31 GMT
MIME-Version: 1.0
Message-ID: <2857cfd4-94db-49ae-902e-a010c0571868@default>
Date: Mon, 7 Nov 2016 09:37:30 -0800 (PST)
From: Drew Adams <drew.adams@HIDDEN>
To: =?utf-8?B?QW5kcmVhcyBSw7ZobGVy?= <andreas.roehler@HIDDEN>,
 bug-gnu-emacs@HIDDEN
Subject: RE: bug#21391: 24.5; `thing-at-point' returns error when called with
 arguments 'number t)
References: <alpine.LRH.2.20.1509011056480.5317@HIDDEN>
 <alpine.DEB.2.20.1610131558480.2834@calancha-pc>
 <0a68c2ae-0940-4e2c-8b3c-1faceb45c43c@default>
 <1773ab35-70b1-42f9-8a8b-fe07881487d1@default>
 <302c1b51-e840-a2ca-5b8f-e3f64532eda8@HIDDEN>
In-Reply-To: <302c1b51-e840-a2ca-5b8f-e3f64532eda8@HIDDEN>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1  (1003210) [OL
 12.0.6753.5000 (x86)]
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Source-IP: aserv0022.oracle.com [141.146.126.234]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-Debbugs-Envelope-To: submit
Cc: Eli Zaretskii <eliz@HIDDEN>, Tino Calancha <tino.calancha@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://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: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.0 (----)

> > `thing-at-point' should always return a string.
>=20
> Indeed. Which would require some normalization WRT number-at-point
> etc.

`number-at-point' uses `form-at-point'.  It returns a number (or nil),
not a numeral (string).  It satisfies `numberp', not `stringp'.

What normalization do you have in mind?

(I have also `decimal-number-at-point' and `hex-number-at-point', FWIW.)

> > `list-at-point', `form-at-point', etc. are a different
> > story - they can return anything.
>=20
> Interesting question. Maybe returns the symbol if found - nil
> otherwise?

That's what `symbol-at-point' does.  However, since `nil' is a
symbol, `symbol-at-point' does not distinguish between finding
that symbol and not finding any symbol at point.

The others return a thing of the given type (or nil, if none).

`list-at-point', like `symbol-at-point', does not distinguish
between an empty list at point (buffer text "nil" or "()" or "(  )"
etc.) and no list at point.  The doc for `list-at-point' should in
fact say that it returns the _non-nil_ list at point, or nil if none.

It should also return the list (quote (1 2)) when on '(1 2) (it's
broken, IMO).  (I also have a function `unquoted-list-at-point'.)




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21391; Package emacs. Full text available.

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


Received: (at submit) by debbugs.gnu.org; 7 Nov 2016 17:14:10 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 07 12:14:10 2016
Received: from localhost ([127.0.0.1]:48616 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1c3nUo-0001TJ-8m
	for submit <at> debbugs.gnu.org; Mon, 07 Nov 2016 12:14:10 -0500
Received: from eggs.gnu.org ([208.118.235.92]:50644)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <andreas.roehler@HIDDEN>) id 1c3nUm-0001T6-Cu
 for submit <at> debbugs.gnu.org; Mon, 07 Nov 2016 12:14:08 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <andreas.roehler@HIDDEN>) id 1c3nUg-0000oZ-GP
 for submit <at> debbugs.gnu.org; Mon, 07 Nov 2016 12:14:03 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled
 version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:33383)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <andreas.roehler@HIDDEN>)
 id 1c3nUg-0000oE-Cw
 for submit <at> debbugs.gnu.org; Mon, 07 Nov 2016 12:14:02 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:41605)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <andreas.roehler@HIDDEN>) id 1c3nUc-0007Ib-AX
 for bug-gnu-emacs@HIDDEN; Mon, 07 Nov 2016 12:14:02 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <andreas.roehler@HIDDEN>) id 1c3nUX-0000WU-Bn
 for bug-gnu-emacs@HIDDEN; Mon, 07 Nov 2016 12:13:58 -0500
Received: from mout.kundenserver.de ([217.72.192.74]:53133)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <andreas.roehler@HIDDEN>)
 id 1c3nUX-0000Su-1U; Mon, 07 Nov 2016 12:13:53 -0500
Received: from [192.168.178.35] ([77.12.174.196]) by mrelayeu.kundenserver.de
 (mreue102) with ESMTPSA (Nemesis) id 0LheU5-1cYgPJ2KYr-00mpxL;
 Mon, 07 Nov 2016 18:13:44 +0100
Subject: Re: bug#21391: 24.5; `thing-at-point' returns error when called with
 arguments 'number t)
To: bug-gnu-emacs@HIDDEN
References: <alpine.LRH.2.20.1509011056480.5317@HIDDEN>
 <alpine.DEB.2.20.1610131558480.2834@calancha-pc>
 <0a68c2ae-0940-4e2c-8b3c-1faceb45c43c@default>
 <1773ab35-70b1-42f9-8a8b-fe07881487d1@default>
From: =?UTF-8?Q?Andreas_R=c3=b6hler?= <andreas.roehler@HIDDEN>
Message-ID: <302c1b51-e840-a2ca-5b8f-e3f64532eda8@HIDDEN>
Date: Mon, 7 Nov 2016 18:22:04 +0100
User-Agent: Mozilla/5.0 (X11; Linux i686; rv:45.0) Gecko/20100101
 Icedove/45.4.0
MIME-Version: 1.0
In-Reply-To: <1773ab35-70b1-42f9-8a8b-fe07881487d1@default>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K0:oT3qoxZFrjiRlZ3yNvElO02IDMHdB80siX3nQD2zCM8hOumuCXP
 OxvtHTbjpdAunY8Jrv2/why6XkZDXOZY3bla4XREMGWQP/Iv+hphzlzfsvb8qPEf3kRHO0M
 49bmXZ2AxTOzFwLt3EXwt3hAzB9hwvUSf7ASykehanAnJpb9FAIjLhAYwvihgkt7C69l4h7
 1Nb8aOjrb0khHetiEzGvg==
X-UI-Out-Filterresults: notjunk:1;V01:K0:C0lgdTEjAdQ=:3aTE9SrL5a06SG6Ftvn1u1
 t8oMD1XX2KlxcjACB9T6ZX3F5nNv/mKysaTTJ4JX+G1wRUtJ9VwTUh6tClP1iZlta0uJQayv9
 ViNCUI/Yp0PPvYK920SCpzU0ly8uPNzwG9jJy6VszVH/uCUsPDHgfPXZHL/3dynuJIQCr/JVy
 rKH0XHt5Blh7UhTH4mDT6uQJr9J0F5su1Aot7Fvh3EI17zP0SYYAcsoCOkdChxn6doSSinMg4
 my0Sk00DDNepdYM4BlOfn/NoNOI2FlkU1t4zRTw+0eQn93iLrw5RPNXOXVZ/0YRTNNKgaXEU9
 7cZx9CGPkAwQlQm9QtaMSmMTLrOf57gLkodJJnwgwOV/uWFpXLdVRkXYG9jXdBP/tUmorQv74
 SW9eQLB45IhTrqRMN9N6HWgnKrsppV172R5p8SWe1S9BIFce+Zi2I8qu8PChEEOFlIvkTRSq0
 trdepTQW5O1QCV0xbXShvJpQpaEo5cIcnRK1dbLMcHjZ+skB3D1EYpFiKu1EpMC2SiH7O6c4L
 utz2ZfGhGMu11BAmTnBTTzB11y9473YuwiBzvfY9zN751TU/awuDG0Y3ohzSuft+25HIJ00q3
 gRs88FjybMtVjGBXoDuI8S1S6nN++X/KE7/y4jUYlelnjhud0T/Rr0sVwAqyJ47Q2B4l48BMs
 VtT0ePDesNbgSZnK8b/wfklC8swVzvuD0W48oP/d0F9J2vz++evP7K2FSvcwkoV45lbYdI1on
 6IQaXDCqAhWQxBEP
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: submit
Cc: Eli Zaretskii <eliz@HIDDEN>, Drew Adams <drew.adams@HIDDEN>,
 Tino Calancha <tino.calancha@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://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: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)



On 04.11.2016 21:03, Drew Adams wrote:
> Sorry, but I confused things further, I'm afraid.
>
> `thing-at-point' should always return a string.

Indeed. Which would require some normalization WRT number-at-point etc.


> `list-at-point', `form-at-point', etc. are a different
> story - they can return anything.

Interesting question. Maybe returns the symbol if found - nil otherwise?





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21391; Package emacs. Full text available.

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


Received: (at 21391) by debbugs.gnu.org; 7 Nov 2016 16:10:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 07 11:10:51 2016
Received: from localhost ([127.0.0.1]:48567 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1c3mVX-0006ni-1k
	for submit <at> debbugs.gnu.org; Mon, 07 Nov 2016 11:10:51 -0500
Received: from userp1040.oracle.com ([156.151.31.81]:26799)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>) id 1c3mVV-0006nW-BL
 for 21391 <at> debbugs.gnu.org; Mon, 07 Nov 2016 11:10:49 -0500
Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233])
 by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id
 uA7GAgol026962
 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
 Mon, 7 Nov 2016 16:10:43 GMT
Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72])
 by aserv0021.oracle.com (8.13.8/8.13.8) with ESMTP id uA7GAgZ1009383
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
 Mon, 7 Nov 2016 16:10:42 GMT
Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7])
 by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id uA7GAaD6005193;
 Mon, 7 Nov 2016 16:10:37 GMT
MIME-Version: 1.0
Message-ID: <123efdfd-3a87-4b39-9567-a56ecc3ea82e@default>
Date: Mon, 7 Nov 2016 08:10:34 -0800 (PST)
From: Drew Adams <drew.adams@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>, Tino Calancha <tino.calancha@HIDDEN>
Subject: RE: bug#21391: 24.5; `thing-at-point' should return a string
References: <<alpine.LRH.2.20.1509011056480.5317@HIDDEN>
 <alpine.DEB.2.20.1610131558480.2834@calancha-pc>
 <0a68c2ae-0940-4e2c-8b3c-1faceb45c43c@default>
 <1773ab35-70b1-42f9-8a8b-fe07881487d1@default>>
 <<874m3krnb6.fsf_-_@HIDDEN>> <<83a8dbiaps.fsf@HIDDEN>>
In-Reply-To: <<83a8dbiaps.fsf@HIDDEN>>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1  (1003210) [OL
 12.0.6753.5000 (x86)]
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Source-IP: aserv0021.oracle.com [141.146.126.233]
X-Spam-Score: -7.8 (-------)
X-Debbugs-Envelope-To: 21391
Cc: drew.adams@HIDDEN, 21391 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://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: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -7.8 (-------)

> > > A proper fix is to convert the result returned by
> > > (funcall (get thing 'thing-at-point)) to a string.
> > > For that, you can use (format "%s" thing).
> >
> > It's natural if `thing-at-point' returns the thing as a string.
> > When the user don't want a string then s?he can use the specific
> > functions, like `number-at-point' or `list-at-point'.
>=20
> Isn't that completely backward-incompatible?  If so, I don't think
> we can do that.
>=20
> I don't really see what is "improper" with the other suggestions to
> fix this bug, which simply avoid signaling an error if the "thing at
> point" happens to be something other than a string?

`thing-at-point' has always allowed, and rightfully so, its default
behavior to be replaced by putting a function on the THING symbol as
property `thing-at-point'.  That function is invoked, and what the
return value was returned by `thing-at-point'.

The two branches of the `if' in `thing-at-point' were thus not
symmetrical (and intentionally so, so that it could return actual
things, not just strings naming things).  One branch could return
anything - a THING at point; the other branch returned a string
naming a thing at point.

This meant that `thing-at-point' could return a list, symbol, etc.
- things that are not strings.

What is new (since Emacs 24.4) is that someone added this at the end
of the definition of `thing-at-point', and made it pertain to _both_
branches of the `if'.  In addition, they named the result of the `if'
by the variable `text'.

(when (and text no-properties)
  (set-text-properties 0 (length text) nil text))

They apparently paid no attention to the important `thing-at-point'
behavior provided by the first `if' clause, and instead just assumed
that the `if' always returned a string.

IIUC, Emacs Dev (not I), has insisted that `thing-at-point' itself
should always return a string, as opposed to what `form-at-point'
(and functions defined using it) returns, which can be a THING (not
just a string naming a thing).  For one thing, this allows code
calling `thing-at-point' to count on the result being a string (if
a thing is found) or nil (if not).

I see three possibly reasonable fixes for the bug introduced in
Emacs 24.4:

1. Make `thing-at-point' always return a thing, as (IIUC) wished
   by Emacs Dev.  Have it convert the result of the first `if'
   clause to a string.  Anyone needing a real (non-string) thing
   can use `form-at-point' to get what they want.

2. Make `thing-at-point', as before, return just what the firat
   `if' clause returns, if that clause is taken.  IOW, move the
   removal of text properties (from non-nil NO-PROPERTIES) into
   the second `if' clause.  Among other things (sic), this allows
   the first `if' clause to return a propertized string.

3. Make `thing-at-point', as before, return just what the firat
   `if' clause returns, if that clause is taken, except that if
   either clause returns a string then strip that string of text
   properties (if NO-PROPERTIES is non-nil).

My understanding is that Emacs Dev has preferred that
`thing-at-point' return a string, and that users should use
`form-at-point' if they want something else.  (I've adapted my
own code to that preference.)

If so, then #1 is probably the option of choice: Convert anything
returned by (funcall (get thing 'thing-at-point)) to a string.

Personally, I do not see why Emacs added arg NO-PROPERTIES, as
anyone could always remove properties on a string result from
`thing-at-point'.  Dunno who added this arg, or why, but I
don't see that it provides any advantage.

(Perhaps the one advantage it has inadvertently provided is to
raise the question again of whether `thing-at-point' should
always return a string.)




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21391; Package emacs. Full text available.

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


Received: (at 21391) by debbugs.gnu.org; 7 Nov 2016 15:13:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 07 10:13:54 2016
Received: from localhost ([127.0.0.1]:48531 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1c3lcQ-0003pm-Bc
	for submit <at> debbugs.gnu.org; Mon, 07 Nov 2016 10:13:54 -0500
Received: from eggs.gnu.org ([208.118.235.92]:42894)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1c3lcO-0003pX-K4
 for 21391 <at> debbugs.gnu.org; Mon, 07 Nov 2016 10:13:52 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1c3lcF-0000Ib-N0
 for 21391 <at> debbugs.gnu.org; Mon, 07 Nov 2016 10:13:47 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:37475)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1c3lc9-0000Gr-As; Mon, 07 Nov 2016 10:13:37 -0500
Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1973
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1c3lc8-0007Z8-3H; Mon, 07 Nov 2016 10:13:36 -0500
Date: Mon, 07 Nov 2016 17:14:07 +0200
Message-Id: <83a8dbiaps.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Tino Calancha <tino.calancha@HIDDEN>
In-reply-to: <874m3krnb6.fsf_-_@HIDDEN> (message from Tino Calancha on Mon, 
 07 Nov 2016 12:17:17 +0900)
Subject: Re: bug#21391: 24.5; `thing-at-point' should return a string
References: <alpine.LRH.2.20.1509011056480.5317@HIDDEN>
 <alpine.DEB.2.20.1610131558480.2834@calancha-pc>
 <0a68c2ae-0940-4e2c-8b3c-1faceb45c43c@default>
 <1773ab35-70b1-42f9-8a8b-fe07881487d1@default> <874m3krnb6.fsf_-_@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -7.9 (-------)
X-Debbugs-Envelope-To: 21391
Cc: drew.adams@HIDDEN, 21391 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://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: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -7.9 (-------)

> From: Tino Calancha <tino.calancha@HIDDEN>
> CC: Drew Adams <drew.adams@HIDDEN>, Tino Calancha <tino.calancha@HIDDEN>,Eli Zaretskii <eliz@HIDDEN>
> Date: Mon, 07 Nov 2016 12:17:17 +0900
> 
> Drew Adams <drew.adams@HIDDEN> writes:
> 
> > A proper fix is to convert the result returned by
> > (funcall (get thing 'thing-at-point)) to a string.
> > For that, you can use (format "%s" thing).
> 
> It's natural if `thing-at-point' returns the thing as a string.
> When the user don't want a string then s?he can use the specific
> functions, like `number-at-point' or `list-at-point'.

Isn't that completely backward-incompatible?  If so, I don't think we
can do that.

I don't really see what is "improper" with the other suggestions to
fix this bug, which simply avoid signaling an error if the "thing at
point" happens to be something other than a string?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21391; Package emacs. Full text available.

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


Received: (at 21391) by debbugs.gnu.org; 7 Nov 2016 15:01:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 07 10:01:17 2016
Received: from localhost ([127.0.0.1]:48523 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1c3lQC-0003YZ-UD
	for submit <at> debbugs.gnu.org; Mon, 07 Nov 2016 10:01:17 -0500
Received: from aserp1040.oracle.com ([141.146.126.69]:45910)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>) id 1c3lQA-0003YD-TT
 for 21391 <at> debbugs.gnu.org; Mon, 07 Nov 2016 10:01:15 -0500
Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234])
 by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id
 uA7F18xL003961
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Mon, 7 Nov 2016 15:01:08 GMT
Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75])
 by aserv0022.oracle.com (8.14.4/8.13.8) with ESMTP id uA7F185G021911
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Mon, 7 Nov 2016 15:01:08 GMT
Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7])
 by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id uA7F17av012457;
 Mon, 7 Nov 2016 15:01:07 GMT
MIME-Version: 1.0
Message-ID: <f9aa21c0-654c-4379-9194-024a779c34c1@default>
Date: Mon, 7 Nov 2016 07:01:05 -0800 (PST)
From: Drew Adams <drew.adams@HIDDEN>
To: =?utf-8?B?QW5kcmVhcyBSw7ZobGVy?= <andreas.roehler@HIDDEN>
Subject: RE: bug#21391: 24.5; `thing-at-point' returns error when called with
 arguments 'number t)
References: <alpine.LRH.2.20.1509011056480.5317@HIDDEN>
 <alpine.DEB.2.20.1610131558480.2834@calancha-pc>
 <0a68c2ae-0940-4e2c-8b3c-1faceb45c43c@default>
 <6d4d9469-5698-d522-ac3d-3f540b1c14b3@HIDDEN>
 <295cccf3-bb80-4cde-bcdb-5137333cc1ed@default>
 <bcee2449-44d4-43cf-b892-beb0ba673525@default>
 <a1e88042-6ca2-ae51-2f7a-84f7c44e93b5@HIDDEN>
In-Reply-To: <a1e88042-6ca2-ae51-2f7a-84f7c44e93b5@HIDDEN>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1  (1003210) [OL
 12.0.6753.5000 (x86)]
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Source-IP: aserv0022.oracle.com [141.146.126.234]
X-Spam-Score: -7.8 (-------)
X-Debbugs-Envelope-To: 21391
Cc: Tino Calancha <tino.calancha@HIDDEN>, 21391 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://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: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -7.8 (-------)

> >>> Is there a need to pick symbols from a buffer as symbols?
> >>> Don't know. My use-case is editing and strings are the suitable
> >>> format.
> >> Of course there is.  And not just symbols, but numbers, lists...
> > Sorry for the confusion.  I was thinking of `list-at-point' etc.,
> > and not `thing-at-point', which always returns a string (or it
> > should, at least - see my previous msg).
>=20
> AFAIU the symbol-at-point-as-symbol idea and thing-at-point are two
> different conceptions.
>=20
> BTW can't see a use-case of form-at-point for know - while
> having some in mind ;)

A particular kind of thing at point is defined using function
`form-at-point' or by using the `thing-at-point' symbol property.
`form-at-point' is essentially a building block (helper).

This is different from what `thing-at-point', which returns
text (a string) that names or represents a thing at point of
a particular kind.

Examples of functions defined using `form-at-point' include
`symbol-at-point', which returns a symbol, not a symbol name
(string); `number-at-point', which returns a number, not a
numeral (string); and `list-at-point', which returns a list
(not a string representing a list).

In my library thingatpt+.el I define functions such as
`symbol-name-at-point', which returns a string naming the
symbol at point, and `non-nil-symbol-name-at-point', which
is the same but returns nil instead of the symbol name "nil",
if there is no symbol (including no symbol `nil') at point.
Using `-name-' as part of the function name helps make clear
that such functions return strings, not symbols.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21391; Package emacs. Full text available.

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


Received: (at 21391) by debbugs.gnu.org; 7 Nov 2016 15:00:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 07 10:00:48 2016
Received: from localhost ([127.0.0.1]:48519 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1c3lPk-0003XH-Mb
	for submit <at> debbugs.gnu.org; Mon, 07 Nov 2016 10:00:48 -0500
Received: from userp1040.oracle.com ([156.151.31.81]:39772)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>) id 1c3lPj-0003X4-F6
 for 21391 <at> debbugs.gnu.org; Mon, 07 Nov 2016 10:00:47 -0500
Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233])
 by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id
 uA7F0ddI012146
 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
 Mon, 7 Nov 2016 15:00:39 GMT
Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75])
 by aserv0021.oracle.com (8.13.8/8.13.8) with ESMTP id uA7F0cGQ030530
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
 Mon, 7 Nov 2016 15:00:39 GMT
Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7])
 by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id uA7F0cGU011805;
 Mon, 7 Nov 2016 15:00:38 GMT
MIME-Version: 1.0
Message-ID: <fbed11ed-abf7-4f21-92f9-b9f74c63843c@default>
Date: Mon, 7 Nov 2016 07:00:37 -0800 (PST)
From: Drew Adams <drew.adams@HIDDEN>
To: =?utf-8?B?QW5kcmVhcyBSw7ZobGVy?= <andreas.roehler@HIDDEN>
Subject: RE: bug#21391: 24.5; `thing-at-point' returns error when called with
 arguments 'number t)
References: <alpine.LRH.2.20.1509011056480.5317@HIDDEN>
 <alpine.DEB.2.20.1610131558480.2834@calancha-pc>
 <0a68c2ae-0940-4e2c-8b3c-1faceb45c43c@default>
 <6d4d9469-5698-d522-ac3d-3f540b1c14b3@HIDDEN>
 <295cccf3-bb80-4cde-bcdb-5137333cc1ed@default>
 <bcee2449-44d4-43cf-b892-beb0ba673525@default>
 <a1e88042-6ca2-ae51-2f7a-84f7c44e93b5@HIDDEN>
In-Reply-To: <a1e88042-6ca2-ae51-2f7a-84f7c44e93b5@HIDDEN>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1  (1003210) [OL
 12.0.6753.5000 (x86)]
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Source-IP: aserv0021.oracle.com [141.146.126.233]
X-Spam-Score: -7.8 (-------)
X-Debbugs-Envelope-To: 21391
Cc: Tino Calancha <tino.calancha@HIDDEN>, 21391 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://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: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -7.8 (-------)

> >>> Is there a need to pick symbols from a buffer as symbols?
> >>> Don't know. My use-case is editing and strings are the suitable
> >>> format.
> >> Of course there is.  And not just symbols, but numbers, lists...
> > Sorry for the confusion.  I was thinking of `list-at-point' etc.,
> > and not `thing-at-point', which always returns a string (or it
> > should, at least - see my previous msg).
>=20
> AFAIU the symbol-at-point-as-symbol idea and thing-at-point are two
> different conceptions.
>=20
> BTW can't see a use-case of form-at-point for know - while
> having some in mind ;)

A particular kind of thing at point is defined using function
`form-at-point' or by using the `thing-at-point' symbol property.
`form-at-point' is essentially a building block (helper).

This is different from what `thing-at-point', which returns
text (a string) that names or represents a thing at point of
a particular kind.

Examples of functions defined using `form-at-point' include
`symbol-at-point', which returns a symbol, not a symbol name
(string); `number-at-point', which returns a number, not a
numeral (string); and `list-at-point', which returns a list
(not a string representing a list).

In my library `thingatpt+.el' I define functions such as
`symbol-name-at-point', which returns a string naming the
symbol at point, and `non-nil-symbol-name-at-point', which
is the same but returns nil instead of the symbol name "nil",
if there is no symbol (including no symbol `nil') at point.
Using `-name-' as part of the function name helps make clear
that such functions return strings, not symbols.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21391; Package emacs. Full text available.

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


Received: (at 21391) by debbugs.gnu.org; 7 Nov 2016 09:22:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 07 04:22:17 2016
Received: from localhost ([127.0.0.1]:47506 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1c3g89-0008WM-5E
	for submit <at> debbugs.gnu.org; Mon, 07 Nov 2016 04:22:17 -0500
Received: from mout.kundenserver.de ([212.227.126.131]:56806)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <andreas.roehler@HIDDEN>) id 1c3g87-0008W7-3Q
 for 21391 <at> debbugs.gnu.org; Mon, 07 Nov 2016 04:22:15 -0500
Received: from [192.168.178.35] ([77.12.174.196]) by mrelayeu.kundenserver.de
 (mreue005) with ESMTPSA (Nemesis) id 0LbNoU-1cX0K11pak-00kzTZ;
 Mon, 07 Nov 2016 10:22:03 +0100
Subject: Re: bug#21391: 24.5; `thing-at-point' returns error when called with
 arguments 'number t)
To: Drew Adams <drew.adams@HIDDEN>
References: <alpine.LRH.2.20.1509011056480.5317@HIDDEN>
 <alpine.DEB.2.20.1610131558480.2834@calancha-pc>
 <0a68c2ae-0940-4e2c-8b3c-1faceb45c43c@default>
 <6d4d9469-5698-d522-ac3d-3f540b1c14b3@HIDDEN>
 <295cccf3-bb80-4cde-bcdb-5137333cc1ed@default>
 <bcee2449-44d4-43cf-b892-beb0ba673525@default>
From: =?UTF-8?Q?Andreas_R=c3=b6hler?= <andreas.roehler@HIDDEN>
Message-ID: <a1e88042-6ca2-ae51-2f7a-84f7c44e93b5@HIDDEN>
Date: Mon, 7 Nov 2016 10:30:24 +0100
User-Agent: Mozilla/5.0 (X11; Linux i686; rv:45.0) Gecko/20100101
 Icedove/45.4.0
MIME-Version: 1.0
In-Reply-To: <bcee2449-44d4-43cf-b892-beb0ba673525@default>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K0:u/s42JXNb7Hu8YC+XkiokPDd5Vyqy8uVrHzWR35lxQc7LIDkWi/
 fHvrRUr5BibtIf+lRJMAID24VJzLo8n34Ywd8aboFPRzVAopQQCoCufrrJnJsT0GwK0DKxE
 9iZtWS5CX0UEh0+GsdgkoIjDgf8G/sjSC6nftzFiZheZNabATjd2vvtGVh4ZnAdIpFXlUAH
 e/oH4B2hjS/daGRklBn8A==
X-UI-Out-Filterresults: notjunk:1;V01:K0:SGxr0F2L8dU=:lXS/gzVtBC0YE/ca+ZNevF
 rOHdJnWVb25VMWUoQF8mYLsPQkD8q7agiCXn0kVncnBGtRJTzFhFujMuc6bAvQmxvIcJqcqgx
 YbKt5yAvRcbmN1YdQiDysn49IgWWkxMG+VD1RLyleXOy0o18X2LYLYNty392Ifv/HtraeDiM8
 1HbW1+C4X3xIW/JEFNFQ88QS60EPA3+n2uYh0itbdeh2VLgjplk7VntumxRBbC+JS9MRrujNP
 q7tW279p+WBBllTQzNsRQP3tGo63nanb5HBM6X/KmvFFLs9P8Ri5gsCmu6ia8qPCKgbPA35jB
 UxBh1SLQILDnvXcB6lCg1pIoGzYed7iD5Is1aumio78aKdk0vuE9VlDFEhCG1nCvm193FtP4C
 P82BKXM9EqsF/bPH+or4Q4HUWhHaYoaSp3DCxyDYySX8+7vjCAi21ql79FTFYW9ZtXIJ2zFi7
 KGzwEZ+WpSmaVk1yQNl+eCNW6qVaz4pPM9YRGGD/ENcuX36yl4QukNKigCmrMOG/7l4A92iS+
 D4YCq/rRD7hwFi2gnkevg2sJGGirlHcmGs/s0lr5d7SD2Q7sBpex8Z2HLwJyYHX4HWvXCujTi
 qlayVRwj/2vs26MLeKyzhE6qUJlRU2vj7HDTIjFoZl7fPYUv16Mbjha9ZCjvEl4WzJKIfVajZ
 2FrTXInQ4dISnD7mTP8h4uJguRIdLs/ckYtc76IZAwt1o6YKS7s1lIXz5yR5Rw6xrKISozau+
 AdzhRq5JC+clZbPK
X-Spam-Score: -0.9 (/)
X-Debbugs-Envelope-To: 21391
Cc: Tino Calancha <tino.calancha@HIDDEN>, 21391 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://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: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.9 (/)



On 04.11.2016 21:21, Drew Adams wrote:
>>> Is there a need to pick symbols from a buffer as symbols?
>>> Don't know. My use-case is editing and strings are the suitable
>>> format.
>> Of course there is.  And not just symbols, but numbers, lists...
> Sorry for the confusion.  I was thinking of `list-at-point' etc.,
> and not `thing-at-point', which always returns a string (or it
> should, at least - see my previous msg).

AFAIU the symbol-at-point-as-symbol idea and thing-at-point are two 
different conceptions.

BTW can't see a use-case of form-at-point for know - while having some 
in mind ;)

Thanks,
Andreas




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21391; Package emacs. Full text available.

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


Received: (at 21391) by debbugs.gnu.org; 7 Nov 2016 03:17:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Nov 06 22:17:30 2016
Received: from localhost ([127.0.0.1]:47358 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1c3aR7-0008Jv-UI
	for submit <at> debbugs.gnu.org; Sun, 06 Nov 2016 22:17:30 -0500
Received: from mail-pf0-f170.google.com ([209.85.192.170]:36025)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <tino.calancha@HIDDEN>) id 1c3aR5-0008Jj-K0
 for 21391 <at> debbugs.gnu.org; Sun, 06 Nov 2016 22:17:28 -0500
Received: by mail-pf0-f170.google.com with SMTP id 189so83706112pfz.3
 for <21391 <at> debbugs.gnu.org>; Sun, 06 Nov 2016 19:17:27 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=from:to:subject:references:cc:date:in-reply-to:message-id
 :user-agent:mime-version;
 bh=pKpklgzbEySA/7eE6fDAb8THopO4TjzVJ4ZgnIL21KQ=;
 b=PDSbmmczzZPIX7JHbvSUeZkMPhm8YvLlAJ11F42EvI8B1pf//92UY2kG56VYzZ1RaX
 s37P86z3FC/V+nzo+XPZzqHn/jCGeKefabwGUN6pDq33a7kUYchEQg3UHB5MpkmgCYkx
 ICceIaGOYCUvyj9my3gUwnLnDqJOB3pp9WadwnwEzE5Sj6ftZR8HNZf/dvkUVqpVF4Wi
 TS+RaRdbfZ0RIdYZMOeEBrebQ+MAh/YZVEh1QS04Tw8NBkF4nZXMqVm5e3w8wVsoXGjC
 txB9CMJIcemLmpDAIbwLXvs+vHl5HS1ZkYUAsDKUACH4q5t3n0UqHx5fRmp6zmzeUckA
 W8LA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:from:to:subject:references:cc:date:in-reply-to
 :message-id:user-agent:mime-version;
 bh=pKpklgzbEySA/7eE6fDAb8THopO4TjzVJ4ZgnIL21KQ=;
 b=XsAfK/h8HZl7xDjnYkxBMiGyJmccB6kYI3rqS1uuu1khBzcolKj0x9nVrExLTojrBY
 2FCT/dHcmKt/6Bde87sxU4hV/ggyGCM45vzqhfOYBY8xWBwhAtnU2jPKfwizteXL2L4G
 YhXLpoRRLamkjv0UWqLmtjqAKJ5Bu51DXwoiBtoKX6hfKqg/+zWoeTMkhVc8O5qW9v8L
 N9KPwoSxl1TrEOwPUjEUjfEdiuKKoNz0TrI44wW+j7FMvu2rqDIXczRLFI7JnNEQsV+H
 2yF8JKMGG2bHvUHgENAt0hVPfE+gpo+4db2S8SHousTZ2qZ2tGsotmufwh7imUQ6I1wN
 BU0Q==
X-Gm-Message-State: ABUngvcSV1QFJik/91oKZK/Bo7mqdpeKbTenwdf3WEbPKm75tUVC+B7SoKmMzOsjfuBRzA==
X-Received: by 10.99.135.200 with SMTP id i191mr7595608pge.18.1478488641824;
 Sun, 06 Nov 2016 19:17:21 -0800 (PST)
Received: from calancha-pc ([240f:6e:c00e:1:6875:2e94:598b:96cb])
 by smtp.gmail.com with ESMTPSA id y2sm20351665pay.10.2016.11.06.19.17.19
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Sun, 06 Nov 2016 19:17:21 -0800 (PST)
From: Tino Calancha <tino.calancha@HIDDEN>
To: 21391 <at> debbugs.gnu.org
Subject: Re: bug#21391: 24.5; `thing-at-point' should return a string
References: <alpine.LRH.2.20.1509011056480.5317@HIDDEN>
 <alpine.DEB.2.20.1610131558480.2834@calancha-pc>
 <0a68c2ae-0940-4e2c-8b3c-1faceb45c43c@default>
 <1773ab35-70b1-42f9-8a8b-fe07881487d1@default>
Date: Mon, 07 Nov 2016 12:17:17 +0900
In-Reply-To: <1773ab35-70b1-42f9-8a8b-fe07881487d1@default> (Drew Adams's
 message of "Fri, 4 Nov 2016 13:03:40 -0700 (PDT)")
Message-ID: <874m3krnb6.fsf_-_@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -1.6 (-)
X-Debbugs-Envelope-To: 21391
Cc: Eli Zaretskii <eliz@HIDDEN>, Drew Adams <drew.adams@HIDDEN>,
 Tino Calancha <tino.calancha@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://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: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.6 (-)

Drew Adams <drew.adams@HIDDEN> writes:

> `thing-at-point' should always return a string.
> `list-at-point', `form-at-point', etc. are a different
> story - they can return anything.
>
> The problem with the code of `thing-at-point' is not where
> it has been identified so far.  The problem is that if
> THING has property `thing-at-point', and if that function
> returns something that is not a string, then
> `set-text-properties' raises an error.
>
> A proper fix is to convert the result returned by
> (funcall (get thing 'thing-at-point)) to a string.
> For that, you can use (format "%s" thing).

It's natural if `thing-at-point' returns the thing as a string.
When the user don't want a string then s?he can use the specific
functions, like `number-at-point' or `list-at-point'.

Indeed, that is what is specified in the manual:
* doc/lispref/text.texi (Examining Buffer Contents)

Following patch pass all the Emacs tests:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
From ce1ced756c2762b4b0448a0480173e757804f784 Mon Sep 17 00:00:00 2001
From: Tino Calancha <tino.calancha@HIDDEN>
Date: Mon, 7 Nov 2016 12:05:28 +0900
Subject: [PATCH] * lisp/thingatpt.el (thing-at-point): Return the thing as a
 string

---
 lisp/thingatpt.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lisp/thingatpt.el b/lisp/thingatpt.el
index e423630..fd6b323 100644
--- a/lisp/thingatpt.el
+++ b/lisp/thingatpt.el
@@ -128,7 +128,7 @@ bounds-of-thing-at-point
 
 ;;;###autoload
 (defun thing-at-point (thing &optional no-properties)
-  "Return the THING at point.
+  "Return the THING at point as a string.
 THING should be a symbol specifying a type of syntactic entity.
 Possibilities include `symbol', `list', `sexp', `defun',
 `filename', `url', `email', `word', `sentence', `whitespace',
@@ -145,7 +145,9 @@ thing-at-point
            (let ((bounds (bounds-of-thing-at-point thing)))
              (when bounds
                (buffer-substring (car bounds) (cdr bounds)))))))
-    (when (and text no-properties (sequencep text))
+    (when (and text (not (stringp text)))
+      (setq text (format "%s" text)))
+    (when (and text no-properties)
       (set-text-properties 0 (length text) nil text))
     text))
 
-- 
2.10.1

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
In GNU Emacs 26.0.50.6 (x86_64-pc-linux-gnu, GTK+ Version 3.22.2)
 of 2016-11-06
Repository revision: f1d19d1445a8e7d4ee0d13edb8ed99e222603086




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21391; Package emacs. Full text available.
Did not alter fixed versions and reopened. Request was from Debbugs Internal Request <help-debbugs@HIDDEN> to internal_control <at> debbugs.gnu.org. Full text available.

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


Received: (at 21391) by debbugs.gnu.org; 4 Nov 2016 20:22:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Nov 04 16:22:05 2016
Received: from localhost ([127.0.0.1]:45104 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1c2l01-00064C-I3
	for submit <at> debbugs.gnu.org; Fri, 04 Nov 2016 16:22:05 -0400
Received: from userp1040.oracle.com ([156.151.31.81]:36403)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>) id 1c2l00-00063j-DA
 for 21391 <at> debbugs.gnu.org; Fri, 04 Nov 2016 16:22:04 -0400
Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233])
 by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id
 uA4KLtWx002041
 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
 Fri, 4 Nov 2016 20:21:57 GMT
Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235])
 by aserv0021.oracle.com (8.13.8/8.13.8) with ESMTP id uA4KLs7E032274
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
 Fri, 4 Nov 2016 20:21:55 GMT
Received: from abhmp0019.oracle.com (abhmp0019.oracle.com [141.146.116.25])
 by aserv0121.oracle.com (8.13.8/8.13.8) with ESMTP id uA4KLrO4012417;
 Fri, 4 Nov 2016 20:21:53 GMT
MIME-Version: 1.0
Message-ID: <bcee2449-44d4-43cf-b892-beb0ba673525@default>
Date: Fri, 4 Nov 2016 13:21:51 -0700 (PDT)
From: Drew Adams <drew.adams@HIDDEN>
To: =?utf-8?B?QW5kcmVhcyBSw7ZobGVy?= <andreas.roehler@HIDDEN>,
 21391 <at> debbugs.gnu.org
Subject: RE: bug#21391: 24.5; `thing-at-point' returns error when called with
 arguments 'number t)
References: <alpine.LRH.2.20.1509011056480.5317@HIDDEN>
 <alpine.DEB.2.20.1610131558480.2834@calancha-pc>
 <0a68c2ae-0940-4e2c-8b3c-1faceb45c43c@default>
 <6d4d9469-5698-d522-ac3d-3f540b1c14b3@HIDDEN>
 <295cccf3-bb80-4cde-bcdb-5137333cc1ed@default>
In-Reply-To: <295cccf3-bb80-4cde-bcdb-5137333cc1ed@default>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1  (1003210) [OL
 12.0.6753.5000 (x86)]
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Source-IP: aserv0021.oracle.com [141.146.126.233]
X-Spam-Score: -4.1 (----)
X-Debbugs-Envelope-To: 21391
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://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: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.1 (----)

> > Is there a need to pick symbols from a buffer as symbols?
> > Don't know. My use-case is editing and strings are the suitable
> > format.
>=20
> Of course there is.  And not just symbols, but numbers, lists...

Sorry for the confusion.  I was thinking of `list-at-point' etc.,
and not `thing-at-point', which always returns a string (or it
should, at least - see my previous msg).




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21391; Package emacs. Full text available.

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


Received: (at 21391) by debbugs.gnu.org; 4 Nov 2016 20:03:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Nov 04 16:03:52 2016
Received: from localhost ([127.0.0.1]:45090 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1c2kiO-0005ds-G5
	for submit <at> debbugs.gnu.org; Fri, 04 Nov 2016 16:03:52 -0400
Received: from aserp1040.oracle.com ([141.146.126.69]:34492)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>) id 1c2kiN-0005de-6p
 for 21391 <at> debbugs.gnu.org; Fri, 04 Nov 2016 16:03:51 -0400
Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71])
 by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id
 uA4K3iJU003138
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Fri, 4 Nov 2016 20:03:44 GMT
Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235])
 by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id uA4K3h5Z010697
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
 Fri, 4 Nov 2016 20:03:44 GMT
Received: from abhmp0019.oracle.com (abhmp0019.oracle.com [141.146.116.25])
 by aserv0121.oracle.com (8.13.8/8.13.8) with ESMTP id uA4K3fcN004782;
 Fri, 4 Nov 2016 20:03:42 GMT
MIME-Version: 1.0
Message-ID: <1773ab35-70b1-42f9-8a8b-fe07881487d1@default>
Date: Fri, 4 Nov 2016 13:03:40 -0700 (PDT)
From: Drew Adams <drew.adams@HIDDEN>
To: Tino Calancha <tino.calancha@HIDDEN>, 21391 <at> debbugs.gnu.org
Subject: RE: bug#21391: 24.5; `thing-at-point' returns error when called with
 arguments 'number t)
References: <alpine.LRH.2.20.1509011056480.5317@HIDDEN>
 <alpine.DEB.2.20.1610131558480.2834@calancha-pc>
 <0a68c2ae-0940-4e2c-8b3c-1faceb45c43c@default>
In-Reply-To: <0a68c2ae-0940-4e2c-8b3c-1faceb45c43c@default>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1  (1003210) [OL
 12.0.6753.5000 (x86)]
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Source-IP: userv0021.oracle.com [156.151.31.71]
X-Spam-Score: -4.6 (----)
X-Debbugs-Envelope-To: 21391
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://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: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.6 (----)

Sorry, but I confused things further, I'm afraid.

`thing-at-point' should always return a string.
`list-at-point', `form-at-point', etc. are a different
story - they can return anything.

The problem with the code of `thing-at-point' is not where
it has been identified so far.  The problem is that if
THING has property `thing-at-point', and if that function
returns something that is not a string, then
`set-text-properties' raises an error.

A proper fix is to convert the result returned by
(funcall (get thing 'thing-at-point)) to a string.
For that, you can use (format "%s" thing).

FWIW, this is the code that I use (prefix `tap-' is for
the package).  Note that the doc string's first line says
that what is returned is a string.

(defun tap-thing-at-point (thing &optional no-properties syntax-table)
  "Return the THING at point as a string.
If no THING is present at point then return nil.

THING is an Emacs Lisp symbol that specifies a type of syntactic
entity.  THING examples include `symbol', `list', `sexp', `defun',
`filename', `url', `email', `word', `sentence', `whitespace', `line',
`number', and `page'.  See the commentary of library `thingatpt.el'
for how to define a symbol as a valid THING.

If THING has property `thing-at-point' then the property value should
be a function.  The function is called with no arguments.  If the
return value of that function is a string or nil then that value is
returned by this function also.  Otherwise, that value is converted to
a string and returned.

Optional arg NO-PROPERTIES means that if a string is to be returned
then it is first stripped of any text properties.

Optional arg SYNTAX-TABLE is a syntax table to use."
  (let* ((thing-fn  (or (get thing 'tap-thing-at-point) =20
                        (get thing 'thing-at-point)))
         (text
          (if thing-fn
              (let* ((opoint  (point))
                     (thg     (prog1 (funcall thing-fn)
                                (constrain-to-field nil opoint))))
                (if (stringp thg)
                    thg
                  (and thg  (format "%s" thg))))
            (let ((bounds  (tap-bounds-of-thing-at-point
                             thing syntax-table)))
              (and bounds  (buffer-substring (car bounds)
                                             (cdr bounds)))))))
    (when (and text  no-properties)
      (set-text-properties 0 (length text) nil text))
    text))





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21391; Package emacs. Full text available.

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


Received: (at 21391) by debbugs.gnu.org; 4 Nov 2016 19:27:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Nov 04 15:27:34 2016
Received: from localhost ([127.0.0.1]:45061 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1c2k9G-0004kx-7Q
	for submit <at> debbugs.gnu.org; Fri, 04 Nov 2016 15:27:34 -0400
Received: from userp1040.oracle.com ([156.151.31.81]:44070)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>) id 1c2k9E-0004kg-Im
 for 21391 <at> debbugs.gnu.org; Fri, 04 Nov 2016 15:27:32 -0400
Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74])
 by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id
 uA4JRPLs003028
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Fri, 4 Nov 2016 19:27:25 GMT
Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236])
 by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id uA4JROGb005154
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Fri, 4 Nov 2016 19:27:25 GMT
Received: from abhmp0019.oracle.com (abhmp0019.oracle.com [141.146.116.25])
 by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id uA4JRONG016293;
 Fri, 4 Nov 2016 19:27:24 GMT
MIME-Version: 1.0
Message-ID: <295cccf3-bb80-4cde-bcdb-5137333cc1ed@default>
Date: Fri, 4 Nov 2016 12:27:23 -0700 (PDT)
From: Drew Adams <drew.adams@HIDDEN>
To: =?utf-8?B?QW5kcmVhcyBSw7ZobGVy?= <andreas.roehler@HIDDEN>,
 21391 <at> debbugs.gnu.org
Subject: RE: bug#21391: 24.5; `thing-at-point' returns error when called with
 arguments 'number t)
References: <alpine.LRH.2.20.1509011056480.5317@HIDDEN>
 <alpine.DEB.2.20.1610131558480.2834@calancha-pc>
 <0a68c2ae-0940-4e2c-8b3c-1faceb45c43c@default>
 <6d4d9469-5698-d522-ac3d-3f540b1c14b3@HIDDEN>
In-Reply-To: <6d4d9469-5698-d522-ac3d-3f540b1c14b3@HIDDEN>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1  (1003210) [OL
 12.0.6753.5000 (x86)]
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Source-IP: userv0022.oracle.com [156.151.31.74]
X-Spam-Score: -4.1 (----)
X-Debbugs-Envelope-To: 21391
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://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: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.1 (----)

> > Tino is right.  The mistake behind the handling of optional arg
> > NO-PROPERTIES (which was added in Emacs 24.4) is to assume that
> > `thing-at-point' returns a string.  This is a common
> > misconception.  It can return anything that Emacs Lisp can
> > return.
>=20
> Is there a need to pick symbols from a buffer as symbols?
> Don't know. My use-case is editing and strings are the suitable
> format.

Of course there is.  And not just symbols, but numbers, lists...

People too often misunderstand thing-at-point as being only
something to grab text at point to serve as a default value
for reading input.  There are any number of reasons to determine
whether there is a thing of a given type at point, and to
retrieve it if so.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21391; Package emacs. Full text available.

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


Received: (at submit) by debbugs.gnu.org; 4 Nov 2016 18:23:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Nov 04 14:23:33 2016
Received: from localhost ([127.0.0.1]:44989 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1c2j9J-00039a-Kv
	for submit <at> debbugs.gnu.org; Fri, 04 Nov 2016 14:23:33 -0400
Received: from eggs.gnu.org ([208.118.235.92]:60809)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <andreas.roehler@HIDDEN>) id 1c2j9I-00039O-EJ
 for submit <at> debbugs.gnu.org; Fri, 04 Nov 2016 14:23:32 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <andreas.roehler@HIDDEN>) id 1c2j9C-00035b-Je
 for submit <at> debbugs.gnu.org; Fri, 04 Nov 2016 14:23:27 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: *
X-Spam-Status: No, score=1.3 required=5.0 tests=BAYES_50,RCVD_IN_SORBS_SPAM
 autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:49512)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <andreas.roehler@HIDDEN>)
 id 1c2j9C-00035P-GU
 for submit <at> debbugs.gnu.org; Fri, 04 Nov 2016 14:23:26 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:51779)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <andreas.roehler@HIDDEN>) id 1c2j9B-0005fq-JP
 for bug-gnu-emacs@HIDDEN; Fri, 04 Nov 2016 14:23:26 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <andreas.roehler@HIDDEN>) id 1c2j97-0002zl-H9
 for bug-gnu-emacs@HIDDEN; Fri, 04 Nov 2016 14:23:25 -0400
Received: from mout.kundenserver.de ([212.227.17.24]:51058)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <andreas.roehler@HIDDEN>)
 id 1c2j97-0002yW-7P
 for bug-gnu-emacs@HIDDEN; Fri, 04 Nov 2016 14:23:21 -0400
Received: from [192.168.178.35] ([77.12.33.84]) by mrelayeu.kundenserver.de
 (mreue102) with ESMTPSA (Nemesis) id 0MSao8-1cRznv1O4K-00RZJj for
 <bug-gnu-emacs@HIDDEN>; Fri, 04 Nov 2016 19:23:19 +0100
Subject: Re: bug#21391: 24.5; `thing-at-point' returns error when called with
 arguments 'number t)
To: bug-gnu-emacs@HIDDEN
References: <alpine.LRH.2.20.1509011056480.5317@HIDDEN>
 <alpine.DEB.2.20.1610131558480.2834@calancha-pc>
 <0a68c2ae-0940-4e2c-8b3c-1faceb45c43c@default>
From: =?UTF-8?Q?Andreas_R=c3=b6hler?= <andreas.roehler@HIDDEN>
Message-ID: <6d4d9469-5698-d522-ac3d-3f540b1c14b3@HIDDEN>
Date: Fri, 4 Nov 2016 19:31:36 +0100
User-Agent: Mozilla/5.0 (X11; Linux i686; rv:45.0) Gecko/20100101
 Icedove/45.4.0
MIME-Version: 1.0
In-Reply-To: <0a68c2ae-0940-4e2c-8b3c-1faceb45c43c@default>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K0:FBmqlc39u86NCgsTvzKH+OnwLic6AcRd8zXGDYxO/Slr+SI0ang
 2kajwKG9PNqKb6gnX24w+FhZFhR0dicGHrdNxo5uuqGqWt3R5K+JW99h9mxIcUw0xAlwAb0
 /PtWhuGo2iPWXRvMqYlg6jv8Wmw7O0RmIn5VMmBClstKUjs9x0VfI+amsKIAxH9Ew1lQEfx
 KEOaeLJewl9z96bPJ/NSg==
X-UI-Out-Filterresults: notjunk:1;V01:K0:3MP8oWMu6vM=:JafBWvoIo6MCHF5ko0LvyO
 ZELG7zatRKEOg6CLJ1E64Y+dOcyOHevaypDXMfGFeMWXbxmiX/8KKtRlnqG7Nwk9EdbK1SWZK
 dzTujYjDmTpNmKUGwuz5m61jj85TLU2tlLvSGo5gAyFydCMkYdqBl6LR7fFLAbrfz94LuOE0b
 d0+dndZN/iBZ3PXFQxn/Tk8DcAtjuldhVLBx1pDGC8TgPLw14f08tJiu44X2vXhFFXqBvqUVj
 NbigKze+bU2Qjk1ef0L5cj2CY3KYoNhP8fjwHc+B8UFjk3H7e8kub37zzmxu0FUW6j4JnIcIE
 dVfBMbiglD9pcFb6aGSC9ofXWxWPN2C4N1DF3RfiDfNT7YL/RLYC2bEKBcEvvvXIKyuoMXgBA
 XyA24P9s7viJvURVTLX2bLUwCayhuY7VtEn/4nd36O/Ppz9CuLw67wlHTSzHicy1XFzV3uh3l
 qhhD7CQ22KdBYxDK6ntskKLXL6JXHKm5eDCw8upxBitqz55XWmYX38EYuasbCgSMdDsr9sdgy
 e1OHqGVIq0ZdgtQriyeN+rsib9t7qWS8Ij7tZwwm0tIdtW4qJzLQG4ssGYWp9aEnn9phpGDvh
 T9fFqzwZ+yphr+FRjc71/Qh3CpwInLyDm35zuadB54tK/+jyzXtU8jhQFRbd9D+oqOGe0zfmd
 dFHhTG0YBmfpmD4tPVg7Tw3t6VinbZKrVUbB89IlkOJKoXWRL6j25hZd040906sGmukaIHZCF
 f0SwlnTh2ieUWGlD
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.5 (----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://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: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.5 (----)



On 04.11.2016 17:31, Drew Adams wrote:
> Tino is right.  The mistake behind the handling of optional arg
> NO-PROPERTIES (which was added in Emacs 24.4) is to assume that
> `thing-at-point' returns a string.  This is a common misconception.
> It can return anything that Emacs Lisp can return.

Is there a need to pick symbols from a buffer as symbols?
Don't know. My use-case is editing and strings are the suitable format.





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21391; Package emacs. Full text available.

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


Received: (at 21391) by debbugs.gnu.org; 4 Nov 2016 16:31:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Nov 04 12:31:49 2016
Received: from localhost ([127.0.0.1]:44806 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1c2hPB-0000Vo-A6
	for submit <at> debbugs.gnu.org; Fri, 04 Nov 2016 12:31:49 -0400
Received: from aserp1040.oracle.com ([141.146.126.69]:19455)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>) id 1c2hP9-0000Vb-Cf
 for 21391 <at> debbugs.gnu.org; Fri, 04 Nov 2016 12:31:47 -0400
Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71])
 by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id
 uA4GVfH2023627
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Fri, 4 Nov 2016 16:31:41 GMT
Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72])
 by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id uA4GVd40015316
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Fri, 4 Nov 2016 16:31:41 GMT
Received: from abhmp0019.oracle.com (abhmp0019.oracle.com [141.146.116.25])
 by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id uA4GVdRJ008516;
 Fri, 4 Nov 2016 16:31:39 GMT
MIME-Version: 1.0
Message-ID: <0a68c2ae-0940-4e2c-8b3c-1faceb45c43c@default>
Date: Fri, 4 Nov 2016 09:31:38 -0700 (PDT)
From: Drew Adams <drew.adams@HIDDEN>
To: Tino Calancha <tino.calancha@HIDDEN>, 21391 <at> debbugs.gnu.org
Subject: RE: bug#21391: 24.5; `thing-at-point' returns error when called with
 arguments 'number t)
References: <alpine.LRH.2.20.1509011056480.5317@HIDDEN>
 <alpine.DEB.2.20.1610131558480.2834@calancha-pc>
In-Reply-To: <alpine.DEB.2.20.1610131558480.2834@calancha-pc>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1  (1003210) [OL
 12.0.6753.5000 (x86)]
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Source-IP: userv0021.oracle.com [156.151.31.71]
X-Spam-Score: -4.6 (----)
X-Debbugs-Envelope-To: 21391
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://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: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.6 (----)

Tino is right.  The mistake behind the handling of optional arg
NO-PROPERTIES (which was added in Emacs 24.4) is to assume that
`thing-at-point' returns a string.  This is a common misconception.
It can return anything that Emacs Lisp can return.

emacs -Q
M-x load-library thingatpt
M-: (put 'list 'thing-at-point (lambda () '(1 2 3 4)))

In *scratch*:

C-x h
C-w
M-: (insert "(foo)")
M-x goto-char 2
M-: (thing-at-point 'list) ; =3D> (1 2 3 4)
M-: (thing-at-point 'list t) ; =3D> error raised

The proper test is not `sequencep', but either `stringp' or
(or (stringp text) (buffer-live-p text)).  This is obvious
from just the signature of `set-text-properties'.

And "text" should be renamed accordingly - it is a THING,
not necessarily text.

[And I disagree that the doc string should say that THING
specifies a type of "syntactic" entity.  It should say that
THING specifies a type of thing that can be manipulated by
Emacs Lisp.  You could say a type of Lisp object, but it
could be, say, a file (not just a file name).]




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21391; Package emacs. Full text available.

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


Received: (at 21391) by debbugs.gnu.org; 13 Oct 2016 07:00:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Oct 13 03:00:12 2016
Received: from localhost ([127.0.0.1]:53680 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1buZzv-0008HX-S7
	for submit <at> debbugs.gnu.org; Thu, 13 Oct 2016 03:00:12 -0400
Received: from mail-pa0-f68.google.com ([209.85.220.68]:36448)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <tino.calancha@HIDDEN>) id 1buZzt-000895-Qn
 for 21391 <at> debbugs.gnu.org; Thu, 13 Oct 2016 03:00:10 -0400
Received: by mail-pa0-f68.google.com with SMTP id os4so298497pac.3
 for <21391 <at> debbugs.gnu.org>; Thu, 13 Oct 2016 00:00:09 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=from:date:to:cc:subject:message-id:user-agent:mime-version;
 bh=u0Ky/eDk1+SdI+TAwiwT1ZFIeyHNECMivuhCyQbzhpM=;
 b=xNV5O6U+OjiBwm47xEyMK30XFKsnofxzqMexlkg7bLDdNOP35V7cdF9QTgbft9Ji5R
 JLm+RQdDmD8V3vDyN4pKRSRmBrMdp9du/emH80Y1CFA3L56uBccg1qPD/D5yLHdhI3kX
 LOoMMaucmcv0LC3rYYy/kdB8ZGhVx8obcMhiSYV2NU0GujgRRQLDrG2OpRW2mSxAEhNF
 FuELkGVHiMUPUVZngEHve5aHyB/S5WKFVxvsazYk5bTPYQMieDEp//43YtQMa2r2g8WD
 +gon8JRBmgcyMan+INJr2OaVDHXzD1N7xUcq/Yxok7CJKMSOUZZD7t757qc/jU7RWW+e
 KMbQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:from:date:to:cc:subject:message-id:user-agent
 :mime-version;
 bh=u0Ky/eDk1+SdI+TAwiwT1ZFIeyHNECMivuhCyQbzhpM=;
 b=PRitFGzPZNCU1kWchKbV8H469VN+6v+OdIyde3wP/Sq+I9LcWqZUfrWUyPa72U9fyh
 PBhQ5z7w0Q2oWyY5o8ax4NwkfvuwN1IDfOBgT/YaART09yvuti90fVXJNUJ5wTqKJrEb
 INAwIi2wv63+Y6ZCUZ1phj6T7Al6auYDmmy7uw0AaV8+lkSkv01UfjKYQNwUH4kp8BLH
 v3+IaCcEjhi3qv8LBdtt1vrfoKT1ToPwreL3JmRV8fO3cliDEqKSMsDRKgt9FQQsFU80
 AgVYk+LOlPfA6rTTeyyTtlEt4DRRuhqhZVmJzX3m4afaFXAcqTWIsUjw3UAoVlH2tOA/
 K3cw==
X-Gm-Message-State: AA6/9Rm9F6yC3YZtAK86dWijtfUvR4GXl+rishHnjQRkx5HfOr8uclM3tGKsYs2g4M/OOg==
X-Received: by 10.66.152.200 with SMTP id va8mr6621310pab.12.1476342004278;
 Thu, 13 Oct 2016 00:00:04 -0700 (PDT)
Received: from calancha-pc (57.92.100.220.dy.bbexcite.jp. [220.100.92.57])
 by smtp.gmail.com with ESMTPSA id l2sm16726275pav.7.2016.10.13.00.00.02
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Thu, 13 Oct 2016 00:00:03 -0700 (PDT)
From: Tino Calancha <tino.calancha@HIDDEN>
X-Google-Original-From: Tino Calancha <calancha@HIDDEN>
Date: Thu, 13 Oct 2016 16:00:01 +0900 (JST)
X-X-Sender: calancha@calancha-pc
To: 21391 <at> debbugs.gnu.org
Subject: Re: bug#21391: 24.5; `thing-at-point' returns error when called with
 arguments 'number t)
Message-ID: <alpine.DEB.2.20.1610131558480.2834@calancha-pc>
User-Agent: Alpine 2.20 (DEB 67 2015-01-07)
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset=US-ASCII
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 21391
Cc: Tino Calancha <tino.calancha@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://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: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.5 (/)


Using `sequencep' looks too general here: `set-text-properties'
justs accepts as arg OBJECT an string or a buffer.  The case
of interest for this function seems when text satisfy `stringp'.
We might want to do in the future (or some 3rd party code)
something like:
(put 'list 'thing-at-point 'list-at-point)

In that case, 'text' would satisfy `listp', so it would
satisfy `sequencep' as well:  we would then call
`set-text-properties' with arg OBJECT being a list, which signals
an error.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
From 346ce0fcf3665ebfb24303763e2372551b33a1ae Mon Sep 17 00:00:00 2001
From: Tino Calancha <tino.calancha@HIDDEN>
Date: Thu, 13 Oct 2016 15:45:02 +0900
Subject: [PATCH] thing-at-point: Delete text properties only if text is a
  string

* lisp/thingatpt.el (thing-at-point): Delete text properties
only when text is an string (Bug#21391).
---
  lisp/thingatpt.el | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/thingatpt.el b/lisp/thingatpt.el
index 6d1014b..2fd51e6 100644
--- a/lisp/thingatpt.el
+++ b/lisp/thingatpt.el
@@ -145,7 +145,7 @@ thing-at-point
             (let ((bounds (bounds-of-thing-at-point thing)))
               (when bounds
                 (buffer-substring (car bounds) (cdr bounds)))))))
-    (when (and text no-properties (sequencep text))
+    (when (and text no-properties (stringp text))
        (set-text-properties 0 (length text) nil text))
      text))

-- 
2.9.3

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

In GNU Emacs 26.0.50.16 (x86_64-pc-linux-gnu, GTK+ Version 3.22.1)
  of 2016-10-13 built on calancha-pc
Repository revision: 1dd54e3eef7543720eff161457677a35fae2435c





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#21391; Package emacs. Full text available.
bug unarchived. Request was from Tino Calancha <tino.calancha@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
bug archived. Request was from Debbugs Internal Request <help-debbugs@HIDDEN> to internal_control <at> debbugs.gnu.org. Full text available.

Message received at 21391-done <at> debbugs.gnu.org:


Received: (at 21391-done) by debbugs.gnu.org; 5 Sep 2015 08:23:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Sep 05 04:23:34 2015
Received: from localhost ([127.0.0.1]:49351 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ZY8l3-0005Uw-TD
	for submit <at> debbugs.gnu.org; Sat, 05 Sep 2015 04:23:34 -0400
Received: from mtaout22.012.net.il ([80.179.55.172]:38462)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <eliz@HIDDEN>) id 1ZY8l0-0005Un-Kf
 for 21391-done <at> debbugs.gnu.org; Sat, 05 Sep 2015 04:23:32 -0400
Received: from conversion-daemon.a-mtaout22.012.net.il by
 a-mtaout22.012.net.il (HyperSendmail v2007.08) id
 <0NU700J0038PJ400@HIDDEN> for 21391-done <at> debbugs.gnu.org;
 Sat, 05 Sep 2015 11:23:29 +0300 (IDT)
Received: from HOME-C4E4A596F7 ([84.94.185.246]) by a-mtaout22.012.net.il
 (HyperSendmail v2007.08) with ESMTPA id
 <0NU700JBG3B4HE20@HIDDEN>;
 Sat, 05 Sep 2015 11:23:29 +0300 (IDT)
Date: Sat, 05 Sep 2015 11:23:35 +0300
From: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#21391: 24.5;
 `thing-at-point' returns error when called with arguments 'number t
In-reply-to: <alpine.LRH.2.20.1509011056480.5317@HIDDEN>
X-012-Sender: halo1@HIDDEN
To: Tino Calancha <f92capac@HIDDEN>
Message-id: <837fo58ebc.fsf@HIDDEN>
References: <alpine.LRH.2.20.1509011056480.5317@HIDDEN>
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 21391-done
Cc: 21391-done <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
Reply-To: Eli Zaretskii <eliz@HIDDEN>
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://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: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.0 (+)

> Date: Tue, 1 Sep 2015 10:59:30 +0900 (JST)
> From: Tino Calancha <f92capac@HIDDEN>
> Cc: "C. Calancha" <f92capac@HIDDEN>
> 
> (thing-at-point 'number t)    fails
> (thing-at-point 'number nil)  OK
> 
> The former case call `length' with a non sequence argument.

Thanks, fixed.




Notification sent to Tino Calancha <f92capac@HIDDEN>:
bug acknowledged by developer. Full text available.
Reply sent to Eli Zaretskii <eliz@HIDDEN>:
You have taken responsibility. Full text available.

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


Received: (at submit) by debbugs.gnu.org; 1 Sep 2015 01:56:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Aug 31 21:56:34 2015
Received: from localhost ([127.0.0.1]:44507 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ZWaoL-00016z-In
	for submit <at> debbugs.gnu.org; Mon, 31 Aug 2015 21:56:33 -0400
Received: from eggs.gnu.org ([208.118.235.92]:34027)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <f92capac@HIDDEN>) id 1ZWaoJ-00016r-Fs
 for submit <at> debbugs.gnu.org; Mon, 31 Aug 2015 21:56:32 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <f92capac@HIDDEN>) id 1ZWaoH-0006eI-VR
 for submit <at> debbugs.gnu.org; Mon, 31 Aug 2015 21:56:30 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM
 autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:50936)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <f92capac@HIDDEN>) id 1ZWaoH-0006eE-SM
 for submit <at> debbugs.gnu.org; Mon, 31 Aug 2015 21:56:29 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:44033)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <f92capac@HIDDEN>) id 1ZWaoG-0007m1-O2
 for bug-gnu-emacs@HIDDEN; Mon, 31 Aug 2015 21:56:29 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <f92capac@HIDDEN>) id 1ZWaoD-0006d3-IJ
 for bug-gnu-emacs@HIDDEN; Mon, 31 Aug 2015 21:56:28 -0400
Received: from calancha-ilc.kek.jp ([130.87.234.234]:33126)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <f92capac@HIDDEN>) id 1ZWaoC-0006c8-Vs
 for bug-gnu-emacs@HIDDEN; Mon, 31 Aug 2015 21:56:25 -0400
Received: by calancha-ilc.kek.jp (Postfix, from userid 500)
 id 2D844B37A; Tue,  1 Sep 2015 10:59:30 +0900 (JST)
Received: from localhost (localhost [127.0.0.1])
 by calancha-ilc.kek.jp (Postfix) with ESMTP id 132A4B377;
 Tue,  1 Sep 2015 10:59:30 +0900 (JST)
Date: Tue, 1 Sep 2015 10:59:30 +0900 (JST)
From: Tino Calancha <f92capac@HIDDEN>
X-X-Sender: calancha@HIDDEN
To: bug-gnu-emacs@HIDDEN
Subject: 24.5; `thing-at-point' returns error when called with arguments
 'number t
Message-ID: <alpine.LRH.2.20.1509011056480.5317@HIDDEN>
User-Agent: Alpine 2.20 (LRH 67 2015-01-07)
MIME-Version: 1.0
Content-Type: multipart/mixed;
 BOUNDARY="1468197610-1549670963-1441072770=:5317"
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-Debbugs-Envelope-To: submit
Cc: "C. Calancha" <f92capac@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://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: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.0 (----)

--1468197610-1549670963-1441072770=:5317
Content-Type: text/plain; format=flowed; charset=US-ASCII


(thing-at-point 'number t)    fails
(thing-at-point 'number nil)  OK

The former case call `length' with a non sequence argument.


In GNU Emacs 24.5.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.23)
  of 2015-08-30 on calancha-ilc.kek.jp
System Description:	Scientific Linux release 6.7 (Carbon)

Configured using:
  `configure --with-gif=no'

Important settings:
   value of $LANG: en_US.utf8
   value of $XMODIFIERS: @im=none
   locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
   tooltip-mode: t
   electric-indent-mode: t
   mouse-wheel-mode: t
   tool-bar-mode: t
   menu-bar-mode: t
   file-name-shadow-mode: t
   global-font-lock-mode: t
   font-lock-mode: t
   auto-composition-mode: t
   auto-encryption-mode: t
   auto-compression-mode: t
   line-number-mode: t
   transient-mark-mode: t

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util help-fns mail-prsvr mail-utils xterm time-date tooltip electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar
dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode
prog-mode register page menu-bar rfn-eshadow timer select scroll-bar
mouse jit-lock font-lock syntax facemenu font-core frame cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev
minibuffer nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
dbusbind gfilenotify dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)

Memory information:
((conses 16 75908 4118)
  (symbols 48 17587 0)
  (miscs 40 31 88)
  (strings 32 9018 4405)
  (string-bytes 1 248942)
  (vectors 16 7095)
  (vector-slots 8 341333 33198)
  (floats 8 65 260)
  (intervals 56 156 0)
  (buffers 960 11)
  (heap 1024 22077 2012))
--1468197610-1549670963-1441072770=:5317
Content-Type: text/plain; charset=US-ASCII; name=thingatpt.patch
Content-Transfer-Encoding: BASE64
Content-ID: <alpine.LRH.2.20.1509011059300.5317@HIDDEN>
Content-Description: 
Content-Disposition: attachment; filename=thingatpt.patch

LS0tIHRoaW5nYXRwdC5lbAkyMDE1LTA5LTAxIDEwOjQ5OjAzLjE2OTc0NzQ4
OCArMDkwMA0KKysrIHRoaW5nYXRwdF9wYXRjaGVkLmVsCTIwMTUtMDktMDEg
MTA6NTA6MTguODk2NzQ3NDgwICswOTAwDQpAQCAtMTQ1LDcgKzE0NSw3IEBA
DQogICAgICAgICAgICAobGV0ICgoYm91bmRzIChib3VuZHMtb2YtdGhpbmct
YXQtcG9pbnQgdGhpbmcpKSkNCiAgICAgICAgICAgICAgKHdoZW4gYm91bmRz
DQogICAgICAgICAgICAgICAgKGJ1ZmZlci1zdWJzdHJpbmcgKGNhciBib3Vu
ZHMpIChjZHIgYm91bmRzKSkpKSkpKQ0KLSAgICAod2hlbiAoYW5kIHRleHQg
bm8tcHJvcGVydGllcykNCisgICAgKHdoZW4gKGFuZCB0ZXh0IChzZXF1ZW5j
ZXAgdGV4dCkgbm8tcHJvcGVydGllcykNCiAgICAgICAoc2V0LXRleHQtcHJv
cGVydGllcyAwIChsZW5ndGggdGV4dCkgbmlsIHRleHQpKQ0KICAgICB0ZXh0
KSkNCiANCg==

--1468197610-1549670963-1441072770=:5317--




Acknowledgement sent to Tino Calancha <f92capac@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#21391; 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: Thu, 10 Nov 2016 20:15:02 UTC

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