From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexandre Duret-Lutz Subject: Re: 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 Message-ID: References: <87h8e94jsx.fsf@couscous.lrde.epita.fr> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: Received: from eggs.gnu.org ([209.51.188.92]:47859) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjrnj-00024X-OD for emacs-orgmode@gnu.org; Wed, 16 Jan 2019 15:28:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gjrnh-0003tN-H3 for emacs-orgmode@gnu.org; Wed, 16 Jan 2019 15:28:39 -0500 Received: from mail-qt1-x82b.google.com ([2607:f8b0:4864:20::82b]:34927) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gjrng-0003jl-Sk for emacs-orgmode@gnu.org; Wed, 16 Jan 2019 15:28:37 -0500 Received: by mail-qt1-x82b.google.com with SMTP id v11so8845776qtc.2 for ; Wed, 16 Jan 2019 12:28:33 -0800 (PST) In-Reply-To: <87h8e94jsx.fsf@couscous.lrde.epita.fr> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org Cc: mail@nicolasgoaziou.fr On Tue, Jan 15, 2019 at 11:50 PM Alexandre Duret-Lutz wrote: > Since I updated to org 9.2, the following idiom stopped working. > > ------------------ > #+NAME: context > #+BEGIN_SRC C++ :exports none > #include > int u = 0; > #+END_SRC > > #+BEGIN_SRC C++ :exports both :noweb strip-export :results verbatim > <> > int main() > { > std::cout << "bar\n"; > return u; > } > #+END_SRC > ------------------ > > Upon export to html I'm expecting to see the second block of code with > <> 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 <> > 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 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 -- Alexandre Duret-Lutz