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: Wed, 6 Jul 2022 22:00:01 +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="10086"; 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 Wed Jul 06 22:04:38 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 1o9BGI-0002QM-7K for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 06 Jul 2022 22:04:38 +0200 Original-Received: from localhost ([::1]:33160 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o9BGG-0003CV-9q for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 06 Jul 2022 16:04:37 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34584) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o9BCb-0003AZ-FG for help-gnu-emacs@gnu.org; Wed, 06 Jul 2022 16:00:49 -0400 Original-Received: from mout.gmx.net ([212.227.17.21]:54121) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o9BCV-0007WM-V7; Wed, 06 Jul 2022 16:00:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1657137601; bh=XaBGCFk6GUOdW5g/4CcB7U0GEzuGrnFT+QW/iRjHNs8=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=dOi+FZ7oepHEkaQImr663pSjv+ykqi7PwdZS0CRUJKy10fHSwvZZrtXJsUV3X4RR0 1m05axbVv3NdURpUzT4BIagFsb7Meddw3PPZzjipydedNRXoxAU7/LzARjpnAJPzHp e4r58z9mor/kkeYfRZM/xoLP7VTJxpFteMABjN8E= 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); Wed, 6 Jul 2022 22:00:01 +0200 Importance: normal Sensitivity: Normal In-Reply-To: X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:WLc2UJVf/xledb1jHJqx2ZZZTCtuofDM/uUzcvEtPBjkyT/yoQfps1UQOVDW/LPyXXDhV 1n1i7B/ePJRNStyQTomYimZNSrQfzbZ1CYg+fj51fPvu7mNpqrX4DRkoQ75TKPvWbtxm0m//ZZIt WNsDhy2JIVuX5FjO0TIUYp4hCrDi62JhCmzSCXQf8IfD5eAi1+/itmPvj7jm0fklBKlzfHRgSshP 0mGfjpBxqVnX+x3jiyf/RmMlQAKnvv2pDbDBCyL01ronNPTW+cnZleVqNccmst+VVqifIyD0u3Wd Bw= X-UI-Out-Filterresults: notjunk:1;V03:K0:klBQOn266i4=:xzSUNXdyfUYYf7xdTxDtaL 7hueRGSNDfuYV4tfqgsMVYbFz3tw9q4JvA+HeEf145/MGPVsegAharVXbJT198itIjAPJBprj zSqrk3kc2WdIDf4tvggsURh+osM32j7dYRbh6QCYi0oOIdwkiVSfnoGq1UlHi+l9PkKY52mbw Kt6iDxC2ptZ94P823JJSb7icazw+qBBrIeahn8JkuPS2EKlodDLRSSMb6zqzvrWVWIxiUNOeI fKSb4WdOf/c/8JFdD/hCtd40vc6N7BxfC4WXpNDtf7bIWyd/yksiJN1mCZ3LZnrJKRIVU3I+y Nr4NMcRK9UXTBLRNntLM+Hg6PF2heqhN5Ilj3Ty9KZ+L8Ri5IPFxiReKwQpfZWwy+CLd2U0Yc /82B96S157gIJhwly64Ja5eFDF2svtRx/j3TyZgTgUc9uReCZ606Z9UNLaiRPbXNjME8Cw8M/ GgIpzKKYAmJlkQm+B5/TC2tZGij3GpRHb47Gf5Hh5i7vskn/Yiu7QpGkm1wN+27G/tzmX7MAZ h1FXxDCgUy4+KHgYoMma+ZBXh8DShe2ALuJTuT29GzVSIO7soL6+ZRO1l/PhFrFVcX4VNIkR/ ZKoaz5ZQzQGTWZ3qv5tDFM1QPzHrz+VCTlntcbUFihZnczIqwJK6fQY2vbic2BVi1SrZindjY Vs67dqjySJ4AGnPWs4aiYB/esXdF08Lyl8RCo6MkWfXW84CzV7+U5A63qw79PoJDxw8AT54x/ WbcFp4fwqlonNGISs1sX5yBniFpHC/mTqKTSrQm6ga8di5Oj4bLRsZQWqzej9G+ud+5jR3GV Received-SPF: pass client-ip=212.227.17.21; 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:138334 Archived-At: > 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-minibuffer` = if you'd also > > like to set values interactively, while calling the function non-inte= ractively=2E=C2=A0 One can > > achieve more or less the same effect with setting values of local var= iables outside > > the interactive expression=2E=C2=A0 In this scenario, running the fun= ction 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 user, > 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 silent > without interactivity=2E >=20 > The above is one specific context where word "interactive" is used as > 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 If one does not mind interactive activities with the minibuffer for a function without the interactive clause=2E =20 > Remember, there are 2 different contexts=2E One does not exclude the oth= er=2E >=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/ >=20 >