From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#21391: 24.5; `thing-at-point' should return a string Date: Mon, 14 Nov 2016 07:19:28 -0800 (PST) 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 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1479136838 18362 195.159.176.226 (14 Nov 2016 15:20:38 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 14 Nov 2016 15:20:38 +0000 (UTC) To: andreas.roehler@easy-emacs.de, 21391@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Nov 14 16:20:34 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 1c6J3J-0001Aj-3N for geb-bug-gnu-emacs@m.gmane.org; Mon, 14 Nov 2016 16:20:09 +0100 Original-Received: from localhost ([::1]:40805 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c6J3M-0002YA-6E for geb-bug-gnu-emacs@m.gmane.org; Mon, 14 Nov 2016 10:20:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56923) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c6J3F-0002Wj-AS for bug-gnu-emacs@gnu.org; Mon, 14 Nov 2016 10:20:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c6J3B-0005mI-Sy for bug-gnu-emacs@gnu.org; Mon, 14 Nov 2016 10:20:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:41823) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c6J3B-0005mD-Pn for bug-gnu-emacs@gnu.org; Mon, 14 Nov 2016 10:20:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1c6J3B-00046I-Kx for bug-gnu-emacs@gnu.org; Mon, 14 Nov 2016 10:20:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 14 Nov 2016 15:20: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: X-Debbugs-Original-To: Andreas =?UTF-8?Q?R=C3=B6hler?= , bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.147913678915740 (code B ref -1); Mon, 14 Nov 2016 15:20:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 14 Nov 2016 15:19:49 +0000 Original-Received: from localhost ([127.0.0.1]:57222 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c6J2z-00045o-Cw for submit@debbugs.gnu.org; Mon, 14 Nov 2016 10:19:49 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:37670) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c6J2x-00045b-Qb for submit@debbugs.gnu.org; Mon, 14 Nov 2016 10:19:48 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c6J2r-0005gY-JO for submit@debbugs.gnu.org; Mon, 14 Nov 2016 10:19:42 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:42112) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c6J2r-0005g7-Fq for submit@debbugs.gnu.org; Mon, 14 Nov 2016 10:19:41 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56861) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c6J2q-0002TF-Bm for bug-gnu-emacs@gnu.org; Mon, 14 Nov 2016 10:19:41 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c6J2m-0005ba-4B for bug-gnu-emacs@gnu.org; Mon, 14 Nov 2016 10:19:40 -0500 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:24255) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c6J2l-0005al-SO for bug-gnu-emacs@gnu.org; Mon, 14 Nov 2016 10:19:36 -0500 Original-Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id uAEFJV7w008869 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 14 Nov 2016 15:19:31 GMT Original-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 uAEFJVAa025889 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 14 Nov 2016 15:19:31 GMT Original-Received: from abhmp0017.oracle.com (abhmp0017.oracle.com [141.146.116.23]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id uAEFJTEd020735; Mon, 14 Nov 2016 15:19:29 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 12.0.6753.5000 (x86)] X-Source-IP: aserv0021.oracle.com [141.146.126.233] 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-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:125684 Archived-At: > Look at the start of thing-at-point implementation: >=20 > if (get thing 'thing-at-point) > (funcall (get thing 'thing-at-point)) >=20 > AFAIU an arbitrary function might be stored here, no real > relation to thing-at-point at all. ANY time you use a function as a parameter (passed as an argument, obtained as the value of a variable, or picked up in some other way, such as here) there is little or no control over the nature of that function in the function that makes use of it. It is up to the code that provides the function to provide an appropriate function (DTRT). > Next clause deals with buffer-substring - which is > thing-at-point about in my understanding. Your understanding is partial, then. Thing-at-point has been, from the outset, about actual Lisp THINGS, not just strings that name such things. Yes, string-naming-a-thing is a common use case - the most common, currently. But it is only part of the story. And yes, buffer text is usually examined to come up with the returned THING. But the buffer text need not be examined. What is most significant is point - the buffer position. And even that could be ignored by the function that comes up with an appropriate THING to return. thingatpt.el is much more general, and offers many more possibilities, than just grabbing some text at or near point.