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: Mon, 4 Jul 2022 13:43:54 +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="37500"; mail-complaints-to="usenet@ciao.gmane.io" Cc: carlmarcos@tutanota.com, Stefan Monnier , help-gnu-emacs@gnu.org To: Tassilo Horn Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jul 04 13:45:09 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 1o8KVo-0009aa-Mm for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 04 Jul 2022 13:45:08 +0200 Original-Received: from localhost ([::1]:39008 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o8KVm-0002Jk-Ut for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 04 Jul 2022 07:45:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42000) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o8KUy-0002Fd-7g for help-gnu-emacs@gnu.org; Mon, 04 Jul 2022 07:44:16 -0400 Original-Received: from mout.gmx.net ([212.227.15.15]:37299) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o8KUj-0001s8-0u; Mon, 04 Jul 2022 07:44:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1656935034; bh=fAEC6bfa8cJS4ObbRGAx+pHYu9WIgDojKPiIX8ABB7c=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=U3MjU8rV/6RwznQcebcJzasuw/bN+wf+blagKlKxQ5qx/yr22/cyyjjFU1se+iZAD HnooSLkuQUYuA0EFgIaFpFUeDHfUST1Bbau3Sz8LtUv0fwKFqUDs8I0fBp4ZexakGD ZxywIbXR689rIQcUKfK55+2Jp+Llc44TFx7OmXUo= 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-bs02.server.lan [172.19.170.129]) (via HTTP); Mon, 4 Jul 2022 13:43:54 +0200 Importance: normal Sensitivity: Normal In-Reply-To: <87pmiljgah.fsf@gnu.org> X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:mYXG8aQc2pz97XZeSQapvsac04i0wT+2NVuC/lvRVtlpTqzyJKA9agU5lf9nLp7qZUBaU UsCbUJP16VTIwP6hwwjm2I9DUiHXc1kX8P3uWciVbmiu4EKSqqBMXPz1O0+evaaXFxWeDYQcnUqW wWTEIuMdbQYB9ZogNJ1QWi29jjZwR6qJm5Qd980kfAUXqWvk+a5WS4pzw9vL7VG6Z4m2e6U6y8yO FUhVnp1lnzdPe/9qxOIR4kbdSfodCSBgeYSiw0Yd6gyXmRdDn21/B12ySJIPkz8/YHqXX6OQAZdo Ro= X-UI-Out-Filterresults: notjunk:1;V03:K0:Es1CsA4JEkM=:vn4dLD4bk+LogFDPr563Eh lV2h8x9zS9FYT3dwwSgx5+pcfQxZJXO6Uw+NQBr8X02YtL+VRhdxhLQqd67OJrAxHfR+Wu06d 1THF9vrxQuXHkdoSzBSDeURhU7qvkNyDwvo++odM8/UsP9985kW/UasraFO0c1XthjwaNOcrT NIfJBbRtb2bwd/L5bjaGbn8I+CsH7aJ+qM7KKZgqU76tT51FhKFLSP6e7CDVVyYV//8JGSGyC 367idHeUb2nnvgUHivmgwr8hWnqq9mMITRW+5snLuFXY4878RKTmc4rbxbtiC1GtxSzkdqR0c EDyCSyk/Fhpwo2i67a23NJn02Jltn59mP2Pq7yygn1HPQM9MA4BcO7uWgFFgB7qxDskzsaVOK al7ojMBFRdzyoJOmEQ1/8gOjutMpDfPezzoG1kB8nhKRxzSyw/8/psPv8ep2KLN0oOYPlht1X 9d5kM6Ix4n8hRWU7ET/bCWMYOoH6ScwZhnsiDICgZGqiDR8DSFaqwdNkl27wUKA1uMUhYSFhD RkgAZfBf30dIhiXxk0SAx84q+/wRx4fpg/c4wiKopv4ByqIBkWu66NLl0lCTAktD0lSAUTz2j +/2LMH/3pFVDQkk119jflO2VIEMt/r8r0qUWrlg5bN5jIb7xs59+AuatOBqleX6S4Q5SSzFZr OxidrhqWS/mL/oVv1w/Wvpi0xkMCZBGCs6EjgGLlhv/3jCrCTBzBJpcdLLlaiPTdDeFnG+riW U8jp0XO9EgTOY9vc7vgQnHw68RllJhoAb9xw9ARGvSBD7eefGl32NbnaQqPdyhwutK74BgO+ Received-SPF: pass client-ip=212.227.15.15; envelope-from=dimech@gmx.com; helo=mout.gmx.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=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:138288 Archived-At: > Sent: Monday, July 04, 2022 at 10:55 PM > From: "Tassilo Horn" > To: carlmarcos@tutanota=2Ecom > Cc: "Stefan Monnier" , 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 writes: >=20 > >>> Yet when I do `(arktika-workbench)` in my init file, the interactive > >>> function `arktika-workbench` still gets executed=2E > >> > >> Why wouldn't it? As I said the `interactive-only` declaration only > >> causes the byte-compiler (and hence flymake) to warn about > >> non-interactive uses of the function=2E > >> > > Have also done a simpler function=20 > > > > (defun test () > > =C2=A0 "TODO" > > =C2=A0 (declare (interactive-only arktika-automated-workbench)) > > =C2=A0 (interactive) > > =C2=A0 (message "*** test") ) > > > > (test) > > > > Loading emacs I can see that the string "*** test" is being printed=2E= =C2=A0 > > I am using Emacs 27=2E2=2E >=20 > Sure, the function will be executed=2E As Stefan said, the only effect = of > the declare spec is that byte-compiling the file will cause a warning > that `test' is only meant for interactive use=2E >=20 > Bye, > Tassilo >=20 "interactive-only" should go far beyond a byte-compilation warning=2E I suggest that "interactive-only" does actually make the function work in an interactive-only way=2E That would be much more useful, particularl= y to users writing their own functions=2E Currently the "interactive-only" leads to quite some confusion=2E