From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Stephen J. Turnbull" Newsgroups: gmane.emacs.devel Subject: Re: Errors in interactive commands Date: Wed, 03 Aug 2011 16:28:31 +0900 Message-ID: <87aabrhs2o.fsf@uwakimon.sk.tsukuba.ac.jp> References: <87livbbta9.fsf@gmail.com> <4E38E70B.7030802@online.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1312356514 16917 80.91.229.12 (3 Aug 2011 07:28:34 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 3 Aug 2011 07:28:34 +0000 (UTC) Cc: Antoine Levitt , Lennart Borgman , Stefan Monnier , emacs-devel@gnu.org To: Andreas =?iso-8859-1?Q?R=F6hler?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Aug 03 09:28:29 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QoVsT-0001DK-BF for ged-emacs-devel@m.gmane.org; Wed, 03 Aug 2011 09:28:29 +0200 Original-Received: from localhost ([::1]:44464 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QoVsS-0006gq-Rw for ged-emacs-devel@m.gmane.org; Wed, 03 Aug 2011 03:28:28 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:56248) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QoVsQ-0006gl-6A for emacs-devel@gnu.org; Wed, 03 Aug 2011 03:28:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QoVsP-0005kR-Dz for emacs-devel@gnu.org; Wed, 03 Aug 2011 03:28:26 -0400 Original-Received: from mgmt1.sk.tsukuba.ac.jp ([130.158.97.223]:60449) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QoVsP-0005kG-3u for emacs-devel@gnu.org; Wed, 03 Aug 2011 03:28:25 -0400 Original-Received: from uwakimon.sk.tsukuba.ac.jp (uwakimon.sk.tsukuba.ac.jp [130.158.99.156]) by mgmt1.sk.tsukuba.ac.jp (Postfix) with ESMTP id 3FCF03FA0723; Wed, 3 Aug 2011 16:28:23 +0900 (JST) Original-Received: by uwakimon.sk.tsukuba.ac.jp (Postfix, from userid 1000) id 7D6D31A26F8; Wed, 3 Aug 2011 16:28:31 +0900 (JST) In-Reply-To: <4E38E70B.7030802@online.de> X-Mailer: VM 8.1.93a under 21.5 (beta31) "ginger" cd1f8c4e81cd XEmacs Lucid (x86_64-unknown-linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 130.158.97.223 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:142788 Archived-At: Andreas R=F6hler writes: > A move-forward at the end of the buffer isn't a wrong command as such,=20 > just will not be successful. >=20 > Therefor it should not be raised an error, just nil returned. This is problematic, IMO. Suppose you have a buffer which is supposed to have an even number of objects in it, and you want to delete every second then. Then (progn (goto (point-min)) (while (not (eobp)) (forward-object 2) (delete-object -1))) DTRTs, including detecting the "incorrect state" of an odd number of objects, and not deleting the first object on an incomplete last line. If you're going to change the behavior of the movement commands here, I think it would be better to have them return the number of objects left to move over. Then 0 would mean (complete) success (how Un*x-y!) But this would be a major change.