From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#20587: 24.1 forward-line docs inconsistent/surprising return value Date: Sat, 16 May 2015 17:20:11 +0300 Message-ID: <83vbfsfvtw.fsf@gnu.org> References: <83d221gfsn.fsf@gnu.org> <83y4kofy7p.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1431786085 22385 80.91.229.3 (16 May 2015 14:21:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 16 May 2015 14:21:25 +0000 (UTC) Cc: 20587@debbugs.gnu.org To: vivek@etla.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat May 16 16:21:13 2015 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 1Ytcxk-0002QB-Fv for geb-bug-gnu-emacs@m.gmane.org; Sat, 16 May 2015 16:21:12 +0200 Original-Received: from localhost ([::1]:34787 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ytcxj-0002GJ-Hy for geb-bug-gnu-emacs@m.gmane.org; Sat, 16 May 2015 10:21:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50017) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ytcxe-0002B0-Ab for bug-gnu-emacs@gnu.org; Sat, 16 May 2015 10:21:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ytcxb-00041A-3A for bug-gnu-emacs@gnu.org; Sat, 16 May 2015 10:21:06 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:37444) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ytcxb-000416-0e for bug-gnu-emacs@gnu.org; Sat, 16 May 2015 10:21:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Ytcxa-000510-LY for bug-gnu-emacs@gnu.org; Sat, 16 May 2015 10:21:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 16 May 2015 14:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20587 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 20587-submit@debbugs.gnu.org id=B20587.143178602419219 (code B ref 20587); Sat, 16 May 2015 14:21:02 +0000 Original-Received: (at 20587) by debbugs.gnu.org; 16 May 2015 14:20:24 +0000 Original-Received: from localhost ([127.0.0.1]:47419 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Ytcwx-0004zt-BP for submit@debbugs.gnu.org; Sat, 16 May 2015 10:20:24 -0400 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:48517) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Ytcwt-0004zc-KJ for 20587@debbugs.gnu.org; Sat, 16 May 2015 10:20:21 -0400 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0NOG00J0053TU900@a-mtaout22.012.net.il> for 20587@debbugs.gnu.org; Sat, 16 May 2015 17:20:13 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NOG00J7555MRV40@a-mtaout22.012.net.il>; Sat, 16 May 2015 17:20:13 +0300 (IDT) In-reply-to: <83y4kofy7p.fsf@gnu.org> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:102881 Archived-At: > Date: Sat, 16 May 2015 16:28:42 +0300 > From: Eli Zaretskii > Cc: 20587@debbugs.gnu.org > > > It may be that the behaviour is so ancient that it cannot be altered > > without breaking things: I wouldn't push for the behaviour change in > > that case. But I think the special case should be more clearly flagged > > and stated. > > If we agree about the behavior, I can change the doc string. That's > easy enough. Actually, now that I read the doc string in its entirety, it seems to say all that already: Move N lines forward (backward if N is negative). Precisely, if point is on line I, move to the start of line I + N ("start of line" in the logical order). If there isn't room, go as far as possible (no error). ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Returns the count of lines left to move. If moving forward, that is N - number of lines moved; if backward, N + number moved. With positive N, a non-empty line at the end counts as one line ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ successfully moved (for the return value). ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ If those 2 sentences don't describe the situation with a buffer that ends in a line without a newline, then what is missing or unclear here, in your opinion? So are you saying that the only documentation that needs to be clarified is the ELisp manual?