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

  • 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. – Fran Burstall May 7 at 19:47
  • @FranBurstall Accepted Answer. Thank you – user3166159 May 8 at 5:44

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.