From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: &allow-other-keys + &rest body in cl-defmacro (was: Permanently fix org versioning breakage during builds?) Date: Mon, 25 Dec 2023 12:09:34 +0000 Message-ID: References: <25989.50971.995591.385250@google.com> <87a5q0dc9m.fsf@localhost> <87edfbbyzm.fsf@localhost> <875y0n4px0.fsf@localhost> <87r0jb34hi.fsf@localhost> <878r5j31v0.fsf@localhost> <87a5pya5ga.fsf@localhost> 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="28761"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "T.V Raman" , emacs-devel To: Ihor Radchenko Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Dec 25 13:07:21 2023 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 1rHjjs-0007Js-Qe for ged-emacs-devel@m.gmane-mx.org; Mon, 25 Dec 2023 13:07:20 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rHjj5-0001U5-HO; Mon, 25 Dec 2023 07:06:32 -0500 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 1rHjj0-0001TD-VZ for emacs-devel@gnu.org; Mon, 25 Dec 2023 07:06:27 -0500 Original-Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rHjiz-0003Pl-BL for emacs-devel@gnu.org; Mon, 25 Dec 2023 07:06:26 -0500 Original-Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-3367601a301so3734678f8f.2 for ; Mon, 25 Dec 2023 04:06:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703505983; x=1704110783; darn=gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=r2Xw6deNJiSUs98GOMOKtKose90g83iCY+k44Ch12hU=; b=kGQjf9L+gJMFkZm58EkUvhoI/c48uzy5vQm2Htn7gZTJ4HeF2pyBiUpHuk8Ql5csZR PdpOd0L55x5ELRNZQqnr230UsRurNAC4vii2SKWFY0ZFjD/8BzhD3xmrxz7WCuRkhE1V W0aTFreOWBEcr/ioOSiJ+Ij4c1yyoo34biwY68mCuTN5euSgtrVNn6bAKmFNM/DQACHz LRUz6eN3gURgdzc/IwJ6jxvlS02EFoneH2WQsLzR0uAmz4YD+iKJVRj9wOaVW01uFov0 E01o0gM1VJWF/wnCWkYOlmwPdsYi9F03ShvsLTTvh4GVcOixVV0oUw2W2ZVJiSmIO5Yq RUKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703505983; x=1704110783; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=r2Xw6deNJiSUs98GOMOKtKose90g83iCY+k44Ch12hU=; b=Li1QU4ma8NPlL17HeO8v7kTdIBaGm+5dI7KiNbFTjqEzaWxe/PKPdaGciDWwenumOF Lj6UxushDW1X1deVZike30RJfgbmIv7YUEZuj4HU14lwxq5gxBXwD8ToHWOKRpfq+ivE w80pl+0fa7/FMM5JwjCjbFBaiiCOhQFci33ZkARaL0KHBdyD76zuJb/ItBMVJbOGglSo olpxqHvbDEcSwDkgM1LXYU97hcFTDexTQcPYnxVtHrZqOUPPtaDtPIf4oVVrio3n9UEn 1UDYmGdJhedgdfI7AXmZGz0klOGaOOyr0VhYn/z+1zF8TMdZ/lJTzbzw2jPx24TNWfaS KFBA== X-Gm-Message-State: AOJu0YziAHmY/xIZuHdv/4FXWhB212W1UfVEyZ7kpBvb3222jSMIZjjt MHj54N/39cHMPp/WmaafVpAF/KurRs4HR67FtsE= X-Google-Smtp-Source: AGHT+IGMmPRos9vOL6cK/yXQoni/8nd+oPvQmnlDSoIQcBlowec3rH1jp2P+NKCd/alM/INvGt+T19cPs25tDsV+gkY= X-Received: by 2002:adf:ee87:0:b0:336:534a:f910 with SMTP id b7-20020adfee87000000b00336534af910mr2031811wro.75.1703505982917; Mon, 25 Dec 2023 04:06:22 -0800 (PST) In-Reply-To: <87a5pya5ga.fsf@localhost> Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=joaotavora@gmail.com; helo=mail-wr1-x429.google.com 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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: 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:314202 Archived-At: On Mon, Dec 25, 2023 at 11:23=E2=80=AFAM Ihor Radchenko wrote: > > Jo=C3=A3o T=C3=A1vora writes: > > >> Hmm... It actually looks like a problem with `cl-defmacro' rather than > >> with macro definition itself. > > > > No, Common Lisp's DEFMACRO works exactly like this. You need to underst= and > > how &rest works with &key and &allow-other-keys. It _also_ keeps the ke= ys. > > That's just how it works. > > Now I feel a bit like RMS when he complained about CL-lib introducing > alien concepts to Elisp :) It's not Cl-lib's fault that the Org developers made a mistake and didn't understand how the Common Lisp tool they selected works. Even in Elisp a zillion macros are correctly written in this form: (defmacro with-foo (options-when-fooing &rest body) It's exactly the same, only you need to do the destructuring yourself. cl-defmacro simplifies this for free with (cl-defmacro with-foo ((&key option1 option2) &body body) You (or the Org devs) just made a mistake that's all, happens to everybody. Don't blame Cl-lib for it. > What about non-breaking change like the attached? You should be checking for `keywordp` instead, because &allow-other-keys. Jo=C3=A3o