emacs-orgmode
[Top][All Lists]
Advanced

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

[O] Noweb blocks duplicate during Org export if part of #+include


From: Kaushal Modi
Subject: [O] Noweb blocks duplicate during Org export if part of #+include
Date: Thu, 6 Dec 2018 09:34:22 -0500

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 <<some_snippet>> 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
<<some_snippet>> 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 ()
  <<some_snippet>>
  )
#+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



reply via email to

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