From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "T.V Raman" Newsgroups: gmane.emacs.devel Subject: Re: Permanently fix org versioning breakage during builds? Date: Sun, 24 Dec 2023 10:13:11 -0800 Message-ID: <25992.29879.841846.966012@retriever.mtv.corp.google.com> References: <25989.50971.995591.385250@google.com> <87a5q0dc9m.fsf@localhost> <87edfbbyzm.fsf@localhost> <875y0n4px0.fsf@localhost> <87r0jb34hi.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="11153"; mail-complaints-to="usenet@ciao.gmane.io" Cc: yantar92@posteo.net, raman@google.com, emacs-devel@gnu.org To: joaotavora@gmail.com Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Dec 24 19:13:46 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 1rHSyv-0002h3-Ts for ged-emacs-devel@m.gmane-mx.org; Sun, 24 Dec 2023 19:13:46 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rHSyV-0001Gx-GV; Sun, 24 Dec 2023 13:13:19 -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 1rHSyT-0001EA-Oc for emacs-devel@gnu.org; Sun, 24 Dec 2023 13:13:17 -0500 Original-Received: from mail-il1-x132.google.com ([2607:f8b0:4864:20::132]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rHSyS-0007LE-3Z for emacs-devel@gnu.org; Sun, 24 Dec 2023 13:13:17 -0500 Original-Received: by mail-il1-x132.google.com with SMTP id e9e14a558f8ab-35fd902c6b5so25205745ab.3 for ; Sun, 24 Dec 2023 10:13:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1703441594; x=1704046394; darn=gnu.org; h=references:in-reply-to:subject:cc:to:date:message-id :content-transfer-encoding:mime-version:from:from:to:cc:subject:date :message-id:reply-to; bh=HT/dDCvcVSTgaTLGdhVEgdk8IUNsTGV7NOF+2VlyFsQ=; b=MXOJ3ZdtbMUUUABXsDXBAlznzmt8pb3Vwr/mtPoy5yG/1Cw6TlipZODiWNotF++gOU fptHMVPathx2RHo9o40nP1AsarkdQPGJG27fr3rD7iZZMH5pyJqp/b+CUmCw3wlCB4ZV l4pN1EHvrOcOYVanXLq2LT7Nwplpz9a+wD0txrv4KPOYenBQ/aVaUG4Y1IQxUM9HHSK8 webnZ/O5dIuzWCwQ6ODiuQ246rOUV5qL3GvHS2D/j+u1MbZxSFwSDU7mItLlOkAt8Epj fcstn0Tw4Wj4mjfDoEfR4rFDk5RaYsrKVe5SETR3WxuGylPuxB0Tf7ZplHZwAompqrfV FVHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703441594; x=1704046394; h=references:in-reply-to:subject:cc:to:date:message-id :content-transfer-encoding:mime-version:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=HT/dDCvcVSTgaTLGdhVEgdk8IUNsTGV7NOF+2VlyFsQ=; b=O7wxkkoNOVYcJIFSfSmtkZfKkZR47GHU+gGPCB/PQyM1bkUjZExPD1VkkZci70QnKS aIf5mEtS/WId/E6H/y+KLw2WjKKGSvkX0pLwfdbKfCXBF0VJTH3kGITipQ7aK0kx4Uxg QPUHqHrsMJOvyr1XfsWs1er/kgV0Dt6D2HNcqEintiMo+YVNF28qETEqn9bHNc/iPP1l +dbk5BmqSylvmDG0LNz4npFN/uW/nCUtqB6dObgLt6TXbowKU2qLEdHTK/Bnyu5xeC2F iGcAyYc0Td2njH173oqJ13MYItmmXaLaFe4X2AcwA2/FNTAFcbU02wVRr0Kh0vvoaERF KCnA== X-Gm-Message-State: AOJu0Yy/qWu7xUbKrunDccbjZI6bkf0LzdhHp7V/NIs5aaU/bgTVL/vn A3Hjh0+XRxnDLbiSxZXUPCttE91jAytlVHOy18yReCnsxgVu X-Google-Smtp-Source: AGHT+IF6ehQuUotGi4LFXBACnMKOKg9uN0+dsy9LdWQ/gtFhQNCF/KrpzF/1kPkzhkBDotdSPZgj5w== X-Received: by 2002:a05:6e02:1bc3:b0:35d:58ce:2322 with SMTP id x3-20020a056e021bc300b0035d58ce2322mr7815802ilv.5.1703441593662; Sun, 24 Dec 2023 10:13:13 -0800 (PST) Original-Received: from retriever.mtv.corp.google.com ([2620:15c:b5:1:fb96:5645:a684:6381]) by smtp.gmail.com with ESMTPSA id n37-20020a056a000d6500b006d996ce80a6sm3416721pfv.0.2023.12.24.10.13.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Dec 2023 10:13:12 -0800 (PST) In-Reply-To: X-Mailer: VM 8.1.1 under 30.0.50 (x86_64-pc-linux-gnu) Received-SPF: pass client-ip=2607:f8b0:4864:20::132; envelope-from=raman@google.com; helo=mail-il1-x132.google.com X-Spam_score_int: -190 X-Spam_score: -19.1 X-Spam_bar: ------------------- X-Spam_report: (-19.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, ENV_AND_HDR_SPF_MATCH=-0.5, NICE_REPLY_A=-1.463, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, USER_IN_DEF_DKIM_WL=-7.5, USER_IN_DEF_SPF_WL=-7.5 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:314166 Archived-At: And while I remember, we also need to investigate how badly these breakages bite native-compile; I'm not enabling native-compile for various other reasons, so am not in a position to verify, Jo=C3=A3o T=C3=A1vora writes: > On Sun, Dec 24, 2023 at 5:13=E2=80=AFPM Ihor Radchenko wrote: >=20 > > It is not about a specific macro. Any macro may be broken this way= =2E >=20 > No, that's that not true. Only macros defined in one file and > expanded in other files. And not if you use this technique. >=20 > My advice is to find a list of macros defined in one file and > expanded in another file. >=20 > > There may be confusion about `org-assert-version' macro vs. all ot= her > > macros. The former is my attempt to detect potential breakage of t= he > > latter. > > > > > [ Tangent: one thing I notice is that the expansion in ox-html.= el is > > > buggy. It evaluates the keyword arguments to the macros multipl= e times > > > for no effect. The solution would be to change the macro callin= g > > > convention to be: > > > > > > (cl-defmacro org-export-with-buffer-copy ((&key to-buffer drop-v= isibility > > > drop-narrowing drop-co= ntents > > > drop-locals > > > &allow-other-keys) &bo= dy body) > > > ...) > > > > May you elaborate=3F >=20 > Just expand the macro as in ox-html.el and see for yourself. >=20 > > > Anyway, let's apply the "CALL-WITH" technique: > > > > > > (cl-defmacro org-export-with-buffer-copy ( &rest body > > > &key to-buffer drop-v= isibility > > > drop-narrowing drop-c= ontents > > > drop-locals > > > &allow-other-keys) > > > "..." > > > `(org-export--call-with-buffer-copy (lambda () ,@body) > > > > AFAIU, this technique will prevent compiler optimizations, won't i= t=3F >=20 > What compiler optimizations are you talking about=3F The only > price to pay is an extra funcall. "We can solve any problem by > introducing an extra level of indirection." The function compiled, > where presumably the complicated optimization-worthy logic lies > is still compiled. >=20 > > in Emacs tree - Emacs has only stable version. Your patch will not= apply > > on the latest Org main branch. >=20 > Surely can't be very hard to adapt it now that I've shown how it's d= one, > it's a localized change to a single definition in a single file. >=20 > Jo=C3=A3o --=20