emacs/var/elfeed/db/data/5d/5dacc152d51c6f1b4cb9c288388999760122a1ea
2022-01-03 12:49:32 -06:00

1 line
946 B
Plaintext

<!-- SC_OFF --><div class="md"><p>When using the result of another code block i find i want to transform the value slightly before using it, in particular I want to trim off a newline. I have a feeling this ought to be a common case, but I can&#39;t find any information on how to do it.</p> <p>For instance, in something like this, where <code>bar</code> refers to another (named) block and thus has a trailing newline.</p> <p>```</p> <h1>+header: :var foo=bar</h1> <h1>+begin_src http :pretty</h1> <p>POST http://localhost:3000/api/${too}/run</p> <h1>+end_src</h1> <p>```</p> </div><!-- SC_ON --> &#32; submitted by &#32; <a href="https://www.reddit.com/user/magthe0"> /u/magthe0 </a> <br/> <span><a href="https://www.reddit.com/r/orgmode/comments/rtfzey/transforming_variables_to_code_blocks/">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/orgmode/comments/rtfzey/transforming_variables_to_code_blocks/">[comments]</a></span>