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.devel Subject: how to speed up Lisp devel time Date: Fri, 9 Aug 2024 20:56:16 +0200 Message-ID: References: <87y156413v.fsf@dataswamp.org> <86sevekvjy.fsf@gnu.org> <87v80a402y.fsf@dataswamp.org> <86ikwakmdg.fsf@gnu.org> <87frre3pxa.fsf@dataswamp.org> <86ed6xlx9r.fsf@gnu.org> <87a5hl4x9b.fsf@dataswamp.org> <86bk21lp53.fsf@gnu.org> <871q2x4ra3.fsf@dataswamp.org> <87wmkp3c53.fsf@dataswamp.org> <864j7tlgzm.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="40663"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Emanuel Berg , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Aug 09 20:56:45 2024 Return-path: Envelope-to: ged-emacs-devel@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 1scUn7-000ANd-59 for ged-emacs-devel@m.gmane-mx.org; Fri, 09 Aug 2024 20:56:45 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1scUmp-0005LY-97; Fri, 09 Aug 2024 14:56:27 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1scUml-00055d-TF for emacs-devel@gnu.org; Fri, 09 Aug 2024 14:56:23 -0400 Original-Received: from mout.gmx.net ([212.227.15.18]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1scUmk-0004jq-0v; Fri, 09 Aug 2024 14:56:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.com; s=s31663417; t=1723229776; x=1723834576; i=dimech@gmx.com; bh=yJcaTCBeI7wxjz7WXzOBrFxnl1H2ubBUkRp6aZwJ8SE=; h=X-UI-Sender-Class:MIME-Version:Message-ID:From:To:Cc:Subject: Content-Type:Date:In-Reply-To:References: Content-Transfer-Encoding:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=IU5YkCncg3GVSry4frUWuCfjVbpINnbSp5gx0EjqZqE996p1iiq1m99/ph3tN+pL 08j6fHKL3jcHMZlzdjWz5S4d8JRfURjPP43xGw95FelrPwOAFdMIKye+Gg/GB1Iye 91cEyAhcVEGMF4IKgsPLbyRb2GrGmLnLGr9gGNoGYiHp1gup33FcrHwpasKuvqczo b/Qn8ANh7OfsC9xgWf5oL0oZa7r4vLApyXMPUO51px6O2JAEI3EL5N1DqLSWhiCoy nQ+7N2Vn+rpmHghNb33i8Q2H76MLl0HCCKT6vte9VEEykGDCyWE6WzH4oPREoC59T YENzPICwxWn/9gngww== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from [92.251.79.197] ([92.251.79.197]) by web-mail.gmx.net (3c-app-mailcom-bs13.server.lan [172.19.170.181]) (via HTTP); Fri, 9 Aug 2024 20:56:16 +0200 Importance: normal Sensitivity: Normal In-Reply-To: <864j7tlgzm.fsf@gnu.org> X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:LwGTONQSvOr/nvLRHs02ATwSJ1ndwaH6gWfwOMxmMfjklc2NOJwjVlEc33ti0InvxMfbq 07Kz4lFe3x/788zMGywkXRDBkibVqw3dPNhDuN6NwOBGqUQa2KAahQA7z7N4ed0Ps7p0MZkdOb6A Xu9D2PYZsfnF0E+OwQi5G/0f9dEPzoKBY4+/BS5QCAOSkb/xKpBe+Ys+HCZ9NMk3wQcVBYYO5nSw oREorp90CcnqTZnzs1rEB2j2zubIP8OXvy2oHeEFdlUV3x6JIPF7ju42MhOSgHKm5Mt4Imv1r0gF HE= UI-OutboundReport: notjunk:1;M01:P0:nUzoTjINivM=;aApCUv8d3llFdDH+eycM46vnWgO 124bc27QEF0lPnFMPTLVz6KVS4/HEW2WN5L2KCTSUAeCO/3GTtnW9rB41qgORf6NPx82BmIS1 lY/f6q00cGvdeXUs3Rb020wEjUc2hLYWXjalVPFLUtlIfgREm2/8Rs0FPqzYLhgRArfkaXvHB GA/25jx+kZEOc914dWjXpjAfFEX05vNllNfgf9uGZJLy6wZyvgjmw+rzsPWI306CdMSYxW2D4 Wyk7avGjKDrmfT9MVQEWD4I0G/820sV735LyT/94IcINxS4EayViahD2J9CY4KwnAooNM8Ql8 Lu//ql3hgFKnv+W7do688kb7njUr0onMIVsOUh0uXyi6VTT02YPPxvvrvhTYDvF1eEXppBKCu JdrvWJNMa9VkP+6S3jm4hQN1nwJZqTeGt5TddNf3pajorgreTx8x9qf/tBzcGlZ7z3umJm8MU pyzx8Ktud1h4sF+NG9zOvx+A8sv7Xp9PZLlOgNhzCz3Rw2jtUJNq9WPp8PckzjtMaLYZW4Rm1 2tqQh6ljrj/6Nl5jxrXz5H9O73CnXMJXCZRaHtTDskgysFgUMsbKt16Je2FINL0CChl8HDGdT 8FWdc2e5Nyk+UB7SutkYwoXIB7cnUV4LbOvhcovwbllaKEScDlyCDY+m5QFrt2fjacM26vkM1 ncfbuJ4Qt48cYjqYP98pGvy7eST2L+xbJspkJ41OWQ== Received-SPF: pass client-ip=212.227.15.18; envelope-from=dimech@gmx.com; helo=mout.gmx.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:322588 Archived-At: > Sent: Saturday, August 10, 2024 at 5:54 AM > From: "Eli Zaretskii" > To: "Emanuel Berg" > Cc: emacs-devel@gnu.org > Subject: Re: how to speed up Lisp devel time > > > From: Emanuel Berg > > Date: Fri, 09 Aug 2024 18:16:08 +0200 > > > > >> These all are handled by the 'p' interactive code. So all > > >> you need is this: > > >> > > >> (interactive "p") > > > > > > Okay, that is some improvement at last. > > > > I spoke to soon. That is not the same as > > > > (interactive (if (numberp current-prefix-arg) > > (list current-prefix-arg) > > current-prefix-arg)) > > If you need to support a numeric optional argument, "p" is all you > need. Anything else is redundant over-engineering at best. > > > That, (interactive "p"), is the same as sending 1 on M-x, but > > here we want it to be the default behavior. Since nothing is > > stated explicitely. > > > > M-x should be default, just as (function-name) should > > be default. > > > > But it should be possible to do C-u 1 M-x to set 'end' to 1. > > It makes no sense to have "M-x" do something different from > "C-u 1 M-x", when the argument says how many times to do some job. > This is why in Emacs we use this convention consistently in all > the commands. You are free to use other conventions in your code, > but that's not how Emacs commands work, and we require any command > to adhere to that convention. > > When you want to allow the user to specify more than a single argument > to a command, things usually become much more complicated, so it is > best to avoid such commands. If you must do that, a separate prompt > for each argument is better than tricky conventions regarding the > value of prefix arg. I fully agree. Separate prompts for each argument is better, the way thin= gs should be.