0

When tangling my literate files, code blocks from the library of babel, added using org-babel-lob-ingest, are overriding local named code blocks. I'd thought it's supposed to be the other way around. If that's not the case, where can I find more information on the priority of the code blocks used?

UPDATE: Upon request, I have summarized the steps to reproduce this below:

ingest.org:

#+name: 826ab469-eeef-4392-aec9-4dd490409430
#+begin_src text
Hello,
#+end_src

test.org:

#+name: 826ab469-eeef-4392-aec9-4dd490409430
#+begin_src text
Goodbye,
#+end_src

#+begin_src text :tangle test.txt :noweb yes
<<826ab469-eeef-4392-aec9-4dd490409430>> world!
#+end_src

Run chmod +x org-tangle && ./org-tangle test.org using the org-tangle script here, modeled after doomemacs' own script, but with (org-babel-lob-ingest "ingest.org") included. The file test.txt will be tangled, but with Hello, world! instead of Goodbye, world!.

5
  • What do I have to do to reproduce this problem? Please provide a complete, minimal example.
    – NickD
    Aug 1 at 19:13
  • Sorry about that; the process was a little more complicated than I anticipated! Will my current update suffice? Aug 1 at 21:09
  • No - I get an error and backtrace (which I've mostly elided): $ ./org-tangle test.org 1 source block added to Library of Babel Error: wrong-type-argument (listp "Goodbye, world!") mapbacktrace(#f(compiled-function (evald func args flags) #<bytecode 0x9da9dec51aef0c2>)) debug-early-backtrace() debug-early(error (wrong-type-argument listp "Goodbye, world!")) ........ command-line--load-script("/tmp/foo/org-tangle") command-line-1(("-scriptload" "./org-tangle" "--" "test.org")) command-line() normal-top-level() Wrong type argument: listp, "Goodbye, world!"
    – NickD
    Aug 2 at 1:37
  • If I visit test.org and do M-x org-babel-lob-ingest RET ingest.org and then do C-c C-v C-t on the code block, I do get a test.txt which contains: Goodbye, world!. You need to simplify that script (which is hardly minimal).
    – NickD
    Aug 2 at 1:42
  • Interesting... I wonder why the script works on my system, especially since the script is meant to work without a user's init.el or early-init.el... I only know the basics of how the script works, unfortunately; I'm not sure I can simplify it without it ceasing to function entirely. Actually, could the org-mode version be the issue, here, regarding the script failing? The default version for emacs 27.2 seems to be 9.4.4. Aug 2 at 2:59

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.