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

#+BEGIN_SRC sh :tangle bar.sh
echo bla


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


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


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