Skip to main content

Questions tagged [noweb]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
58 views

detangle preserve noweb

I've recently gotten into literate Programming with org-mode. I'd like to be able to write all my functions across multiple Code Blocks, tangle them into a files but also test them from inside the org ...
Tomke Pfoch's user avatar
0 votes
0 answers
21 views

Can a noweb block be directed to a specific output block?

I know you can give a block the property :noweb-ref give it a reference name like foo and then in another noweb block you can refer to the reference block with <<foo>>. However this means ...
Ian Pringle's user avatar
0 votes
1 answer
73 views

In Elisp, how can I insert an org-babel JSON block into a variable with noweb?

In Elisp, I want to insert the contents of the "gazonk" JSON block into a variable. #+name: gazonk #+begin_src json { xyzzy " } #+end_src , but I just get "End of file during ...
Jason Hunter's user avatar
0 votes
2 answers
92 views

How to pass a variable to a LaTeX code block?

I'd like to set a variable to be expanded in several LaTeX code blocks. For the sake of simplicity, there is only one in this case, foo. :header-args :var is ignored: I presume because LaTeX does not ...
user avatar
0 votes
1 answer
38 views

How can I have org-babel wrap my latex fragment in dollar signs before it is evaluated?

I find myself having to note equations fairly often, many of which reference each other. Therefore, I've used noweb to keep my notes DRY. #+name: cost #+begin_src latex $J(\vec{w},b)$ #+end_src My ...
daraul's user avatar
  • 13
0 votes
1 answer
125 views

Programmatically defined src-block execution doesn't expand nested noweb references on export

I've run into a problem and I can't for the life of me figure out why this happens. The idea is that I want to have a method of reaching into any named block of code, and grabbing out a a variable to ...
anthsts's user avatar
  • 101
0 votes
1 answer
24 views

Issue when expanding clojure source blocks

I have defined expand and execute functions for 'text' source blocks as follows: (defun org-babel-expand-body:text (body params) (org-trim body)) (defun org-babel-execute:text (body params) (org-...
JMurp's user avatar
  • 11
6 votes
2 answers
367 views

Noweb references in sh blocks breaks the syntax highlighting

I use noweb references inside sh code blocks, for example: #+begin_src sh echo "test" <<some-ref>> echo "test" #+end_src But this causes syntax highlighting to ...
isamert's user avatar
  • 113
0 votes
0 answers
298 views

noweb doesn't expand at all

I have a feeling this must be a stupid simple problem however I just can't seem to figure out what I'm doing wrong. I'm using Doom emacs and trying to use noweb with org mode source code blocks to ...
Reginald Marr's user avatar
3 votes
1 answer
433 views

Nested noweb in org src blocks

I have the following code blocks: Block 1 is just one line. This is a MWE. In reality, I have several lines in block 1. #+name: block1 #+begin_src python :noweb no :exports none print("Block 1&...
Vaibhav Karve's user avatar
2 votes
1 answer
783 views

org-mode: How can noweb handle a multiple line output

I have a code chunk in my document that I want to use as a list of patterns to search for with grep. If I were just writing a script without org-babel, I could write. a="ar er ir or ur" printf "...
njc's user avatar
  • 73
1 vote
1 answer
296 views

Export an orgmode buffer without expanding noweb references?

Normally, when I use orgmode's export function on a buffer that contains noweb references, they get expanded, resulting in lots of duplicated code throughout the exported HTML document. Is there a ...
Daniel Ziltener's user avatar
4 votes
1 answer
1k views

noweb function call with variable arguments

I get error "reference y not found in this buffer" when trying to evaluate cubed-plus-cubed: #+NAME: cubed #+BEGIN_SRC python :var x=3 return x * x * x #+END_SRC #+RESULTS: cubed : 27 #+NAME: cubed-...
user3496846's user avatar
2 votes
1 answer
414 views

How to pass newline ("\n") string to noweb <<call>>

Trying to pass multiline argument to Org code block. If make direct call of block then it's Ok. But when call it through noweb ref then Error raised #+NAME: pr #+BEGIN_SRC elisp :results value :var n=...
Dima Fomin's user avatar
0 votes
1 answer
237 views

How to avoid multiplying of a string which precedes <<noweb reference>> in code block?

When <> expands to multiple line and I wrote like this some-string <<noweb ref>> then it expands like some-string line1-from-noweb-ref some-string line2-from-noweb-ref some-string ...
Dima Fomin's user avatar
1 vote
0 answers
445 views

How can I use #+CALL with multiple arguments?

I'm trying to learn how to use the noweb syntax and advance my knowledge on the possibilities of org babel. For that, I'm trying to get the following an example to work that 1. uses noweb syntax and 2....
Daniel's user avatar
  • 3,663
2 votes
0 answers
129 views

noweb reference aware org-edit-special

Is there a way of splitting a src block into several blocks while keeping them together with noweb reference syntax and editing them using org-edit-special in such a way that would take into account ...
Yuval Langer's user avatar
5 votes
2 answers
439 views

How to disable noweb prefix lines?

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-...
Ruslan Prakapchuk's user avatar
0 votes
1 answer
539 views

Exporting a figure generated with org-babel and noweb reference syntax

Wanting to export a figure generated by matplotlib to LaTeX (as described here) I've encountered the following issue (which ultimately I was able to solve as described here). My source block has two ...
premopie's user avatar
  • 378
6 votes
2 answers
373 views

Insert noweb references with completion

I have discovered the noweb syntax, and in particular how it can be used in org source blocks, very recently, and I have grown quite fond of it. But inserting the references (is there a better term?) ...
T. Verron's user avatar
  • 4,293
3 votes
1 answer
497 views

How to get babel code blocks to evaluate parameters when called from a noweb ref?

I have an interesting problem that I am sure there must be a simple answer to if I can find the right syntax. Essentially, as outlined below, I have a simple sh code block that prints a variable that ...
Matt Innes's user avatar
4 votes
1 answer
140 views

Report missing noweb references in org-babel

In org-babel, is there a way for checking for missing noweb references <<...>> or for throwing an error if a reference is missing? For example in the following I have mistyped the name of ...
Andrew Swann's user avatar
  • 3,576