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 07:01:05 -0800 (PST) Message-ID: References: <0a68c2ae-0940-4e2c-8b3c-1faceb45c43c@default> <6d4d9469-5698-d522-ac3d-3f540b1c14b3@easy-emacs.de> <295cccf3-bb80-4cde-bcdb-5137333cc1ed@default> 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 1478530963 29982 195.159.176.226 (7 Nov 2016 15:02:43 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 7 Nov 2016 15:02:43 +0000 (UTC) Cc: 21391@debbugs.gnu.org, Tino Calancha To: Andreas =?UTF-8?Q?R=C3=B6hler?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Nov 07 16:02:37 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 1c3lRB-00057n-05 for geb-bug-gnu-emacs@m.gmane.org; Mon, 07 Nov 2016 16:02:17 +0100 Original-Received: from localhost ([::1]:54528 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c3lRD-00074z-AC for geb-bug-gnu-emacs@m.gmane.org; Mon, 07 Nov 2016 10:02:19 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59218) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c3lQz-00071m-RE for bug-gnu-emacs@gnu.org; Mon, 07 Nov 2016 10:02:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c3lQv-0005eR-Uc for bug-gnu-emacs@gnu.org; Mon, 07 Nov 2016 10:02:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:33124) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c3lQv-0005eB-RR for bug-gnu-emacs@gnu.org; Mon, 07 Nov 2016 10:02:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1c3lQv-0003ZU-JB for bug-gnu-emacs@gnu.org; Mon, 07 Nov 2016 10:02: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, 07 Nov 2016 15:02: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.147853087713679 (code B ref 21391); Mon, 07 Nov 2016 15:02:01 +0000 Original-Received: (at 21391) by debbugs.gnu.org; 7 Nov 2016 15:01:17 +0000 Original-Received: from localhost ([127.0.0.1]:48523 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c3lQC-0003YZ-UD for submit@debbugs.gnu.org; Mon, 07 Nov 2016 10:01:17 -0500 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:45910) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c3lQA-0003YD-TT for 21391@debbugs.gnu.org; Mon, 07 Nov 2016 10:01:15 -0500 Original-Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id uA7F18xL003961 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 7 Nov 2016 15:01:08 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 uA7F185G021911 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 7 Nov 2016 15:01:08 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 uA7F17av012457; Mon, 7 Nov 2016 15:01:07 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: aserv0022.oracle.com [141.146.126.234] 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:125420 Archived-At: > >>> Is there a need to pick symbols from a buffer as symbols? > >>> Don't know. My use-case is editing and strings are the suitable > >>> format. > >> Of course there is. And not just symbols, but numbers, lists... > > Sorry for the confusion. I was thinking of `list-at-point' etc., > > and not `thing-at-point', which always returns a string (or it > > should, at least - see my previous msg). >=20 > AFAIU the symbol-at-point-as-symbol idea and thing-at-point are two > different conceptions. >=20 > BTW can't see a use-case of form-at-point for know - while > having some in mind ;) A particular kind of thing at point is defined using function `form-at-point' or by using the `thing-at-point' symbol property. `form-at-point' is essentially a building block (helper). This is different from what `thing-at-point', which returns text (a string) that names or represents a thing at point of a particular kind. Examples of functions defined using `form-at-point' include `symbol-at-point', which returns a symbol, not a symbol name (string); `number-at-point', which returns a number, not a numeral (string); and `list-at-point', which returns a list (not a string representing a list). In my library thingatpt+.el I define functions such as `symbol-name-at-point', which returns a string naming the symbol at point, and `non-nil-symbol-name-at-point', which is the same but returns nil instead of the symbol name "nil", if there is no symbol (including no symbol `nil') at point. Using `-name-' as part of the function name helps make clear that such functions return strings, not symbols.