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 22:46:18 +0200 Message-ID: References: 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="30578"; mail-complaints-to="usenet@ciao.gmane.io" Cc: tsdh@gnu.org, 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 22:47:12 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 1o8SyN-0007kz-N8 for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 04 Jul 2022 22:47:11 +0200 Original-Received: from localhost ([::1]:51116 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o8SyM-0005Ar-D0 for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 04 Jul 2022 16:47:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53118) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o8Sxd-0005Ai-Q3 for help-gnu-emacs@gnu.org; Mon, 04 Jul 2022 16:46:25 -0400 Original-Received: from mout.gmx.net ([212.227.17.22]:57263) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o8Sxb-0007m1-0V; Mon, 04 Jul 2022 16:46:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1656967578; bh=y1K6vEkq9gVlkd4qyY8Dh/ehvNDMvl4y02f6+ZkBru8=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=EZrMF9KrLlDC2QiYGox6mb7KDQ37u4/37xFuwDSdDJ282QXpMbtn7zFanciumT3/+ xz2OGveQB+iuqhR4a9lFgbNfg9Gpf+UsbEcUkgqJIUbBQy9kkozQORYHm1txesFYb8 V8vH32QYQ5WVPh8/yzbJy2yDoY/yPyPeZir+K7K4= 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 22:46:18 +0200 Importance: normal Sensitivity: Normal In-Reply-To: X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:+MLKkuMYS08R9dUWluVTHDnZVtwXlmKroNjrV71XOAiKQLCKERBUH3aHyATV0ynCV3F3w 8kUrJhrxF2B//ShQnEknym623I9qSb4Mvq52JNr56jsFquwQI4m5a70QA5vIR4o2jUxhoGNPwgtV i/GIOt04pnlVKKR5cx/rDzipdD7eAun+PNNtLu5s8wpi9+5qKO644sQM+N4H5XGdpgNztHxfxlZ0 BhrWUykMOHKo1j/LHgPZbyxpvHKl0rnVqRtxZDPPqVw/jL5pqvzlxOEOw2q0/mzpXXkIRqas907X +4= X-UI-Out-Filterresults: notjunk:1;V03:K0:n+AnAQLtUBA=:9KjGbClscZ82oq+DKj/uio l7oXMtLOQP1Vd1qf763A3Pf9mu1PZSjKOK2w7db1hYAYI5+tWeTDFr73ONp/eJ0s0qrzsMySv DsxZsUkIVbt8BXB9iRyREY+ltpufb2jNnmlqXkIeO907UTvxbmnPoAbW9ZU5UIaXVJmeMtWbs rHRV7JhVqblF/ghZ80ujbbaU0/OAb/25IB4QDx1gdqRG2QiPd/KItpVlYobTNHmqhV5ZoDxTP dRoak6aGKmhuTs4QIXIfSBgcZ8zEBKt2eO+JRqOlwvCl7j5HAGV7+toFb0bslQnnBruLblUDT taGVkCAn4XR1jZHKrzf3n9SRrtCchI6DwW1dW+Z1bQFK9CEjxbhEZaX6k2WET/FdFpK8WJcq9 TYxdp2bZNHIXatUuVXF4yqkidhr2UoGp2LIiWwX7Vb5N7XVUnYXxAFnlhFX4+bmA6dBKlzrIo cXwRjITOglyPejBeP2zpnBLir0L2KSjt2LV8L3CNs+lomP1xB7degNFN6VV4Yl0pqG2vw5UvC avNRIacR5/lZyvRbljeg5EDBd8yOesaJDCW90Zw4BUgJudtRa3BMGObVmggPUIehZywGkGDaS /5Yfq8kAcddij9o/MWsgCNo5g6Cp4kH5jIg4quWVNurRqPVmYXt1kP93JN9Cib0Y2wv3a/VgK pZ6/bNR4wyO/SGllpyWNvd6uPNdwwS5/6qCndNt4eN6UQwc+v6FMjazHrlP1WV0vHdrTTNQ/8 SKxt6QXFRVx93FbugXQDHKQlJDSyKUJVR+B5n4K7Reof1Rjr61A05tpi5onxGShQJqcLOdBo 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:138298 Archived-At: > Sent: Tuesday, July 05, 2022 at 8:35 AM > From: "Stefan Monnier" > To: "Christopher Dimech" > Cc: tsdh@gnu.org, help-gnu-emacs@gnu.org > Subject: Re: Making a function than can only be used interactively > > > I could envisage a situation where someone wants to concentrate on the > > interactive parts, if taking care of non-interactive use would make th= e > > function difficult to maintain. I am not sure that it will always be > > because of bad design. > > Indeed, we have many such functions which have been designed > specifically for interactive use and the non-interactive use case has > simply not been considered. It's not bad design. > > And it doesn't require us to make it impossible to call those functions > non-interactively. > > > I also say that it would be better to have declarations that are somew= hat > > safer for the general elisp user as well. > > Not sure what you mean. Are you saying that (declare (interactive-only = )) > is not safe enough? Can you expand on that? > > > Stefan > Another debate is that although one can declare a non-interactive function= , and an interactive function that can run non-interactively; there is no construct that can define a purely interactive function. Does a function know whether it was run from lisp code or from the user in an emacs session?