From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: org-export-handle-include-files Date: Sat, 08 Dec 2012 10:24:06 -0500 Message-ID: <6494.1354980246@alphaville> References: <031D6BA7-0AF1-4214-869A-99B7CA8F861B@gmail.com> Reply-To: nicholas.dokos@hp.com Return-path: Received: from eggs.gnu.org ([208.118.235.92]:43006) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ThMGG-00007W-Gj for emacs-orgmode@gnu.org; Sat, 08 Dec 2012 10:24:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ThMGF-00080b-Jr for emacs-orgmode@gnu.org; Sat, 08 Dec 2012 10:24:16 -0500 Received: from g1t0028.austin.hp.com ([15.216.28.35]:35783) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ThMGF-0007xn-Ep for emacs-orgmode@gnu.org; Sat, 08 Dec 2012 10:24:15 -0500 In-Reply-To: Message from Tony Day of "Sat, 08 Dec 2012 15:08:16 +1100." <031D6BA7-0AF1-4214-869A-99B7CA8F861B@gmail.com> 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Tony Day Cc: "emacs-orgmode@gnu.org org" Tony Day wrote: > In the current buffer, org-export-handle-include-file overwrites: > > #+INCLUDE: "./some-other-file.org" > > with contents of the other file. For example, > > #+BEGIN_EXAMPLE > * other file header > :PROPERTIES: > :OTHER_PROPS: yes > :END: > > Contents of the other file. > > #+END_EXAMPLE > > Is this the intended behaviour? Yes. > Is there a method where you can use > #+INCLUDE without overwriting the current buffer? > You can do what org-export-preprocess-string does: create a temp buffer, insert the contents of the original buffer and call org-export-handle-include-files (or org-export-handle-include-files-recurse) in that buffer. Nick