From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Andreas =?UTF-8?Q?R=C3=B6hler?= Newsgroups: gmane.emacs.bugs Subject: bug#21391: 24.5; `thing-at-point' should return a string Date: Mon, 14 Nov 2016 11:26:54 +0100 Message-ID: References: <83mvhbgitf.fsf@gnu.org> <25bb22e8-1388-275a-d0da-7e698acdf6da@yandex.ru> <83inrygggr.fsf@gnu.org> <83y40sfyij.fsf@gnu.org> <76505436-e66c-0ed3-6d7a-ce654f38ef30@yandex.ru> <83bmxnfhbi.fsf@gnu.org> <73600483-1df5-597c-6066-232189bbdd4a@yandex.ru> <834m3ffeb9.fsf@gnu.org> <83twbfdvav.fsf@gnu.org> <73be4b9d-2df8-cc83-b873-398cb7dd043b@yandex.ru> <83pom3ds3e.fsf@gnu.org> <83bmxme12w.fsf@gnu.org> <834m3edqyr.fsf@gnu.org> <6dbea00c-3bde-6ec3-b109-7aa205bedb5f@yandex.ru> <8337iydq8z.fsf@gnu.org> <83y40qc9jv.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1479118776 22060 195.159.176.226 (14 Nov 2016 10:19:36 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 14 Nov 2016 10:19:36 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux i686; rv:45.0) Gecko/20100101 Icedove/45.4.0 To: 21391@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Nov 14 11:19:31 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 1c6EM3-0002Mn-T7 for geb-bug-gnu-emacs@m.gmane.org; Mon, 14 Nov 2016 11:19:12 +0100 Original-Received: from localhost ([::1]:37165 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c6EM7-0003Ir-35 for geb-bug-gnu-emacs@m.gmane.org; Mon, 14 Nov 2016 05:19:15 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39539) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c6EM0-0003Ib-Pe for bug-gnu-emacs@gnu.org; Mon, 14 Nov 2016 05:19:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c6ELu-0000du-EH for bug-gnu-emacs@gnu.org; Mon, 14 Nov 2016 05:19:08 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:40978) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c6ELu-0000dS-AQ for bug-gnu-emacs@gnu.org; Mon, 14 Nov 2016 05:19:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1c6ELu-00037D-2f for bug-gnu-emacs@gnu.org; Mon, 14 Nov 2016 05:19:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Andreas =?UTF-8?Q?R=C3=B6hler?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 14 Nov 2016 10:19: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: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.147911872111946 (code B ref -1); Mon, 14 Nov 2016 10:19:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 14 Nov 2016 10:18:41 +0000 Original-Received: from localhost ([127.0.0.1]:56377 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c6ELZ-00036c-4p for submit@debbugs.gnu.org; Mon, 14 Nov 2016 05:18:41 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:48528) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c6ELY-00036Q-Bd for submit@debbugs.gnu.org; Mon, 14 Nov 2016 05:18:40 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c6ELS-0000RN-Je for submit@debbugs.gnu.org; Mon, 14 Nov 2016 05:18:35 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:44272) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c6ELS-0000Qv-GF for submit@debbugs.gnu.org; Mon, 14 Nov 2016 05:18:34 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39495) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c6ELR-0003Ho-CT for bug-gnu-emacs@gnu.org; Mon, 14 Nov 2016 05:18:34 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c6ELN-0000Jz-Dj for bug-gnu-emacs@gnu.org; Mon, 14 Nov 2016 05:18:33 -0500 Original-Received: from mout.kundenserver.de ([212.227.126.187]:57044) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c6ELN-0000Ik-3h for bug-gnu-emacs@gnu.org; Mon, 14 Nov 2016 05:18:29 -0500 Original-Received: from [192.168.178.35] ([77.12.36.75]) by mrelayeu.kundenserver.de (mreue001 [212.227.15.167]) with ESMTPSA (Nemesis) id 0MR7Py-1cEZF41dvC-00UNrS; Mon, 14 Nov 2016 11:18:20 +0100 In-Reply-To: X-Provags-ID: V03:K0:tfX32hSIDulC23P2aCUsKyv95utTbGaZS6qtZZh18NIiKbVK9rG q0Tqr/iGMn8MfXpcfs69tkLzPwg6TEC0KcRUlC7XYljHRdJ/SKlumyu7eu3r90PCTd0UXJF D+V4wMOrI/RpjUn+wMcLULDKaKqW+MFOHQd15j9Z5FeJJEP1Wrq7HFBHsWGjXO8F/8UdQi7 S+aQdGYGGpLQXMxl+Nihg== X-UI-Out-Filterresults: notjunk:1;V01:K0:iw27Hlf6eq4=:h9PjenN90cjIQQGJ2ZajNa S7ygIi4YM+bUV82igyCquazs4yvVIiwZqHJZ9UdlLq99q2HBRfDgN8bs1dRuDiDvh232I4U1b 6KNk62FT/j7nGjqrwwKCFygoNrZK+D688jhITF1iVEwl5RAWTpfo5aruEfHwa1DuVQUdJG9Cm w7K6XMi/6cjjlGemnb0gHwBjUY1Cw7Nut8LY+nJv43iLZJAHBU2LPBIvexYsSPmV9XPwoEVOf sxH8egzHESqEZaxOeL4TkQzzDQhFVnI6DEJNgsmuJvBrMH55NflyOZQ/KgqZ8vxKD2tQjXI2S eQOlH6WtQqiceH/00gSFNtsY9sTR0FwYT6PRodkhlmMAo8EwHd8/ANsE14TXVYhGXC+TBCT4o 0tNekM6a2FOtbtRfUcP8wQ8RbvMAuFJzb3vAVOB6CnKawhOK83aiJny2Utbqiuwq0keXbAJL9 6ezqPvS/M9gjJC6QGTGHxwGCh5x1MHxRuW2FYTIHfsc/POgasDZF3sPI0Oe0TYRrz9CbMqYqz F/VPjthE7XpAKj7lWzYDcuqLp3516p1ZbIsireQ0mKo9dtdvrHCbQkSvU/tvkY6FLAtBqk/Le WLnEfZUTVV7G1gb2lrw4DDvIS9sb9APiEb2QIi6RBlM0HjbWNXeoTUg8p6uLiekjmS90bmKI6 CUwYOsDMNPwkjm0n+N5RUucU+4IBXyYMhjC6U67N5tAuNwg== 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-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:125681 Archived-At: On 14.11.2016 03:43, Drew Adams wrote: >>> I can suggest adding a new function, with the features you >>> mention. We could even deprecate thing-at-point and advise >>> to use the new one instead. >> In this vein, I would propose deprecating `thing-at-point' in favor >> of `bounds-of-thing-at-point', which should provide all the necessary >> information for a `buffer-substring' call anyway (when it works). > This is really going from bad to worse. But I can't say I'm > surprised. > > Eli suggested to keep the behavior backward-compatible, rather > than ensuring that the return value is a string. That is a > reasonable approach. It's OK by me. IMHO the current design is really confusing and shouldn't be kept. Look at the start of thing-at-point implementation: if (get thing 'thing-at-point) (funcall (get thing 'thing-at-point)) AFAIU an arbitrary function might be stored here, no real relation to thing-at-point at all. Next clause deals with buffer-substring - which is thing-at-point about in my understanding.