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 23:40:15 +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="39685"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Tassilo Horn , carlmarcos@tutanota.com, help-gnu-emacs@gnu.org To: Stefan Monnier Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jul 04 23:41:06 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 1o8ToX-000AA5-V4 for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 04 Jul 2022 23:41:05 +0200 Original-Received: from localhost ([::1]:34292 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o8ToW-0000jf-QF for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 04 Jul 2022 17:41:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60438) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o8Tnq-0000aE-Dh for help-gnu-emacs@gnu.org; Mon, 04 Jul 2022 17:40:22 -0400 Original-Received: from mout.gmx.net ([212.227.17.20]:42569) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o8Tno-0006md-HH; Mon, 04 Jul 2022 17:40:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1656970815; bh=su4m5TXNR79Ay6e0Zu6BuS8eYnhA+3z8p/IuziMrN3k=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=P83RGp0Ti/3ZhhTvtCqyVqVN/4mSk1gz78lo9lmWqU3a6aWkatx/sydnS/85ZOkKg 6oRyZuJjzmwrONOkzSQEfu1kZTG7Ixk9im2s3eS6rfKDeCqY1HzCPSBMBLEpx6SDDu 8gWSgJMu8+OKqTI0q8a16c5KnWJZiNFjIKOYd/Wc= 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-bs07.server.lan [172.19.170.175]) (via HTTP); Mon, 4 Jul 2022 23:40:15 +0200 Importance: normal Sensitivity: Normal In-Reply-To: X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:/ulvExMmCtSuI6KLKG7Oiuk9j/KERCDmzt3rFft/HLAY1eI+ZHNrdfj5dPq99iO7k6uKB LJyEPQmsPfx8KeChNgu/NNUQc8kmBQH4DtyrbaEVGzAp/7VNuo/2flodCToYT/NiGvErwSfy0psN LXzcTepOwFL8VIyvSIzJULnYGRBbrJq/deKGlrSmAwcd1GH2qUx8Q3JKNDUvBB+Cb25oenvdSN7V 2SaCfAdnjohJch96mOwflLy4LYaouBhbeudBYtiPLGHZIxVknbWFwI8ZH+8rue3unGu4Cx9dP1oo /Q= X-UI-Out-Filterresults: notjunk:1;V03:K0:f/on6luv51g=:hntKLMPqMxz9xGdRuEPBQN 8BR1w3ZLXyP+D/m8BqiOK0U/r6NHfyWqLxPds4LXthDjPSSa5zQumJqJqh3/dm+k6OeZ4SlBd dC+kc8+eNkmf8hd+RRBfXVzXAxrygMM3iyH3ttn65BBLBvFgQJ+OvlzHyEokWVp6+HvLlO3vD bwBdRYmevGhnCqVI7PIsru6XR1zZ1QiW5VV8A6s6Ces4PZy4lrYZD6zfANdAQRpAmWNHzA1To JS9jxx3uTAcQk4/l7Q4iuKk+0C3m5rNDofBQVPQTcaAVMD1/U4w6U82r4IMXVHZF01YOaYLks Gx16fny+TgZjER+mSBJ2gf9Nw7RQZV4pZymcZjXZYXmoCe6JfH8MjWsBkWM1s2jP7XxNYE5ZW 79R1nxcudSrJEdL1Qb6YCWMK03jwgYxSMpyQff7FwFymthhWC+e8ukyNGDO5f4dZyAb6dkWJH QZ2iT62t05nngAQqUtzE+u/1wXczWB7qFd+AFJ2XhyQlOYff1IodVk8ruPEybumvubjFixyAz lRSoNrORHG3C95sE0gHX5raZvXlKMHBzNhRzcLlYdGvvXDT7BOscg7gZHID/hQiJoF7c5+JbQ zIIk3C4GkNKao7bvAnM4RF4EEuhWOGWnpMCpvZO3yLnPoHFKvzdPaZSQeBEE1wdq37U+0VCIf +pNao3SfDmpAeLHSmhs2uY9mWJedHZMc1j6wBoLYW93fsWnUFniN+U1L8nZQtreMGa6Y7x6V2 cqxsBoR9/66jy2iaUpVrRldoURN0TDHnh6wGgrk7BIniDARJYdnEvzQjbAyaSUWT9DYu7Mqm Received-SPF: pass client-ip=212.227.17.20; 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:138302 Archived-At: > Sent: Tuesday, July 05, 2022 at 1:21 AM > From: "Stefan Monnier" > To: "Christopher Dimech" > Cc: "Tassilo Horn" , carlmarcos@tutanota.com, help-gnu-ema= cs@gnu.org > Subject: Re: Making a function than can only be used interactively > > > "interactive-only" should go far beyond a byte-compilation warning. > > > > I suggest that "interactive-only" does actually make the function work > > in an interactive-only way. > > What would be the benefit? > > Stefan There could be no benefit. One sure thing is that there are so many ways = to use the interactive clause, that it is difficult to decide what is good design= and what is bad design. Might be the reason some users think more assistance on its u= se is fundamental to their elisp learning. Mainly because the manual does not include any s= cenarios for good design. Speaking of design. I can see situations when a sequence of interactive c= alls could depend on the specific interactive value supplied through arguments. (defun foo (a b c) (interactive ...) (if (equal a 1) (let* (h (read-from-minibuffer ...)) ... )) ...) Although discouraged, the above could make sense, but completely wrong to = use non-interactively. Perhaps there should be something beyond "An Introduction to Programming i= n Emacs Lisp".