From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tino Calancha Newsgroups: gmane.emacs.bugs Subject: bug#21391: 24.5; `thing-at-point' should return a string Date: Fri, 11 Nov 2016 19:07:15 +0900 (JST) 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> <834m3ffeb9.fsf@gnu.org> <83twbfdvav.fsf@gnu.org> <73be4b9d-2df8-cc83-b873-398cb7dd043b@yandex.ru> <83pom3ds3e.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Trace: blaine.gmane.org 1478858925 19303 195.159.176.226 (11 Nov 2016 10:08:45 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 11 Nov 2016 10:08:45 +0000 (UTC) User-Agent: Alpine 2.20 (DEB 67 2015-01-07) Cc: tino.calancha@gmail.com, 21391@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Nov 11 11:08:41 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 1c58kk-0001Qx-EP for geb-bug-gnu-emacs@m.gmane.org; Fri, 11 Nov 2016 11:08:10 +0100 Original-Received: from localhost ([::1]:51790 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c58kn-0003GR-L0 for geb-bug-gnu-emacs@m.gmane.org; Fri, 11 Nov 2016 05:08:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56124) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c58kf-0003G8-SJ for bug-gnu-emacs@gnu.org; Fri, 11 Nov 2016 05:08:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c58kc-0005lW-HY for bug-gnu-emacs@gnu.org; Fri, 11 Nov 2016 05:08:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:37610) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c58kc-0005lJ-EH for bug-gnu-emacs@gnu.org; Fri, 11 Nov 2016 05:08:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1c58kc-0006Uh-1c for bug-gnu-emacs@gnu.org; Fri, 11 Nov 2016 05:08:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Tino Calancha Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 11 Nov 2016 10:08: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.147885884824925 (code B ref 21391); Fri, 11 Nov 2016 10:08:01 +0000 Original-Received: (at 21391) by debbugs.gnu.org; 11 Nov 2016 10:07:28 +0000 Original-Received: from localhost ([127.0.0.1]:53009 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c58k3-0006Tv-Rq for submit@debbugs.gnu.org; Fri, 11 Nov 2016 05:07:28 -0500 Original-Received: from mail-pf0-f194.google.com ([209.85.192.194]:35671) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c58k2-0006Ti-T8 for 21391@debbugs.gnu.org; Fri, 11 Nov 2016 05:07:27 -0500 Original-Received: by mail-pf0-f194.google.com with SMTP id i88so2064887pfk.2 for <21391@debbugs.gnu.org>; Fri, 11 Nov 2016 02:07:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:date:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=Ju1cVJykpiTaZPeEea31wD9sP6maxuYJAn9fpbn4MDU=; b=gkh7BN9FQ1/xIDQ9gzhfbNJxmIH0d6KPsv9fkZY4SMWbTH10SFuFoIqQWWtr1bEHaf kVk1sfw7ZXZatS1xdEUhB2O28ziLnoe4SCPjP6OnR2QDesI2dCpnCBSj8M6Xa7fziGj+ Ye77Vk/bHshSSINFmJrqsf2ZKokzFGBhMK8VCw1y1VB75ulv6hJ7UcAZ4ksJjgjnEvvx 0DfOfT/8lcXNYbw9EwBbEbeG1o2LZOiJKztelDMKiF3qE4HvYKjOGnChQfZsqtkRLCTQ +y4iiohRLZrJcsbdqS88BMrbIZ51F325cPCr1IZqysgkDmqAX1Y5CVVKDyMWAtLGa6HL oB/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:date:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=Ju1cVJykpiTaZPeEea31wD9sP6maxuYJAn9fpbn4MDU=; b=N2oBjCBp32TPKpdKwFqq1LvxAVZszbIiU9K5brzz+zNhiPVeE+Vb8fgi9HcKlDMVhz RIv5qW+0d8xwjkpWtf6BXzjASH8j+Lv/MixgzjkNzQ/0rm6UJ/4L+aIla0F9OaJ9/4Yd FvdcRd1IEFAVGXOiLkP+98wRABZ2OsuZ08mOJZpl7mfRyLGpBaDSegoIBDpA1yR/jEMY CZWJW1T6TN1ksNV6+/Y0QGODlU8ugeFJ3IF/Er4jbKtUjDbAa86U7x/9+RckRt70hLAX B3pgIO/E3Ar7KwWoRwE3q4R6lApZ9rbl7nJ/XcVU/dtrk1a4YDoD5BnonGCe6ctKaibA wTHg== X-Gm-Message-State: ABUngvca6gdpsr2uY81rBhR3qes2XpNBMb+pMyfadowRpEN5OBK121NlJ8oF2/jpxcRIlw== X-Received: by 10.99.139.199 with SMTP id j190mr43673727pge.115.1478858841158; Fri, 11 Nov 2016 02:07:21 -0800 (PST) Original-Received: from calancha-pc (57.92.100.220.dy.bbexcite.jp. [220.100.92.57]) by smtp.gmail.com with ESMTPSA id t67sm13778665pfg.13.2016.11.11.02.07.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 11 Nov 2016 02:07:20 -0800 (PST) X-Google-Original-From: Tino Calancha X-X-Sender: calancha@calancha-pc In-Reply-To: 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:125607 Archived-At: On Thu, 10 Nov 2016, Dmitry Gutov wrote: > On 10.11.2016 21:59, Eli Zaretskii wrote: > >> Because currently they can call thing-at-point without defining >> foo-at-point. AFAIU, you suggest to deny them this possibility, and >> force them to define foo-at-point for every foo. > > They'll really have to do that only for string-unrepresentable foos. > > Like currently (thing-at-point 'symbol) returns a string, whereas > (symbol-at-point) returns an interned symbol. That's nothing new. Indeed, this sounds the right usage for me, and for an user who has read the part of the manual refering to `thing-at-point'. If i want the list object i call `list-at-point', and if i just want the text representation i would call (thing-at-point 'list). The fact that we have that duality in the code, i.e. I) (thing-at-point 'foo) II) (foo-at-point) in some sense is asking for I) and II) returning two different things. I find it easier if I) always return a string. Note also that we don't need to define one version II) per each THING: just in the few cases where it has sense to return the THING with a different type than a string. We already have defined all II) functions in `thingatpt.el'.