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' returns error when called with arguments 'number t) Date: Mon, 7 Nov 2016 09:37:30 -0800 (PST) Message-ID: <2857cfd4-94db-49ae-902e-a010c0571868@default> References: <0a68c2ae-0940-4e2c-8b3c-1faceb45c43c@default> <1773ab35-70b1-42f9-8a8b-fe07881487d1@default> <302c1b51-e840-a2ca-5b8f-e3f64532eda8@easy-emacs.de> 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 1478540359 20815 195.159.176.226 (7 Nov 2016 17:39:19 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 7 Nov 2016 17:39:19 +0000 (UTC) Cc: Tino Calancha 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 07 18:39:15 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 1c3ns0-0007jI-Th for geb-bug-gnu-emacs@m.gmane.org; Mon, 07 Nov 2016 18:38:09 +0100 Original-Received: from localhost ([::1]:55574 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c3ns3-0008Qq-Vw for geb-bug-gnu-emacs@m.gmane.org; Mon, 07 Nov 2016 12:38:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49048) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c3nrx-0008QZ-QU for bug-gnu-emacs@gnu.org; Mon, 07 Nov 2016 12:38:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c3nru-00010C-ON for bug-gnu-emacs@gnu.org; Mon, 07 Nov 2016 12:38:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:33222) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c3nru-000103-Kl for bug-gnu-emacs@gnu.org; Mon, 07 Nov 2016 12:38:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1c3nrt-00020p-Sa for bug-gnu-emacs@gnu.org; Mon, 07 Nov 2016 12:38:02 -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, 07 Nov 2016 17:38: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.14785402797727 (code B ref -1); Mon, 07 Nov 2016 17:38:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 7 Nov 2016 17:37:59 +0000 Original-Received: from localhost ([127.0.0.1]:48621 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c3nrr-00020Z-8w for submit@debbugs.gnu.org; Mon, 07 Nov 2016 12:37:59 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:57984) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c3nrp-00020M-DC for submit@debbugs.gnu.org; Mon, 07 Nov 2016 12:37:58 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c3nrf-0000u4-9x for submit@debbugs.gnu.org; Mon, 07 Nov 2016 12:37:52 -0500 Original-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 ) id 1c3nrf-0000tx-7J for submit@debbugs.gnu.org; Mon, 07 Nov 2016 12:37:47 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48933) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c3nre-0008Pt-5h for bug-gnu-emacs@gnu.org; Mon, 07 Nov 2016 12:37:46 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c3nrd-0000tM-Cs for bug-gnu-emacs@gnu.org; Mon, 07 Nov 2016 12:37:46 -0500 Original-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 ) id 1c3nrY-0000pt-Ql; Mon, 07 Nov 2016 12:37:41 -0500 Original-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 Original-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 Original-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 In-Reply-To: <302c1b51-e840-a2ca-5b8f-e3f64532eda8@easy-emacs.de> 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: 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-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:125427 Archived-At: > > `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'.)