From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#21391: 24.5; `thing-at-point' should return a string Date: Wed, 09 Nov 2016 17:45:08 +0200 Message-ID: <83y40sfyij.fsf@gnu.org> References: <0a68c2ae-0940-4e2c-8b3c-1faceb45c43c@default> <1773ab35-70b1-42f9-8a8b-fe07881487d1@default> <874m3krnb6.fsf_-_@gmail.com> <83a8dbiaps.fsf@gnu.org> <83pom7gjhl.fsf@gnu.org> <0a8d76e4-4d1b-a26d-2b76-a2d9384d9f72@yandex.ru> <83mvhbgitf.fsf@gnu.org> <25bb22e8-1388-275a-d0da-7e698acdf6da@yandex.ru> <83inrygggr.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1478706541 6627 195.159.176.226 (9 Nov 2016 15:49:01 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 9 Nov 2016 15:49:01 +0000 (UTC) Cc: tino.calancha@gmail.com, 21391@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Nov 09 16:48:57 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c4V6p-000502-7c for geb-bug-gnu-emacs@m.gmane.org; Wed, 09 Nov 2016 16:48:19 +0100 Original-Received: from localhost ([::1]:40811 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c4V6s-0002zJ-AP for geb-bug-gnu-emacs@m.gmane.org; Wed, 09 Nov 2016 10:48:22 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56405) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c4V4g-00015u-21 for bug-gnu-emacs@gnu.org; Wed, 09 Nov 2016 10:46:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c4V4c-0004rP-IC for bug-gnu-emacs@gnu.org; Wed, 09 Nov 2016 10:46:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:35691) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c4V4c-0004rI-BC for bug-gnu-emacs@gnu.org; Wed, 09 Nov 2016 10:46:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1c4V4c-0003iU-54 for bug-gnu-emacs@gnu.org; Wed, 09 Nov 2016 10:46:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 09 Nov 2016 15:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21391 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 21391-submit@debbugs.gnu.org id=B21391.147870631914220 (code B ref 21391); Wed, 09 Nov 2016 15:46:02 +0000 Original-Received: (at 21391) by debbugs.gnu.org; 9 Nov 2016 15:45:19 +0000 Original-Received: from localhost ([127.0.0.1]:51090 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c4V3v-0003hI-8W for submit@debbugs.gnu.org; Wed, 09 Nov 2016 10:45:19 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:37020) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c4V3t-0003h4-88 for 21391@debbugs.gnu.org; Wed, 09 Nov 2016 10:45:17 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c4V3l-0004aV-2c for 21391@debbugs.gnu.org; Wed, 09 Nov 2016 10:45:12 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:55557) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c4V3k-0004aQ-V9; Wed, 09 Nov 2016 10:45:08 -0500 Original-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 ) id 1c4V3k-0004FF-72; Wed, 09 Nov 2016 10:45:08 -0500 In-reply-to: (message from Dmitry Gutov on Wed, 9 Nov 2016 02:04:20 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:125521 Archived-At: > Cc: tino.calancha@gmail.com, 21391@debbugs.gnu.org > From: Dmitry Gutov > 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.