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: Thu, 10 Nov 2016 10:27:44 -0800 (PST) Message-ID: References: <0a68c2ae-0940-4e2c-8b3c-1faceb45c43c@default> <1773ab35-70b1-42f9-8a8b-fe07881487d1@default> <874m3krnb6.fsf_-_@gmail.com> <83a8dbiaps.fsf@gnu.org> <83pom7gjhl.fsf@gnu.org> <0a8d76e4-4d1b-a26d-2b76-a2d9384d9f72@yandex.ru> <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> 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 1478804188 13194 195.159.176.226 (10 Nov 2016 18:56:28 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 10 Nov 2016 18:56:28 +0000 (UTC) Cc: tino.calancha@gmail.com, 21391@debbugs.gnu.org To: Dmitry Gutov , Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Nov 10 19:56:24 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 1c4uW0-0008P1-E0 for geb-bug-gnu-emacs@m.gmane.org; Thu, 10 Nov 2016 19:56:00 +0100 Original-Received: from localhost ([::1]:48713 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c4uW3-000485-It for geb-bug-gnu-emacs@m.gmane.org; Thu, 10 Nov 2016 13:56:03 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51291) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c4u4x-0000ij-Cs for bug-gnu-emacs@gnu.org; Thu, 10 Nov 2016 13:28:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c4u4w-0008HJ-AV for bug-gnu-emacs@gnu.org; Thu, 10 Nov 2016 13:28:03 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:37226) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c4u4w-0008H4-6b for bug-gnu-emacs@gnu.org; Thu, 10 Nov 2016 13:28:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1c4u4v-0003Ox-Si for bug-gnu-emacs@gnu.org; Thu, 10 Nov 2016 13:28: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: Thu, 10 Nov 2016 18:28: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.147880247613064 (code B ref 21391); Thu, 10 Nov 2016 18:28:01 +0000 Original-Received: (at 21391) by debbugs.gnu.org; 10 Nov 2016 18:27:56 +0000 Original-Received: from localhost ([127.0.0.1]:52625 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c4u4q-0003Oe-CV for submit@debbugs.gnu.org; Thu, 10 Nov 2016 13:27:56 -0500 Original-Received: from userp1040.oracle.com ([156.151.31.81]:28252) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c4u4o-0003OR-DE for 21391@debbugs.gnu.org; Thu, 10 Nov 2016 13:27:54 -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 uAAIRl02003431 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 10 Nov 2016 18:27:47 GMT Original-Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0021.oracle.com (8.13.8/8.13.8) with ESMTP id uAAIRkV1007958 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 10 Nov 2016 18:27:47 GMT Original-Received: from abhmp0008.oracle.com (abhmp0008.oracle.com [141.146.116.14]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id uAAIRj4Q031324; Thu, 10 Nov 2016 18:27:46 GMT In-Reply-To: <73600483-1df5-597c-6066-232189bbdd4a@yandex.ru> 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:125579 Archived-At: > And another inconsistency: > (bounds-of-thing-at-point 'number) always returns nil. It's not an inconsistency. It's a bug. `thingatpt.el' HAS bugs. I've provided patches and filed bug reports, pointing to code that fixes things. All of that has been ignored. I've been using the fixed code for years, and so have others. In my code I do this, and things work fine: (put 'number 'tap-bounds-of-thing-at-point 'tap-bounds-of-number-at-point) (defun tap-bounds-of-number-at-point () "Return the bounds of the number represented by the numeral at point. Return nil if none is found." (and (number-at-point) (tap-bounds-of-thing-at-point 'sexp))) `bounds-of-thing-at-point' is broken. I've provided a fix for it, which you've rejected summarily, based on your own perceived "need" to force `thing-at-point' to not respect "at point" but try to return things that are only near point - things that are either here or there - no "at". > We won't lose that if we go with either of my proposals: instead of > printing objects inside the thing-at-point function, we would > require that each returned thing is a string already. Any thing-at-point > function that returns a non-string will be considered non-conformant. You want to throw out the baby with the bathwater. You have no use for what is truly useful in thingatpt. You ignore the design and insist on your own interpretation of what's "useless" or "inconsistent".