From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kaushal Modi Subject: Noweb blocks duplicate during Org export if part of #+include Date: Thu, 6 Dec 2018 09:34:22 -0500 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34188) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gUuk2-0001PO-2N for emacs-orgmode@gnu.org; Thu, 06 Dec 2018 09:35:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gUuk1-0003VH-7l for emacs-orgmode@gnu.org; Thu, 06 Dec 2018 09:35:01 -0500 Received: from mail-lj1-x22d.google.com ([2a00:1450:4864:20::22d]:39385) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gUuk0-0003Ul-Vg for emacs-orgmode@gnu.org; Thu, 06 Dec 2018 09:35:01 -0500 Received: by mail-lj1-x22d.google.com with SMTP id t9-v6so605545ljh.6 for ; Thu, 06 Dec 2018 06:35:00 -0800 (PST) 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-org list Hello, Here is a MWE: 1. With point on the "** Foo" section, running C-c C-e C-s h o, will result in noweb-duplicate-bug.html with the <> block expanded only once, as expected. 2. But with point on the "* Foo Included" section, running the same C-c C-e C-s h o, will result in foo_included.html with the <> block expanded twice! It seems like the Noweb expansion happens first as usual, and then again when parsing #+include (which shouldn't happen?). ===== #+title: Noweb Duplicating Bug #+author: Kaushal Modi * Reused Sections ** Foo :PROPERTIES: :CUSTOM_ID: foo :END: *** Some Snippet #+begin_src emacs-lisp :noweb-ref some_snippet (message "Hello") #+end_src *** Some Snippet used again #+begin_src emacs-lisp :noweb yes (defun foo () <> ) #+end_src * Foo Included :PROPERTIES: :EXPORT_FILE_NAME: foo_included :END: #+include: "./noweb-duplicate-bug.org::#foo" :only-contents t ===== Org version, built from next branch: Org mode version 9.1.14 (release_9.1.14-1147-g6f8347 @ /home/kmodi/usr_local/apps/6/emacs/old-emacsclient/share/emacs/site-lisp/org/) -- Kaushal Modi