From: Ihor Radchenko <yantar92@posteo.net>
To: "Jorge P. de Morais Neto" <jorge+list@disr.it>
Cc: emacs-orgmode@gnu.org
Subject: Re: [BUG] org-export-with-broken-links not respected for (org-icalendar-combine-agenda-files t) [9.6.9 ( @ /home/jorge/.config/emacs/elpa/org-9.6.9/)]
Date: Sun, 10 Sep 2023 07:50:22 +0000 [thread overview]
Message-ID: <87r0n6jwld.fsf@localhost> (raw)
In-Reply-To: <87v8cjkol4.fsf@disr.it>
"Jorge P. de Morais Neto" <jorge+list@disr.it> writes:
> Hi. I am on Gentoo. I wrote the following Elisp function:
>
> --8<---------------cut here---------------start------------->8---
> (defun J-org-icalendar-agenda-no-babel (&optional async)
> "Invoke `org-icalendar-combine-agenda-files' without babel, maybe ASYNC.
>
> Also, make broken Org links just get marked as such in the
> output, instead of stopping the export with an error."
> (interactive "P")
> (let (org-export-use-babel
> (org-export-with-broken-links 'mark))
> (org-icalendar-combine-agenda-files async)))
> --8<---------------cut here---------------end--------------->8---
>
> When I invoke (J-org-icalendar-agenda-no-babel t), the async export
> errors out. I determined that the inferior Emacs process does not see
> the let-binding (org-export-with-broken-links 'mark). Is this intended
> behavior?
This is because async export code only tries hard to copy buffer-local
variables (`org-export--generate-copy-script'). Global bindings are not
transferred.
I am not sure if transferring global bindings is something we should do.
The existence of `org-export-async-init-file' implies that user may want
to use different settings from the Emacs session. If we start
transferring the full Org-related Emacs state to async process, users
with custom `org-export-async-init-file' might be affected.
On the other hand, your use-case clearly shows that the current behaviour
can be confusing.
So...
Confirmed.
One possible way to fix the confusion could be adding a new
`org-export-async-preserve-global-state' variable. When non-nil, we will
transfer global state in addition to the buffer-locals.
But I would like to hear other opinions first, if there are any.
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
next prev parent reply other threads:[~2023-09-10 7:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-09 21:45 [BUG] org-export-with-broken-links not respected for (org-icalendar-combine-agenda-files t) [9.6.9 ( @ /home/jorge/.config/emacs/elpa/org-9.6.9/)] Jorge P. de Morais Neto
2023-09-10 7:50 ` Ihor Radchenko [this message]
2023-09-14 13:14 ` Jorge P. de Morais Neto
2023-09-15 9:13 ` Ihor Radchenko
2023-09-15 10:23 ` Jorge P. de Morais Neto
2023-09-15 10:36 ` Ihor Radchenko
2023-10-22 9:22 ` Ihor Radchenko
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.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r0n6jwld.fsf@localhost \
--to=yantar92@posteo.net \
--cc=emacs-orgmode@gnu.org \
--cc=jorge+list@disr.it \
/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/org-mode.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).