Hello,

Achim Gratz <strom...@nexgo.de> writes:

> That's not yet possible.  The following patch would implement it, but I
> guess there are a few things that need to be discussed before this gets
> official, if at all.  I haven't given it much testing either.
>
> From 425b53146b99b1dd9b9b5d9b96e950dfea81835c Mon Sep 17 00:00:00 2001
> From: Achim Gratz <strom...@stromeko.de>
> Date: Sun, 1 Jun 2014 09:49:48 +0200
> Subject: [PATCH] ox: implement "wrap" for #+INCLUDE
>
> * lisp/ox.el (org-export-expand-include-keyword): Implement additional
>   "wrap" parameter for including files literally, wrapped in an
>   appropriate block (usually an export block).  The contents of the
>   file gets included literally.

Thanks for the patch. However, I'd rather not allow arbitrary blocks
around included files, as it can be the source of some headache (e.g.,
a quote block around an Org file containing a headline). Also we don't
really need it since most use-cases are already supported.

Actually, I think there are two possible ways to handle this:

  1. Add a new "export" (or something else) parameter which will wrap
     file contents within an export block relative to the current
     back-end. Unfortunately, this will not work for exotic back-ends
     that do not provide such a block (:export-block property in its
     definition). We can always fallback to an example block in this
     case, though.

  2. Extend "src" syntax to allow Babel parameters after the language.
     E.g.,

       #+INCLUDE: "file.html" src html :results html

WDYT?


Regards,

-- 
Nicolas Goaziou

Reply via email to