0

Why is this block tangled (bar.sh), but not the second (foo.sh)?

#+BEGIN_SRC sh :tangle bar.sh
echo bla
#+END_SRC

bla

#+BEGIN_SRC emacs-lisp :tangle (when (eq system-name 'arch) "foo.sh")
 (princ system-name)
#+END_SRC

arch

According to this excellent 1answer, I should be able to tangle conditionally

Footnotes

1 https://emacs.stackexchange.com/a/14034

2
  • On my system system-name is a string. Try (equal (system-name) "arch") for the condition. (I am using the function system-name because apparently the variable is deprecated. May 7, 2019 at 19:47
  • @FranBurstall Accepted Answer. Thank you May 8, 2019 at 5:44

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.