emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-export-handle-include-files
@ 2012-12-08  4:08 Tony Day
  2012-12-08 15:24 ` org-export-handle-include-files Nick Dokos
  0 siblings, 1 reply; 3+ messages in thread
From: Tony Day @ 2012-12-08  4:08 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org org

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?  Is there a method where you can use #+INCLUDE without overwriting the current buffer?

tony
tonyday567@gmail.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: org-export-handle-include-files
  2012-12-08  4:08 org-export-handle-include-files Tony Day
@ 2012-12-08 15:24 ` Nick Dokos
  2012-12-08 23:24   ` org-export-handle-include-files Tony Day
  0 siblings, 1 reply; 3+ messages in thread
From: Nick Dokos @ 2012-12-08 15:24 UTC (permalink / raw)
  To: Tony Day; +Cc: emacs-orgmode@gnu.org org

Tony Day <zygomega@gmail.com> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: org-export-handle-include-files
  2012-12-08 15:24 ` org-export-handle-include-files Nick Dokos
@ 2012-12-08 23:24   ` Tony Day
  0 siblings, 0 replies; 3+ messages in thread
From: Tony Day @ 2012-12-08 23:24 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: emacs-orgmode@gnu.org org


On 9 Dec 2012, at 02:24, Nick Dokos <nicholas.dokos@hp.com> wrote:
> 
> 
>> 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

Great.  Thanks Nick :-)

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-12-08 23:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-08  4:08 org-export-handle-include-files Tony Day
2012-12-08 15:24 ` org-export-handle-include-files Nick Dokos
2012-12-08 23:24   ` org-export-handle-include-files Tony Day

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).