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:54:19 +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> <87ttft3byp.fsf@dataswamp.org> <8634ndlgox.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="34536"; 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:55:17 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 1scUlg-0008p5-Qm for ged-emacs-devel@m.gmane-mx.org; Fri, 09 Aug 2024 20:55:17 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1scUkv-0001YS-Jh; Fri, 09 Aug 2024 14:54:29 -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 1scUks-0001WU-1V for emacs-devel@gnu.org; Fri, 09 Aug 2024 14:54:26 -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 1scUko-0004OG-Q9; Fri, 09 Aug 2024 14:54:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.com; s=s31663417; t=1723229659; x=1723834459; i=dimech@gmx.com; bh=LjQXhkhmekDQxhR/cC61F5wrubPtStORgMcr91knMQw=; 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=mUg7SueYbB4QdoiniYm7kR3hxiK1EN3/LKRoPNbi9nO4TkSgI1TViqaxnsXudzJL a67LQxme/YQmeoO0vNWrit2DBXZywyeaYFY8Uw2OaRp+d5rhOdWZzBhWuKaLaCO0m +oqJ+zvB87qgSdJHF/Lo4NybatAqnM1rrn0gkDYFhyfd5oDnsOeugdVYsNr5tU22x m5QNPaUOnb2zTqiHKCemwoLFCRovw0UoUkQ3pyWpRcx7iptVC9X36uBmRPuiVy8Z0 sLtk743r650EGY01XCL15jerPS4iUaYxHEdyRqSFSoek2AxYqc/E3E9PrbPb6mFCo NBdUJus5m50ipu5GqQ== 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:54:19 +0200 Importance: normal Sensitivity: Normal In-Reply-To: <8634ndlgox.fsf@gnu.org> X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:cYX394h9NqFlNoP30Z1BOX7KgSdKybVLik4Elwh5L+N+2n77tT2cYQOniAAGxs4N0lubu LoNBTQsbyfJ8oJABmIK2SXt32FB8FItr4FG282PPVXVjifEev0ZS4FWopGa1QS91kjUW9OwRwVZA wRFSQSEU36thi6XaYBE9OWjo0LwJWgjQEZF0Y8BlHKnLR3EJz1d2dRKOQN0vx0cKnqpmHh5M2jVE PkVbOHiBLoR4jz+dokftnKph9ONccDTCIxAUXOJHxzW1f9akeQx0Mg8lG12eGEJcXdxq8p83anbT 5Y= UI-OutboundReport: notjunk:1;M01:P0:CT93xFma5W0=;nZCVCGp61Fe7t7hGfAGMPIxBbwt xXiMNSyrt39pQA8CiL/blQ6BaqXhZX4ANuCYrZF+8Qq/7L/cWyL4KYiCFMAdw7dKtrEMdX2LD w2Q49sXo8FV0u93jNX1PA71OqKXb8Qh4Nda9ju4uBt8DhVi1aUGv+rXWoS75+rTN6A0Q4zkSV NstNz4Hy+iUUb/C4HYtl4nmcaLH/tdFAZZ3TETHCcqv0d0qaGPW1YrOUwQNBY9pjs8jh8yjB9 U+trXZROLbnUrvad62qgq+/9kU/39S9KU3fqCLQJCEPqF8Al6B0fCe8TiS/HmLmqlg0f3UlUJ xwqdQoxjoBDFKeS/NEY8MBZkhOGlAt4g6kvioeMF1lWUv1lSubodPUCh/XoTXqtKih0bSU789 IpbCT3fa+pAkflapZf5t75T0z8N8EXaHH4tNWeltA7/I7eXRw/wj8lD8y1oawYw/RfyIp9pL6 XAriQa6Vl1CvjG6RLNjfaH7yUWia07ZLXzDnoPabL+mAuzfB14B9m3n0oQ/PAL3BvDG2HxvgU McrYN+o0DgTZSKq25FrvEGAy0wbniq0L/aFAoCagWBJO2a3pNvD03xvpdW64RkOzdj+RF4bzV oD0ZhwwhiGvgswPahYziqUyo/0tcRe3LfRyysWBR6EQ6GGSR1SkJDkYhKy9Gen57DvzvbtrcN KaYN4KimhxgamfMOtIiNS7l78r28hJfrMmfGIHT9XQ== 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:322587 Archived-At: > Sent: Saturday, August 10, 2024 at 6:00 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:19:58 +0200 > > > > (defun draw-scale (&optional end step i) > > (interactive (if (numberp current-prefix-arg) > > (list current-prefix-arg) > > current-prefix-arg)) > > Using "p" doesn't prevent you from testing the value of > current-prefix-arg, if that is what you want to do. > > But in general, having commands with more than one optional argument > (two when the command acts on a region) is not recommended, because it > complicates the interactive usage. This complexity is not inherently negative, and there are compelling reasons to embrace it in certain situations. Commands with multiple optional arguments offer greater flexibility. They allow users to fine-tune the behavior of a command without needing multiple versions of the same command. For example, a command that processes text in a region might need to handle different edge cases or modes of operation. Providing multiple optional arguments, users can specify exactly how they want the command to behave, which can be more efficient and powerful than using multiple commands or a simpler interface= . And more advanced users often seek out commands that provide granular cont= rol. In an environment like Emacs, which is known for its powerful, customizabl= e, and sometimes complex commands, advanced users often appreciate the abilit= y to use optional arguments. Embrace complexity, complexity is not inherently bad, it's a trade-off. Proper documentation, intuitive default behaviors, and a clear understandi= ng of when and how to use optional arguments can ensure that this complexity enhances the user experience rather than detracting from it.