From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: carlmarcos--- via Users list for the GNU Emacs text editor Newsgroups: gmane.emacs.help Subject: Re: Making a function than can only be used interactively Date: Thu, 7 Jul 2022 23:06:50 +0200 (CEST) Message-ID: References: <87pmiljgah.fsf@gnu.org> Reply-To: carlmarcos@tutanota.com Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37842"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Christopher Dimech , Stefan Monnier , Tassilo Horn , help-gnu-emacs@gnu.org To: Jean Louis Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jul 07 23:08:02 2022 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 1o9YjC-0009cS-1f for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 07 Jul 2022 23:08:02 +0200 Original-Received: from localhost ([::1]:59900 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o9YjB-0000qs-2k for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 07 Jul 2022 17:08:01 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51006) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o9Yi9-0000pP-NH for help-gnu-emacs@gnu.org; Thu, 07 Jul 2022 17:06:57 -0400 Original-Received: from w1.tutanota.de ([81.3.6.162]:59012) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o9Yi7-0002kr-DX; Thu, 07 Jul 2022 17:06:57 -0400 Original-Received: from w3.tutanota.de (unknown [192.168.1.164]) by w1.tutanota.de (Postfix) with ESMTP id 0205BFBF660; Thu, 7 Jul 2022 21:06:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1657228010; s=s1; d=tutanota.com; h=From:From:To:To:Subject:Subject:Content-Description:Content-ID:Content-Type:Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:In-Reply-To:In-Reply-To:MIME-Version:MIME-Version:Message-ID:Message-ID:Reply-To:References:References:Sender; bh=vXaEC6/sw1qx4eM9ciJ+XIZzNiwjjS/nxu7k4KA2x5A=; b=1yvr9gxVoloibV/Ace0V3XdWlZwUMfmecvcmbrrE8AdqwsKwxoUWluK/vt5UtIgA To/1JUIKbe5CtS59I6iQLu/PohaZ5sz8Vw7weue7sT4jz5iIerTgM7gfRMPyMfeY1eq 4TSS6G2AxMLQBDRbUDY2mn/oUx69xoBUi3IFtfZGeKYPltVRhEViHfxWZsMPO3qnneO u7EoGlhsaaBjpfuGQVlm/AhlFAE3+EM2zIreiX6nnOh98GvRfac3o0US0eIuDsrt/lH Xdl3gSIT/6vDUJRIlP7ezCksLTwx+/QMb4TKwlcoFzfwfsBPkFGZayhv+AMUW6VvDZw jaVMliBD5g== In-Reply-To: Received-SPF: pass client-ip=81.3.6.162; envelope-from=carlmarcos@tutanota.com; helo=w1.tutanota.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, HTML_MESSAGE=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 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:138368 Archived-At: Jul 6, 2022, 20:29 by bugs@gnu.support: > * Christopher Dimech [2022-07-06 23:00]: > >> >> > Sent: Wednesday, July 06, 2022 at 12:07 PM >> > From: "Jean Louis" >> > To: carlmarcos@tutanota.com >> > Cc: "Stefan Monnier" , "Tassilo Horn" , help-gnu-emacs@gnu.org >> > Subject: Re: Making a function than can only be used interactively >> > >> > * carlmarcos--- via Users list for the GNU Emacs text editor [2022-07-04 22:52]: >> > > Technically, you can use `completing-read` and `read-from-minibuffer= ` if you'd also >> > > like to set values interactively, while calling the function non-in= teractively.=C2=A0 One can >> > > achieve more or less the same effect with setting values of local v= ariables outside >> > > the interactive expression.=C2=A0 In this scenario, running the fun= ction non-interactively would >> > > still force interactive input from the minibuffer. >> > >=20 >> > > I am not sure if in practice that is ever desired. >> >=20 >> > (interactive &optional ARG-DESCRIPTOR &rest MODES) -- this makes the >> > function a command that may be tied to a key, and it helps in >> > specifying the arguments to the function.=20 >> >=20 >> > In this context function may be run as command, or by pressing a >> > key. However, it does not really mean it need to interact with user, >> > not at all. It does not need to ask nothing of the user. In fact, it >> > can just interactively, during Emacs session be called by user with >> > M-x or by using a key. Beyond that, function may remain quite silent >> > without interactivity. >> >=20 >> > The above is one specific context where word "interactive" is used as >> > in function (interactive). >> >=20 >> > It does not exclude the other context that any function without >> > (interactive) may do interactive activities, like ask user >> > interactively for input. >> >> If one does not mind interactive activities with the minibuffer for >> a function without the interactive clause. >> > > 1) That means for me, you did not understand what is interactive > function. Just read docstring.=20 > > 2) Nowhere it says that function without (interactive) cannot > interact with user.=20 > It is a way to pass arguments with user prompt. > Numbers above (1) and (2) are different contexts. A word such as > "interactive" has different meanings.=20 > What different meanings?=C2=A0=20 --=20 > Jean > > Take action in Free Software Foundation campaigns: > https://www.fsf.org/campaigns > > In support of Richard M. Stallman > https://stallmansupport.org/ >