From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: carlmarcos--- via Users list for the GNU Emacs text editor Newsgroups: gmane.emacs.help Subject: Re: Making a function than can only be used interactively Date: Fri, 8 Jul 2022 00:14:28 +0200 (CEST) Message-ID: References: <87pmiljgah.fsf@gnu.org> <875yk8ehp8.fsf@dataswamp.org> Reply-To: carlmarcos@tutanota.com 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="12728"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: Emanuel Berg Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jul 08 00:15:49 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 1o9Zml-000337-19 for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 08 Jul 2022 00:15:47 +0200 Original-Received: from localhost ([::1]:40284 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o9Zmj-0008N6-IB for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 07 Jul 2022 18:15:45 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35094) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o9ZlY-0008Mx-Vn for help-gnu-emacs@gnu.org; Thu, 07 Jul 2022 18:14:33 -0400 Original-Received: from w1.tutanota.de ([81.3.6.162]:46534) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o9ZlX-0003ls-0g for help-gnu-emacs@gnu.org; Thu, 07 Jul 2022 18:14:32 -0400 Original-Received: from w3.tutanota.de (unknown [192.168.1.164]) by w1.tutanota.de (Postfix) with ESMTP id 01622FA02C2; Thu, 7 Jul 2022 22:14:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1657232068; s=s1; d=tutanota.com; h=From:From:To:To:Subject:Subject:Content-Description:Content-ID:Content-Type:Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:In-Reply-To:In-Reply-To:MIME-Version:MIME-Version:Message-ID:Message-ID:Reply-To:References:References:Sender; bh=XgfOC22wNaQMzf2nhkCLz4L4KXW1D+mS/I/dpu3t0qU=; b=3ZETi3aSyo/gybUOY5etoph5X+WQTtlFFH37Roz3YaKHIqPH1urlhO2j159Ps8lV 5FwYUkNxg5tnDl5Twit4cxN6YZIC3h1XU224D7g3c2J/b8JdCt99FKuEPGwXKazm9q6 i9xorfu+CWX4TqzQdqcCbGacbfXK3yIW5iedoPOQOkNtEzAQ0KblOoqdFLr/7FWTFBZ eoddfkluUGumXTCzfByoE4aPDzxqjZRexANIQ+fT27kyAlfrh/+MMxJAYp0CSh7hjDY wK9ZV0lAxbqZ7lYCunJFCD3d41tTMk1hNthVecr3mDglo2irnveI+AqEb04aTRmpRbV ZENCRpJ0PQ== In-Reply-To: <875yk8ehp8.fsf@dataswamp.org> Received-SPF: pass client-ip=81.3.6.162; envelope-from=carlmarcos@tutanota.com; helo=w1.tutanota.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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:138370 Archived-At: --=20 Sent with Tutanota, enjoy secure & ad-free emails.=20 Jul 7, 2022, 21:28 by incal@dataswamp.org: > carlmarcos--- via Users list for the GNU Emacs text editor wrote: > >>> A word such as "interactive" has different meanings. >>> >> >> What different meanings? >> > > So interactive/non-interactive 101 ... > > M-x - that's interactive > > Keystroke - interactive! > > "interactive" means (interactive "nX: \n") is used to assign > the argument values to the formal parameters. > > Compare "from Lisp" or non-interactive use which looks like > this: > > (from-lisp x) - non-interactive, i.e. (interactive "...") > isn't used, but you see that x is provided so no worries. > > A function that is interactive is also called a command! > > That's all I know ... what more do you want? > I want to know a few specific things.=C2=A0 If I want to use the prefix arg= ument, I should include a variable in the argument list, right?=C2=A0 Let us call the variable "pre= fix".=C2=A0 Now, should the prefix be=C2=A0 mandatory or optional?=C2=A0 Should it always be the first argume= nt?=C2=A0=20 (defun funname (prefix arg-a arg-b) =C2=A0 "docstring" =C2=A0 (interactive "P\ns Name:\n s City") =C2=A0 (message "executed funname")) > You gotta give me more and more > Cuz you're the girl that I adore > --Zodiac Evermore, Netherlands 1996 > https://dataswamp.org/~incal/vidz/evermore-kate.mp4 > > --=20 > underground experts united > https://dataswamp.org/~incal >