[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Bug: regression with :export both :noweb strip-export [9.2 (9.2-

From: Alexandre Duret-Lutz
Subject: Re: [O] Bug: regression with :export both :noweb strip-export [9.2 (9.2-elpa @ /home/adl/.emacs.d/elpa/org-20181230/)]
Date: Wed, 16 Jan 2019 21:28:16 +0100

On Tue, Jan 15, 2019 at 11:50 PM Alexandre Duret-Lutz <address@hidden> wrote:
> Since I updated to org 9.2, the following idiom stopped working.
> ------------------
> #+NAME: context
> #+BEGIN_SRC C++ :exports none
> #include <iostream>
> int u = 0;
> #+BEGIN_SRC C++ :exports both :noweb strip-export :results verbatim
> <<context>>
> int main()
> {
>   std::cout << "bar\n";
>   return u;
> }
> ------------------
> Upon export to html I'm expecting to see the second block of code with
> <<context>> stripped away, followed by a block of text containing the
> result (bar).  With Org 9.2 I don't get the latter, because the
> compilation of this small program fails during the export.  Inspection
> of the temporary file passed to the compiler reveals that <<context>>
> has been stripped away from the code passed as input to the compiler,
> not just from the code displayed in html.

FWIW, reverting the change made to org-babel-exp-results in the following
patch seems to fix my issue.

commit 8e54cafeb286ea5eb25565a637b121a2f597c48b
Author: Nicolas Goaziou <address@hidden>
Date:   Sat Jun 23 23:04:45 2018 +0200

    Fix noweb expansion during export

    * lisp/ob-core.el (org-babel-sha1-hash): Add optional argument to
      specify context.
    (org-babel-execute-src-block): Use new argument.
    * lisp/ob-exp.el (org-babel-exp-src-block): Use new argument.
    (org-babel-exp-results): Fix context.

    Reported-by: Ken Mankoff <address@hidden>

Alexandre Duret-Lutz

reply via email to

[Prev in Thread] Current Thread [Next in Thread]