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:00:37 -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 1478530896 1348 195.159.176.226 (7 Nov 2016 15:01:36 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 7 Nov 2016 15:01:36 +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:01: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 1c3lQA-0006Hh-Fz for geb-bug-gnu-emacs@m.gmane.org; Mon, 07 Nov 2016 16:01:14 +0100 Original-Received: from localhost ([::1]:54526 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c3lQD-0006qg-Ky for geb-bug-gnu-emacs@m.gmane.org; Mon, 07 Nov 2016 10:01:17 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58802) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c3lQ2-0006qX-Ta for bug-gnu-emacs@gnu.org; Mon, 07 Nov 2016 10:01:12 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c3lPy-0005Op-UO for bug-gnu-emacs@gnu.org; Mon, 07 Nov 2016 10:01:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:33120) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c3lPy-0005Ok-Fm for bug-gnu-emacs@gnu.org; Mon, 07 Nov 2016 10:01:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1c3lPy-0003Xp-5s for bug-gnu-emacs@gnu.org; Mon, 07 Nov 2016 10:01: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 15:01: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: Original-Received: via spool by 21391-submit@debbugs.gnu.org id=B21391.147853084813599 (code B ref 21391); Mon, 07 Nov 2016 15:01:02 +0000 Original-Received: (at 21391) by debbugs.gnu.org; 7 Nov 2016 15:00:48 +0000 Original-Received: from localhost ([127.0.0.1]:48519 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c3lPk-0003XH-Mb for submit@debbugs.gnu.org; Mon, 07 Nov 2016 10:00:48 -0500 Original-Received: from userp1040.oracle.com ([156.151.31.81]:39772) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c3lPj-0003X4-F6 for 21391@debbugs.gnu.org; Mon, 07 Nov 2016 10:00:47 -0500 Original-Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id uA7F0ddI012146 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 7 Nov 2016 15:00:39 GMT Original-Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0021.oracle.com (8.13.8/8.13.8) with ESMTP id uA7F0cGQ030530 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 7 Nov 2016 15:00:39 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 uA7F0cGU011805; Mon, 7 Nov 2016 15:00:38 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-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:125419 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.