From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#16990: 24.3.50; Return a useful value for motion functions Date: Fri, 29 Apr 2016 11:55:21 -0700 (PDT) Message-ID: <08c30b43-f076-476b-9586-742798e6da41@default> References: <45c7f5b6-c217-47ab-8fca-c2ab2f046cff@default> <87r3doxpkd.fsf@gnus.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1461956207 18031 80.91.229.3 (29 Apr 2016 18:56:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 29 Apr 2016 18:56:47 +0000 (UTC) Cc: 16990@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Apr 29 20:56:34 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1awDab-0000eR-Fv for geb-bug-gnu-emacs@m.gmane.org; Fri, 29 Apr 2016 20:56:33 +0200 Original-Received: from localhost ([::1]:55891 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1awDaX-0007pH-BE for geb-bug-gnu-emacs@m.gmane.org; Fri, 29 Apr 2016 14:56:29 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53375) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1awDaO-0007ZL-HS for bug-gnu-emacs@gnu.org; Fri, 29 Apr 2016 14:56:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1awDaA-0002qX-0J for bug-gnu-emacs@gnu.org; Fri, 29 Apr 2016 14:56:12 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:43458) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1awDa9-0002pg-TI for bug-gnu-emacs@gnu.org; Fri, 29 Apr 2016 14:56:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1awDa6-0006Tr-Ep for bug-gnu-emacs@gnu.org; Fri, 29 Apr 2016 14:56:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 29 Apr 2016 18:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16990 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: wontfix Original-Received: via spool by 16990-submit@debbugs.gnu.org id=B16990.146195613324876 (code B ref 16990); Fri, 29 Apr 2016 18:56:02 +0000 Original-Received: (at 16990) by debbugs.gnu.org; 29 Apr 2016 18:55:33 +0000 Original-Received: from localhost ([127.0.0.1]:55795 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1awDZd-0006TA-0Q for submit@debbugs.gnu.org; Fri, 29 Apr 2016 14:55:33 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:23843) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1awDZb-0006Sx-2h for 16990@debbugs.gnu.org; Fri, 29 Apr 2016 14:55:31 -0400 Original-Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u3TItOrl026545 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 29 Apr 2016 18:55:25 GMT Original-Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0021.oracle.com (8.13.8/8.13.8) with ESMTP id u3TItO7J006739 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 29 Apr 2016 18:55:24 GMT Original-Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7]) by userv0121.oracle.com (8.13.8/8.13.8) with ESMTP id u3TItNDR021029; Fri, 29 Apr 2016 18:55:24 GMT In-Reply-To: <87r3doxpkd.fsf@gnus.org> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6744.5000 (x86)] X-Source-IP: userv0021.oracle.com [156.151.31.71] 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:117243 Archived-At: > > Enhancement request: Return a useful value for motion functions, > > when possible. > > > > The set of candidate functions for enhancement are motion functions. > > Yes, each needs to be checked in detail, and handled appropriately. > > One size does not fit all. A return value choice should be based on > > what is generally most useful in the context of using the function. > > > > This is the promised followup from the discussion for bug #15117. See > > that thread for more information (relevant functions, possible return > > values, etc.) >=20 > I seem to recall that this was about you wanting side-effect-only > functions to return values? The rest of us were against it, I think. > Closing. You seem to recall wrong. There was no "rest of us were against it" - at all. And no, it was not as superficial and general as my "wanting side-effect-only functions to return [useful] values". Please read the Subject line. This is about motion functions - at least some of them, and to be examined on a case-by-case basis. Here's Eli, saying the same thing (in the referenced bug thread) I say in my 2nd sentence of this thread: one size does not fit all, and suggesting reasonable (better) values for two such functions: Why point? E.g., forward-to-indentation could returns the column where it ended up, forward-same-syntax could return the syntax class, forward-visible-line could return the number of screen lines traversed, etc. Once again, the potentially useful value might well be different for each function, and needs to be considered separately for each. There's no "one fits all" here. He clearly was thinking about the question, not just applying a knee-jerk reaction that any suggestion of having a side-effect function return a useful value is silly. He was carefully thinking about what the best value might be for each of the functions he considered. Yes, nil could be a reasonable return value for some such functions. But sometimes a better value is available. This bug is about finding such values and making the functions return them.