From: "T.V Raman" <raman@google.com>
To: joaotavora@gmail.com
Cc: yantar92@posteo.net, raman@google.com, emacs-devel@gnu.org
Subject: Re: Permanently fix org versioning breakage during builds?
Date: Sun, 24 Dec 2023 10:13:11 -0800 [thread overview]
Message-ID: <25992.29879.841846.966012@retriever.mtv.corp.google.com> (raw)
In-Reply-To: <CALDnm50NepebXzzoZfqcXEH-PjHD8KVZw9L4YUieNx=xjmj_iA@mail.gmail.com>
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ão Távora writes:
> On Sun, Dec 24, 2023 at 5:13 PM Ihor Radchenko <yantar92@posteo.net> wrote:
>
> > It is not about a specific macro. Any macro may be broken this way.
>
> No, that's that not true. Only macros defined in one file and
> expanded in other files. And not if you use this technique.
>
> My advice is to find a list of macros defined in one file and
> expanded in another file.
>
> > There may be confusion about `org-assert-version' macro vs. all other
> > macros. The former is my attempt to detect potential breakage of the
> > latter.
> >
> > > [ Tangent: one thing I notice is that the expansion in ox-html.el is
> > > buggy. It evaluates the keyword arguments to the macros multiple times
> > > for no effect. The solution would be to change the macro calling
> > > convention to be:
> > >
> > > (cl-defmacro org-export-with-buffer-copy ((&key to-buffer drop-visibility
> > > drop-narrowing drop-contents
> > > drop-locals
> > > &allow-other-keys) &body body)
> > > ...)
> >
> > May you elaborate?
>
> Just expand the macro as in ox-html.el and see for yourself.
>
> > > Anyway, let's apply the "CALL-WITH" technique:
> > >
> > > (cl-defmacro org-export-with-buffer-copy ( &rest body
> > > &key to-buffer drop-visibility
> > > drop-narrowing drop-contents
> > > drop-locals
> > > &allow-other-keys)
> > > "..."
> > > `(org-export--call-with-buffer-copy (lambda () ,@body)
> >
> > AFAIU, this technique will prevent compiler optimizations, won't it?
>
> What compiler optimizations are you talking about? 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.
>
> > in Emacs tree - Emacs has only stable version. Your patch will not apply
> > on the latest Org main branch.
>
> Surely can't be very hard to adapt it now that I've shown how it's done,
> it's a localized change to a single definition in a single file.
>
> João
--
next prev parent reply other threads:[~2023-12-24 18:13 UTC|newest]
Thread overview: 82+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-22 17:27 Permanently fix org versioning breakage during builds? T.V Raman
2023-12-23 17:58 ` João Távora
2023-12-23 18:06 ` Ihor Radchenko
2023-12-23 18:44 ` João Távora
2023-12-24 11:50 ` Ihor Radchenko
2023-12-24 14:13 ` João Távora
2023-12-24 14:48 ` Ihor Radchenko
2023-12-24 16:32 ` João Távora
2023-12-24 16:36 ` T.V Raman
2023-12-24 17:00 ` Eli Zaretskii
2023-12-24 17:04 ` João Távora
2023-12-24 17:16 ` Ihor Radchenko
2023-12-24 17:48 ` João Távora
2023-12-24 18:13 ` T.V Raman [this message]
2023-12-24 18:52 ` Eli Zaretskii
2023-12-24 18:13 ` Ihor Radchenko
2023-12-24 23:11 ` João Távora
2023-12-25 11:26 ` &allow-other-keys + &rest body in cl-defmacro (was: Permanently fix org versioning breakage during builds?) Ihor Radchenko
2023-12-25 12:09 ` João Távora
2023-12-25 12:21 ` Ihor Radchenko
2023-12-25 19:00 ` Ihor Radchenko
2023-12-25 13:58 ` Permanently fix org versioning breakage during builds? Ihor Radchenko
2023-12-25 17:42 ` João Távora
2023-12-25 18:24 ` Ihor Radchenko
2023-12-24 17:05 ` Ihor Radchenko
2023-12-24 17:12 ` João Távora
2023-12-24 17:18 ` Ihor Radchenko
2023-12-24 17:24 ` Ihor Radchenko
2023-12-24 17:54 ` João Távora
2023-12-24 18:10 ` Ihor Radchenko
2023-12-24 18:16 ` João Távora
2023-12-24 18:23 ` Ihor Radchenko
2023-12-24 18:47 ` Eli Zaretskii
2023-12-24 18:56 ` Ihor Radchenko
2023-12-24 18:57 ` Eli Zaretskii
2023-12-24 18:42 ` Eli Zaretskii
2023-12-24 14:56 ` Eli Zaretskii
2023-12-24 23:14 ` João Távora
2023-12-24 2:43 ` T.V Raman
2023-12-24 6:51 ` Eli Zaretskii
2023-12-24 16:29 ` T.V Raman
2023-12-24 16:56 ` Eli Zaretskii
2023-12-24 11:00 ` Ihor Radchenko
2023-12-24 12:32 ` Po Lu
2023-12-24 12:50 ` Ihor Radchenko
2023-12-24 12:57 ` Po Lu
2023-12-24 14:11 ` Stefan Kangas
2023-12-24 14:51 ` Ihor Radchenko
2023-12-24 14:58 ` Eli Zaretskii
2023-12-24 16:59 ` Ihor Radchenko
2023-12-24 17:26 ` T.V Raman
2023-12-24 17:44 ` Ihor Radchenko
2023-12-24 18:01 ` João Távora
2023-12-24 18:12 ` Ihor Radchenko
2023-12-24 18:16 ` T.V Raman
2023-12-24 18:25 ` Ihor Radchenko
2023-12-24 18:53 ` Eli Zaretskii
2023-12-24 18:48 ` Eli Zaretskii
2023-12-24 19:23 ` Stefan Kangas
2023-12-24 18:45 ` Eli Zaretskii
2023-12-24 18:11 ` T.V Raman
2023-12-24 18:17 ` Ihor Radchenko
2023-12-24 19:31 ` T.V Raman
2023-12-24 18:51 ` Eli Zaretskii
2023-12-24 17:56 ` João Távora
2023-12-24 18:36 ` Eli Zaretskii
2023-12-24 18:32 ` Eli Zaretskii
2023-12-24 18:50 ` Ihor Radchenko
2023-12-24 18:55 ` Eli Zaretskii
2023-12-24 19:05 ` Ihor Radchenko
2023-12-24 23:23 ` João Távora
2023-12-24 19:16 ` Stefan Kangas
2023-12-24 19:24 ` Ihor Radchenko
2023-12-24 16:32 ` T.V Raman
2023-12-24 16:39 ` João Távora
2023-12-24 16:58 ` Eli Zaretskii
2023-12-24 17:05 ` João Távora
2023-12-24 18:34 ` Eli Zaretskii
2023-12-25 18:59 ` Ihor Radchenko
2023-12-25 19:27 ` Eli Zaretskii
2023-12-25 20:02 ` Ihor Radchenko
2023-12-25 20:03 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=25992.29879.841846.966012@retriever.mtv.corp.google.com \
--to=raman@google.com \
--cc=emacs-devel@gnu.org \
--cc=joaotavora@gmail.com \
--cc=yantar92@posteo.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).