From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: Rationale behind conversion of a nil prefix arg to numeric 1 Date: Sun, 04 Sep 2016 21:33:49 +0300 Message-ID: <83k2ercy5u.fsf@gnu.org> References: <87y437c0qg.fsf@bertrandrussell.Speedport_W_723V_1_40_000> <83oa43d9r8.fsf@gnu.org> <06d4a7f1-f116-fb5c-9bd2-c4d1f98934c9@easy-emacs.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1473014078 18371 195.159.176.226 (4 Sep 2016 18:34:38 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 4 Sep 2016 18:34:38 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Sep 04 20:34:34 2016 Return-path: Envelope-to: geh-help-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 1bgcFS-0003x3-OW for geh-help-gnu-emacs@m.gmane.org; Sun, 04 Sep 2016 20:34:30 +0200 Original-Received: from localhost ([::1]:50772 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bgcFP-0003oz-VE for geh-help-gnu-emacs@m.gmane.org; Sun, 04 Sep 2016 14:34:27 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45470) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bgcEz-0003or-38 for help-gnu-emacs@gnu.org; Sun, 04 Sep 2016 14:34:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bgcEu-0002IR-N8 for help-gnu-emacs@gnu.org; Sun, 04 Sep 2016 14:33:59 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:56124) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bgcEu-0002IN-KH for help-gnu-emacs@gnu.org; Sun, 04 Sep 2016 14:33:56 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1928 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bgcEq-0002Hw-Is for help-gnu-emacs@gnu.org; Sun, 04 Sep 2016 14:33:55 -0400 In-reply-to: <06d4a7f1-f116-fb5c-9bd2-c4d1f98934c9@easy-emacs.de> (message from Andreas =?windows-1252?Q?R=F6hler?= on Sun, 4 Sep 2016 19:11:31 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:111251 Archived-At: > From: Andreas Röhler > Date: Sun, 4 Sep 2016 19:11:31 +0200 > > >> I am still wondering about the > >> rationale of representing nil as the number one. Does this make sense, > >> or is it useful, in some way? > > Yes. Most commands use the argument as a repeat count, so having it > > default to one makes perfect sense. > > > > There a difference between "p" sending 1 and nil - which is the result > from non-interactive use. "p" is documented as the _numeric_ value of the argument. So it obviously cannot yield nil. > If a function needs a repeat count, it should provide some. That'd mean changes in 90% of commands. Quite silly, I'd say. In any case, the OP asked what was the rationale, and I tried to answer that. Whether or not Emacs should have been designed differently is another argument for another rainy day.