From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help Subject: Re: Making a function than can only be used interactively Date: Mon, 04 Jul 2022 16:35:47 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23371"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: tsdh@gnu.org, help-gnu-emacs@gnu.org To: Christopher Dimech Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jul 04 22:36:40 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 1o8SoC-0005sk-3w for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 04 Jul 2022 22:36:40 +0200 Original-Received: from localhost ([::1]:46582 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o8SoA-0001Db-RT for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 04 Jul 2022 16:36:38 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51774) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o8Snf-0001Cl-8r for help-gnu-emacs@gnu.org; Mon, 04 Jul 2022 16:36:08 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:36611) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o8SnZ-0006I9-Np; Mon, 04 Jul 2022 16:36:06 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id C841880389; Mon, 4 Jul 2022 16:35:59 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 34AD48054F; Mon, 4 Jul 2022 16:35:54 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1656966954; bh=AiMeMgWRl6Rc8NAUs/sSZOYLhuZPnN/yVXmPNpK3WlM=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=El/uXAgNNhdjU3x2GQcRIqbc1MEK9FVePSRNDnmvyvUhq2Af6DNmKT8pPQY6M5/Ss OSl3XWiBEDXeE0P7rC8XvQkoHPHt4pT/o53L+zqjNV49uSfOpbFY7jyLraBR2snp0s CwNjie9yzGebAAsMbmluM7oKOlSua38uBSAum6MEYImPMtlk0F+uAY6TRbymXnanYf TGKca6ciySNskFzNzro/3euOvs8lGmZ8iXsWRSAzGXBDJfNXKzyOQaQm+ZrxazZq20 x/GMdYm4H0WnaPLohV+ODEoVgVwLgODxCc8dAgbQISRnPX8sTfGOcdDm7h7WOeuxSa DKPusIO8UBnLQ== Original-Received: from alfajor (unknown [45.72.196.165]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id D0897120313; Mon, 4 Jul 2022 16:35:53 -0400 (EDT) In-Reply-To: (Christopher Dimech's message of "Mon, 4 Jul 2022 22:10:36 +0200") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, 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:138296 Archived-At: > I could envisage a situation where someone wants to concentrate on the > interactive parts, if taking care of non-interactive use would make the > 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 somewhat > 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