Vincent Koppelmans <vincentkoppelm...@gmail.com> writes:

> Here is the complete minimal example, as the HTML exported version of the 
> email did not include org markup:
>
> Tangling a source block that contains a variable from another source block 
> results in an additional incorrect new line at the end of the variable value 
> in the tangled output file, /only/ when source block output type is set to 
> 'drawer'.
>
> Here is a minimal example comparing regular source block output (correct) 
> versus drawer output (error), tested with emacs -Q, GNU Emacs 31.0.50 (build 
> 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, cairo version 1.16.0) of 
> 2025-05-27 and Org 9.7.11:
> ...

As a leftover from history, :results drawer is sometimes disabling
output parsing and cleanup, treating the results verbatim. That's one of
the reasons you had the final newline emitted by echo command in your
example.
Fixed, on main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=1d8dbae5f

Note, however, that your example *will not* work just yet.
You are using :results output, forcing Org to use the command output,
*including the final newline*. Org faithfully does it.
If you remove "output", your example will work, after the fix.

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>

Reply via email to