From: Max Nikulin <manikulin@gmail.com>
To: orgmode <emacs-orgmode@gnu.org>
Cc: Stefan Kangas <stefan@marxist.se>, Kyle Meyer <kyle@kyleam.com>
Subject: [BUG] org-babel-load-file can not compile file
Date: Tue, 10 May 2022 14:34:33 +0700 [thread overview]
Message-ID: <4f9aaa16-65f3-574e-3245-a271ba4cf7cc@gmail.com> (raw)
Consider the following file ex-ob-load-file.org:
---- >8 ----
#+begin_src emacs-lisp
(defun ex-org-babel-load-file (msg)
(message "From tagled file: %s" msg))
#+end_src
[[elisp:(org-babel-load-file "ex-ob-load-file.org" t)]]
---- 8< ----
Try to follow the link at the end of file or just execute the command in
the link target.
Expected result: the .org file is tangled to ex-ob-load-file.el, the
latter is compiled and loaded.
Actual result:
> Compiling /home/ubuntu/examples/org/ex-ob-load-file.el...done
> Wrote /home/ubuntu/examples/org/ex-ob-load-file.elc
> progn: Cannot open load file: No such file or directory, ex-ob-load-file.el
It seems, it is a regression caused by the Org commit
0193b543e9ef84bfefe76d55e330d5b1cb842cef
> author Stefan Kangas <stefan@marxist.se> Tue Sep 22 00:16:22 2020 +0200
> committer Kyle Meyer <kyle@kyleam.com> Sun Oct 25 01:10:16 2020 -0400
>
> Backport commit 4a575eb18 from Emacs
>
> byte-compile-file: Make optional LOAD argument obsolete
> 4a575eb18cca3eed5019f2d2d2abeea1f0c07005
> Stefan Kangas
> Tue Oct 20 18:48:27 2020 +0200
>
> diff --git a/lisp/org.el b/lisp/org.el
> index db7f83825..73b1f9458 100644
> --- a/lisp/org.el
> +++ b/lisp/org.el
> @@ -232,7 +232,8 @@ byte-compiled before it is loaded."
> (org-babel-tangle-file file tangled-file "emacs-lisp\\|elisp"))
> (if compile
> (progn
> - (byte-compile-file tangled-file 'load)
> + (byte-compile-file tangled-file)
> + (load tangled-file)
> (message "Compiled and loaded %s" tangled-file))
> (load-file tangled-file)
> (message "Loaded %s" tangled-file))))
It seems with the 'load argument `byte-compile-file' was able to load a
file outside of `load-path'.
Emacs 26.3, Org main or bugfix branches.
Org-9.3.1 works fine.
next reply other threads:[~2022-05-10 7:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-10 7:34 Max Nikulin [this message]
2022-05-11 12:41 ` [BUG] org-babel-load-file can not compile file Ihor Radchenko
2022-05-12 14:55 ` Max Nikulin
2022-05-13 10:38 ` Ihor Radchenko
2022-05-13 10:38 ` Ihor Radchenko
2022-05-14 10:36 ` Max Nikulin
2022-05-14 11:35 ` Ihor Radchenko
2022-05-16 14:53 ` Max Nikulin
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=4f9aaa16-65f3-574e-3245-a271ba4cf7cc@gmail.com \
--to=manikulin@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=kyle@kyleam.com \
--cc=stefan@marxist.se \
/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).