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: Fri, 8 Jul 2022 18:14:58 +0200 Message-ID: References: <87pmiljgah.fsf@gnu.org> <875yk8ehp8.fsf@dataswamp.org> <87bku0ce1f.fsf@dataswamp.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="8770"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs To: Yuri Khan Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jul 08 18:23:46 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 1o9qle-0002BN-Bp for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 08 Jul 2022 18:23:46 +0200 Original-Received: from localhost ([::1]:43526 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o9qld-0002Er-Bm for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 08 Jul 2022 12:23:45 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50348) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o9qdE-0007eI-6p for help-gnu-emacs@gnu.org; Fri, 08 Jul 2022 12:15:08 -0400 Original-Received: from mout.gmx.net ([212.227.15.15]:33287) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o9qdB-0006y7-LQ for help-gnu-emacs@gnu.org; Fri, 08 Jul 2022 12:15:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1657296898; bh=/2MhHhbJqm3ZOLwOADS/49a8RJmctEb3In/gZFzSlV4=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=OGyzw0A6x+1rxXMv7AjE2ZGzThyYaNBPvv7A1cRKjo7fTxg2sQZ8DhbuTzFHh/o6u uaTq8GvlHJv2bbOeMxt9dJKTB4UUeA2v4Z6QAl5BYUf7NdPkxV7VLJz0tBA0i8xjrN Ahb8/P3wjbpNR6S70w7M5XOOAQDWtDMGMQnHOJ+M= 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-bs14.server.lan [172.19.170.182]) (via HTTP); Fri, 8 Jul 2022 18:14:58 +0200 Importance: normal Sensitivity: Normal In-Reply-To: X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:SPL4UHfp6m3KrMqga3BFQ3WwqhkTQLHRo6OsOUdSrdnlqEGfJA+ZSYS3HD+nSQrygmlWH BH3+mVhz0/hU8QqsORKEUG9ptTlr8jNzNhUFrpM+arD85jjZNGOsY+69sHgiaUkl5WYdKjeVIzHP 5bxieOH9crokVsp+sPk1FieazKhXU7QqQBHUyJmQLl/9kh6SitMUx/0sd2+20SSVC+xZk2cx3qBD uoYQuplFq/9sEFIh+zbUhHtGWYP2NEL9tgETn07ViH6elyN3znOj0697aaof2tO+5rtboneyUovU xU= X-UI-Out-Filterresults: notjunk:1;V03:K0:Mi3cGzdvEVA=:FJ4maqXiWOiBEFNq2zooB8 BRnpX2EeUYv+D7218Nf/5GbNaBfck55QSEJcJbRHuKoDZZz3OwcmYgsSzzCW9f+YXARGvyuOJ ti6dGsmTPVpA5hYxTv++Rmz/8Lw3IDiWdUXXjmANcdvIt8Btr1c4QjopvY35KQAiaYmi53TAQ 4evIH8ECdmg3R4q5BJW6wnKNiDgcX8KJkCNzXoRa5ztx5EPgq0ydvoXXVe0sxVBkUzt6sl+4b xbdGvj3P9Nb5zvb2EZ+lsiTTW015yVyZIPEEMaZMmSHXmttsQCXT80nj3tKb2hX/sXv85D/3e jlVGPL7NtOIiRVtD4ydcAcIg7UyqhtOo+tCfmky9K29yJzhBprmZ7exNO4DYxP1s0yY7O34pf tjlqzl/dEPs50XTpFpWwElZ55FxhVHO6nZu4Je460ksEvvzSVpfiff12wUTd3hANg5z1px6Qa rQgKg+5LpZCpp+VOfX7o9+uM3rw0R3CyN719woG44c2uhiHdrihd5PRCHxE+yITiRCq5sLsjb onr2NeyFREfTOPXBupHvTDtGqV5t2HFyF+Itv5PJ5jnIuE1XFxOvzFkcab3JjWPlBMbVnOOTx 2BZAmkWe+rZIDba5R4Dtb940gE5s4Up0dcAKY/GFnQNJdoObPXv1jdGAqgWqNWXifuOaKcqMz mYpALbua37rsuQNxqePfsPyjTESmpOwhg63qeAoanzoUO7duA5joDYyuD84+GW7jbZDJ9jD1g ydsJMXvdETqhvdq6IknjPOkwUqiCrSHMsJqrbj4vmMyXHSDR+rQ8bxLFmG2wnaYGpOHB/fjd Received-SPF: pass client-ip=212.227.15.15; 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:138380 Archived-At: > Sent: Friday, July 08, 2022 at 6:55 PM > From: "Yuri Khan" > To: "help-gnu-emacs" > Subject: Re: Making a function than can only be used interactively > > On Fri, 8 Jul 2022 at 13:31, Emanuel Berg wrote: >=20 > > > It does not matter for interactive use=2E [=2E=2E=2E] =E2=80=98&opti= onal=E2=80=99 > > > comes into play if you use this function non-interactively, > > > from Lisp > > > > No, it matters=2E One example how it matters is that optional > > arguments defaults to nil=2E >=20 > You=E2=80=99re right, with an interactive specification that evaluates t= o a > list it matters, because the list you return may or may not have as > many arguments as the function takes=2E >=20 > My point was that in the specific case of a three-argument function > and a three-item string-valued interactive specification, &optional > does not matter for interactive use=2E It looks as if the easiest understanding of mandatory versus optional function arguments occurs when using a function interactively=2E For the interactive case, it is quite complicated, depending on whether the function uses code characters or a list=2E My proposition would be to include the corresponding explanation on using in either the "Emacs Lisp Reference Manual" or the "Introduction to Progra= mming in Emacs Lisp"=2E