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: Sat, 12 Nov 2016 00:05:56 +0900 (JST) Message-ID: References: <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> <83bmxme12w.fsf@gnu.org> <834m3edqyr.fsf@gnu.org> <6dbea00c-3bde-6ec3-b109-7aa205bedb5f@yandex.ru> <8337iydq8z.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII X-Trace: blaine.gmane.org 1478876975 10424 195.159.176.226 (11 Nov 2016 15:09:35 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 11 Nov 2016 15:09:35 +0000 (UTC) User-Agent: Alpine 2.20 (DEB 67 2015-01-07) Cc: tino.calancha@gmail.com, Dmitry Gutov , 21391@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Nov 11 16:09:29 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 1c5DS0-0007wl-4m for geb-bug-gnu-emacs@m.gmane.org; Fri, 11 Nov 2016 16:09:08 +0100 Original-Received: from localhost ([::1]:53510 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c5DS3-0004lg-7m for geb-bug-gnu-emacs@m.gmane.org; Fri, 11 Nov 2016 10:09:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34257) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c5DQ2-0003Ea-3Z for bug-gnu-emacs@gnu.org; Fri, 11 Nov 2016 10:07:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c5DPy-0001RO-4B for bug-gnu-emacs@gnu.org; Fri, 11 Nov 2016 10:07:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:38670) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c5DPy-0001RC-1V for bug-gnu-emacs@gnu.org; Fri, 11 Nov 2016 10:07:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1c5DPx-0006vC-Rv for bug-gnu-emacs@gnu.org; Fri, 11 Nov 2016 10:07:01 -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 15:07: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.147887676626537 (code B ref 21391); Fri, 11 Nov 2016 15:07:01 +0000 Original-Received: (at 21391) by debbugs.gnu.org; 11 Nov 2016 15:06:06 +0000 Original-Received: from localhost ([127.0.0.1]:54069 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c5DP4-0006tx-AZ for submit@debbugs.gnu.org; Fri, 11 Nov 2016 10:06:06 -0500 Original-Received: from mail-pg0-f66.google.com ([74.125.83.66]:35133) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c5DP3-0006tT-7V for 21391@debbugs.gnu.org; Fri, 11 Nov 2016 10:06:05 -0500 Original-Received: by mail-pg0-f66.google.com with SMTP id p66so2103894pga.2 for <21391@debbugs.gnu.org>; Fri, 11 Nov 2016 07:06:05 -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=dG7Ki3Y/0e9LYwsI3iHr1Qi3qouUs5LUYt4JYf4R5ro=; b=0+zToRlblptvLZy/t2FAlVxVLixmsx7O79Dzc/xnhF94otgH6SBYGs+s6sE/iGmvMt e7mBOm4Q7Sw31tk++u/YlvofeLKT6EqRC9nA4mdn4ui0ZlDrARsxQAbNzfa46MRlVZH0 6NrdrEY4rCd1+pdjKn1zKP4KWcv8JZN2REV9Eni+Nx5bf+gSCCawnx2yLoMdej9EfYj1 pbESY5VVF+WowqsD843K/bodVEs4DtY2bXA6vkEeJcYma6lFnyH9FFSuUgfU4P207jh9 /EWEmbtBja6ih45xp/VjTLsYZ69ktpE5zr00iIhs1B2jHsT7wN1OS1wdhJKuTH3qf4ts sYmA== 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=dG7Ki3Y/0e9LYwsI3iHr1Qi3qouUs5LUYt4JYf4R5ro=; b=OdupTjhabRMStB68afgeu4Q6fItiO85B7Hj4HO7jt8ld/RTSeQ/5WqO5sKPxYfl8L3 OI/yF5n+XR6LDFTgrySeBsdps+mWYC0zYbId1u/GwKRM1ifrZO4p4q3iaPukALvZxsPe pWCw4uZ/jf1sQ1mhSX2Ze3m6MWAO491JoxEIHvPzm7Cd9w0jaUEAkz/Vjy5TamcbzkKk 47HOEpAcQcsE/XjMIuPMGiPvCQ8D5kH2URCYCFCx4h5YosS16+hW0Wc0MhdSf1HKNZli hpmhuO7vCsm2N4rg+g1FB8jCjgOFVGmqYgbCB1xdyuzDqUYC9BXBUS798Mgv9QZS6Tb8 xjMA== X-Gm-Message-State: ABUngvdtRFgjokaf/91g62ykE6A7VKTVi0QXcgWVnolRtbvSa49TrI2mOfF6UlE033jgGA== X-Received: by 10.99.67.7 with SMTP id q7mr8531733pga.45.1478876759668; Fri, 11 Nov 2016 07:05:59 -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 y200sm15921481pfb.16.2016.11.11.07.05.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 11 Nov 2016 07:05:59 -0800 (PST) X-Google-Original-From: Tino Calancha X-X-Sender: calancha@calancha-pc In-Reply-To: <8337iydq8z.fsf@gnu.org> 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:125622 Archived-At: On Fri, 11 Nov 2016, Eli Zaretskii wrote: >> Cc: 21391@debbugs.gnu.org >> From: Dmitry Gutov >> Date: Fri, 11 Nov 2016 16:46:14 +0200 >> >> On 11.11.2016 16:35, Eli Zaretskii wrote: >> >>>> The current implementation makes the things harder to understand. >>>> Currently one user need to read the source code to know the actual >>>> type this function returns. >>> >>> If that's a problem, let's improve the doc string (and the manual, if >>> needed) to make this more clear. >> >> Improve how? By saying that the function behaves in a variety of ways, >> solely depending on which `thing' it is passed? > > Improve it by describing whatever it is that is evident from the code > that is not evident from the doc string. > >> That won't make it much clearer, or make it easier to follow code that >> uses `thing-at-point'. > > I don't understand why. It's not like we don't have other functions > that can return different kinds of objects. Yes, and it's a good thing when it results in a simpler code. I don't think in this case it makes a simpler code or a code easier to follow, kinda the opposite. I don't think we actually need a polymorphic function here with the bizarre behaviour pointed out in my previous email. Instead of document its counter-intuitive behaviour, i would go for fixing the function to do just one obvious thing. It would save the users time reading the manual. It's a change for better, a good thing. We will have a better function. Everyone will be happy with this.