From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Joost Kremers Newsgroups: gmane.emacs.help Subject: Re: Emacs Interactive functions with arguments Date: Fri, 09 Oct 2020 22:10:44 +0200 Message-ID: <87blhbyxbv.fsf@fastmail.fm> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22246"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.5.5; emacs 27.1.50 Cc: help-gnu-emacs@gnu.org To: Christopher Dimech Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Oct 09 22:19:39 2020 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kQyrb-0005jE-0P for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 09 Oct 2020 22:19:39 +0200 Original-Received: from localhost ([::1]:59880 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kQyra-0001yT-22 for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 09 Oct 2020 16:19:38 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58898) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kQyj9-0003Om-8q for help-gnu-emacs@gnu.org; Fri, 09 Oct 2020 16:10:56 -0400 Original-Received: from wout2-smtp.messagingengine.com ([64.147.123.25]:39215) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kQyj6-0007sC-AO for help-gnu-emacs@gnu.org; Fri, 09 Oct 2020 16:10:54 -0400 Original-Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 167E07A2; Fri, 9 Oct 2020 16:10:49 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Fri, 09 Oct 2020 16:10:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.fm; h= references:from:to:cc:subject:in-reply-to:date:message-id :mime-version:content-type; s=fm1; bh=GRIxLswnDLS9YqZDolAYshYjfm nVLIJl3bb2JA1QKJc=; b=qvYU2aLJ0Z4WNfKJWwyIbRvD6cJEsPxEA0OWEH482d Fi7kOGmokWGA727q/sszPHVGkMnn2CwEgLHGe5diN/VCexyCOdhQEBXveIRSc/7e qQ3YBr7R0p4nCfoHO138G/C1NYm2Ob3+9I63FBByX3p9ogZb19AP5DkvH52yl0ja IIhXmHBedRwh4HHR2ib2bkODTIOFOzcFnEhNGfgd+G+K9F/DHthnzgvo0ZoUB/iJ n4ce1l1O1svFZ4/MSZwlv5phWszJmdCcFf8HlDUyonUqM+oB2sO559jPKnlxUO0O qSQNx+L87jFmUpmkW7uVTtJPVRX8EFWXp51E6IekqiiQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=GRIxLs wnDLS9YqZDolAYshYjfmnVLIJl3bb2JA1QKJc=; b=VoCGJ3CDcxw1PBNve+xt9w GYTJwIvkKozG3Ke/XUwv/1U2Pvq7jUKJUXjk7qGhr3sr3DVCG9oBiqm4g/9m8fZi ku5yDUksfmRCJ710Gq5eLMLzicNjTo3LwXGfCwE+8cc6EtzSXXGLQOsytZOKNku8 hxYTSaILOU9TEBXSMiY2cdlYOqk4OjlIhIVm36A9njHnxyzm3FMfa++UhtKLAPtW WP99P8SwAOxaI1jcPEnRrP9GXmPyPFz6NbQrVbV/ip1/hSzyHX6N/TkZzl2ARpnC IgDt0a1lwx1ilLGeoo+qvc6YW1XXADe5QhWw9K/kK199cnur0BApu/JloMUIDk9Q == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrhedugddugeekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfhgfhffvufgjfffkgggtsehttdertddtredtnecuhfhrohhmpeflohhoshht ucfmrhgvmhgvrhhsuceojhhoohhsthhkrhgvmhgvrhhssehfrghsthhmrghilhdrfhhmqe enucggtffrrghtthgvrhhnpefhudffuefhudelhffgleeukeegudevtedtudduhfefteeu gedvvedtuddugffffeenucfkphepleehrdeltddrvddvgedrvddugeenucevlhhushhtvg hrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehjohhoshhtkhhrvghmvghr shesfhgrshhtmhgrihhlrdhfmh X-ME-Proxy: Original-Received: from Swift.fastmail.com (ip5f5ae0d6.dynamic.kabel-deutschland.de [95.90.224.214]) by mail.messagingengine.com (Postfix) with ESMTPA id 0240C3064682; Fri, 9 Oct 2020 16:10:47 -0400 (EDT) In-reply-to: Received-SPF: pass client-ip=64.147.123.25; envelope-from=joostkremers@fastmail.fm; helo=wout2-smtp.messagingengine.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/09 15:54:36 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:124404 Archived-At: On Fri, Oct 09 2020, Christopher Dimech wrote: [snip] The interactive codes "n" and "N" both return a number. "n" *always* reads a number in the minibuffer, so any prefix argument the user types is ignored. "N" returns the prefix argument as a number, but will ask for a number in the minibuffer if there is no prefix argument. "p" OTOH always returns the prefix argument as a number, even if the user didn't type one. (In that case, the value is 1). > Besides general comments, I have some specific question. > (1) The two constructs (interactive "p") and (interactive "pMessage: ") > are valid, but are they equivalent? "p" doesn't take a prompt, because it never asks for input through the minibuffer. So if you provide a prompt, it is simply ignored. > (2) How is (interactive "p") different from (interactive "N"). > They both represent numeric arguments, but what is different? "p" never asks for a number in the minibufffer, "N" does, if necessary. -- Joost Kremers Life has its moments