From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Christopher Dimech Newsgroups: gmane.emacs.help Subject: Re: Making a function than can only be used interactively Date: Thu, 7 Jul 2022 13:03:58 +0200 Message-ID: References: <87pmiljgah.fsf@gnu.org> 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="27387"; mail-complaints-to="usenet@ciao.gmane.io" Cc: carlmarcos@tutanota.com, 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 13:06:08 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 1o9PKi-0006vs-Pf for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 07 Jul 2022 13:06:08 +0200 Original-Received: from localhost ([::1]:53110 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o9PKh-0000Gv-JH for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 07 Jul 2022 07:06:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41392) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o9PJI-0000Ep-Ne for help-gnu-emacs@gnu.org; Thu, 07 Jul 2022 07:04:40 -0400 Original-Received: from mout.gmx.net ([212.227.17.22]:54673) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o9PJF-0007NY-8f; Thu, 07 Jul 2022 07:04:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1657191839; bh=J/AA3IqHr/D1R2hfrC2eCecY1o++Q/42YtZYEUupkGQ=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=UyyhmX0cFx2NHFGED3s798Gx3SbjMjFPFK6csL3x8y5ugnlgauE0MX3Ezb0S/GVN1 ZJ+xxYZ0ULTThCyqnBHpEwFH49fJm2bX6B4r5Op0RMkEpAdd8N1m0jEAlwBkJsODDl lckmvIToIexcFe2gzsjLbUHARu6E+XQb4A+JSxK0= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [92.251.127.164] ([92.251.127.164]) by web-mail.gmx.net (3c-app-mailcom-bs15.server.lan [172.19.170.183]) (via HTTP); Thu, 7 Jul 2022 13:03:58 +0200 Importance: normal Sensitivity: Normal In-Reply-To: X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:ItmoxhR6DLoNhowE1khZaN/heF7U73T6V4nnQZCqSsajdXvJHDVQTH1lPQLdivjGnt25v fZT9oudxyapsM6Karkzd0hd7bfOx3OxKh5pvGUaQjFgQCFjNsljbV4ks+Mp5IxAG6Jv0N5SoR2Wm s3b+2dmUg5sWd0AqBymTw9ISFZmlsQLO5a/8L4jgoxoxhPoku2V3E/80teshrrMdsFpU2bizFHnD 8HFN8wZrFgu/RAm+amaWcl2SeDVUPDXtBGqgnESk129YoVAD6FcX83ZGZzTUvLBaUvaDHc+0jhaW N8= X-UI-Out-Filterresults: notjunk:1;V03:K0:BHuUpjibH7s=:bRhRw9tTjgnZJOcq7Ec5Jj KY8FzqKteiQERMzGcNLU7sXlsCWb3tKmRpz4f5uqYLY8PVsqvZWE/AE3CTY7ASxayvFlYT+2G T/AFkP/sR6lljIfcoo5O5xaVl3jmF86CkS2qEZAkDy9LYZRGAaWOZWR4UA46z+t0jP6eStYVx +UNqP8DbGwATRCvytR6nPdcKCnCaN4p69IFc8aSzYEeHIllCcXy6xHpqDqIO9E9iDsTaJeZCI DIVghtSnfCw6tVmex+r28QA9hA/jWfYKsy0mfemDBWUOzlAfRhk4chX4VE4ajYTSvJEMNulTr yA+MerNvNZ8Mz09q6A7+XLyoSf3AeWdj5pA1J6/JnERnJgvZMkUrWQUo1HU0Kdz8XgFPFV0Z1 kyV2Rg2occPWsN+8hgo/FEEJIns589iX69qj2PbKhXbfbHxO9ScypMNGZEimSYp67Oq0Kc4AL m/qB2KwOOPn+s+pFQcozPuuv7GT9y7itm/C7ofZOLDU3q88Z3Ebn6k0GuRBS5C18toYoOPGph xWUse9Gmx8WGaiyl/5HL8Rh9sdeud+QaWCOYbmj9/S+armVn0rNJMCo6U6IHYw3Rk5yoh1o+1 Ra2/Oz9mL3AsBE5n1b+M975osa/noG6LauS7x+f0Y4XtUwboEs56JrUrAt6AWNzRK9sNCXsdk 1gD2aoLouykxoW0rvxruJK98VW2MfzyUtqTs+SZthve2bcEUBp1K+5FJrVTYeLPBAjVQteS/6 DcDoBe8guNdHDrIGEa/feRQFPI90bcb4jK13y6/b36fW6MowroVxAcVRexy+TBKHPJHE8MyX Received-SPF: pass client-ip=212.227.17.22; envelope-from=dimech@gmx.com; helo=mout.gmx.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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:138340 Archived-At: > Sent: Thursday, July 07, 2022 at 8:29 AM > From: "Jean Louis" > To: "Christopher Dimech" > Cc: carlmarcos@tutanota=2Ecom, "Stefan Monnier" , "Tassilo Horn" , help-gnu-emacs@gnu=2Eorg > Subject: Re: Making a function than can only be used interactively > > * Christopher Dimech [2022-07-06 23:00]: > >=20 > > > Sent: Wednesday, July 06, 2022 at 12:07 PM > > > From: "Jean Louis" > > > To: carlmarcos@tutanota=2Ecom > > > Cc: "Stefan Monnier" , "Tassilo Horn" = , help-gnu-emacs@gnu=2Eorg > > > 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-minibuff= er` if you'd also > > > > like to set values interactively, while calling the function non-= interactively=2E=C2=A0 One can > > > > achieve more or less the same effect with setting values of local= variables outside > > > > the interactive expression=2E=C2=A0 In this scenario, running the= function non-interactively would > > > > still force interactive input from the minibuffer=2E > > > >=20 > > > > I am not sure if in practice that is ever desired=2E > > >=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=2E=20 > > >=20 > > > In this context function may be run as command, or by pressing a > > > key=2E However, it does not really mean it need to interact with use= r, > > > not at all=2E It does not need to ask nothing of the user=2E In fact= , it > > > can just interactively, during Emacs session be called by user with > > > M-x or by using a key=2E Beyond that, function may remain quite sile= nt > > > without interactivity=2E > > >=20 > > > The above is one specific context where word "interactive" is used a= s > > > in function (interactive)=2E > > >=20 > > > It does not exclude the other context that any function without > > > (interactive) may do interactive activities, like ask user > > > interactively for input=2E > >=20 > > If one does not mind interactive activities with the minibuffer for > > a function without the interactive clause=2E >=20 > 1) That means for me, you did not understand what is interactive > function=2E Just read docstring=2E=20 >=20 > 2) Nowhere it says that function without (interactive) cannot > interact with user=2E=20 It is a way to pass arguments with user prompt=2E =20 > Numbers above (1) and (2) are different contexts=2E A word such as > "interactive" has different meanings=2E=20 What different meanings? =20 =20 > --=20 > Jean >=20 > Take action in Free Software Foundation campaigns: > https://www=2Efsf=2Eorg/campaigns >=20 > In support of Richard M=2E Stallman > https://stallmansupport=2Eorg/ >