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: Tue, 08 Nov 2016 17:05:08 +0200 Message-ID: <83inrygggr.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> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1478617562 12551 195.159.176.226 (8 Nov 2016 15:06:02 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 8 Nov 2016 15:06:02 +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 Tue Nov 08 16:05:58 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 1c47xV-0005Jc-2O for geb-bug-gnu-emacs@m.gmane.org; Tue, 08 Nov 2016 16:05:09 +0100 Original-Received: from localhost ([::1]:33686 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c47xY-0007jO-3T for geb-bug-gnu-emacs@m.gmane.org; Tue, 08 Nov 2016 10:05:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44298) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c47xR-0007hq-Jo for bug-gnu-emacs@gnu.org; Tue, 08 Nov 2016 10:05:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c47xO-0000Iv-CT for bug-gnu-emacs@gnu.org; Tue, 08 Nov 2016 10:05:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:34380) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c47xO-0000IS-9I for bug-gnu-emacs@gnu.org; Tue, 08 Nov 2016 10:05:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1c47xN-0001uL-TL for bug-gnu-emacs@gnu.org; Tue, 08 Nov 2016 10:05:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 08 Nov 2016 15:05:01 +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.14786174877306 (code B ref 21391); Tue, 08 Nov 2016 15:05:01 +0000 Original-Received: (at 21391) by debbugs.gnu.org; 8 Nov 2016 15:04:47 +0000 Original-Received: from localhost ([127.0.0.1]:49779 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c47x8-0001tm-P4 for submit@debbugs.gnu.org; Tue, 08 Nov 2016 10:04:46 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:53218) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c47x6-0001tW-JP for 21391@debbugs.gnu.org; Tue, 08 Nov 2016 10:04:45 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c47wy-0008Uu-6q for 21391@debbugs.gnu.org; Tue, 08 Nov 2016 10:04:39 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:57577) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c47wy-0008Uq-3F; Tue, 08 Nov 2016 10:04:36 -0500 Original-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 ) id 1c47wx-00053c-4T; Tue, 08 Nov 2016 10:04:35 -0500 In-reply-to: <25bb22e8-1388-275a-d0da-7e698acdf6da@yandex.ru> (message from Dmitry Gutov on Mon, 7 Nov 2016 22:03:58 +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:125468 Archived-At: > Cc: tino.calancha@gmail.com, 21391@debbugs.gnu.org > From: Dmitry Gutov > 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?