This says that

Noweb insertions now honor prefix characters that appear before <<reference>>.

And because of that trying to use

#+BEGIN_SRC clojure :noweb-ref dep-cljsbuild
[lein-figwheel "0.5.9"]
[lein-cljsbuild "1.1.5" :exclusions [[org.clojure/clojure]]]


:plugins [<<dep-cljsbuild>>]

gives me

:plugins [[lein-figwheel "0.5.9"]
:plugins [[lein-cljsbuild "1.1.5" :exclusions [[org.clojure/clojure]]]]

which is obviously not what I want. I can workaround issue by moving <<dep-cljsbuild>> to the new line, but it looks ugly.

Could you recommend any proper way to point org-mode that in particular place I don't want prefixes to be preserved? (Or at least how to disable it globally)

  • This does not appear possible to me in org. I would move the :plugins part into the noweb-ref block. The expansion is done by org-babel-expand-noweb-references. Jun 11, 2018 at 3:14

2 Answers 2


There is another workaround: remove newlines from the referenced code block.

According to the Org manual

Since this change does not affect noweb replacement text without newlines in them, inline noweb references are acceptable.

Here is a minimal example:

#+TITLE: Example

#+BEGIN_SRC clojure :noweb-ref dep-cljsbuild
[lein-figwheel "0.5.9"] [lein-cljsbuild "1.1.5" :exclusions [[org.clojure/clojure]]]

#+BEGIN_SRC clojure :noweb yes
:plugins [<<dep-cljsbuild>>]

Previewing the second snippet when expanded using C-c C-v v shows:

:plugins [[lein-figwheel "0.5.9"] [lein-cljsbuild "1.1.5" :exclusions [[org.clojure/clojure]]]]
#+BEGIN_SRC bash :noweb yes :results verbatim
  echo \
  • 1
    Please consider explaining your code, to improve your answer.
    – Drew
    Nov 13, 2017 at 1:51

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.