emacs-orgmode
[Top][All Lists]
Advanced

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

[FR] Allow to #+include files verbatim without any processing (was: Have


From: Ihor Radchenko
Subject: [FR] Allow to #+include files verbatim without any processing (was: Have export treat file: paths in INCLUDED file relative to the INCLUDING file's dir)
Date: Tue, 28 Feb 2023 10:34:06 +0000

gnuric@pm.me writes:

> I have a file s.org in ./ (current directory), which includes
> another file s0.org living under ./media/s/:
>
> ./s.org:
>
> #+TITLE: s
> #+INCLUDE: "./media/s/s0.org"
>
> ./media/s/s0.org:
>
> * s0
> ** s01
>    file:media/s01_image.png
>
> I want the org export to html to treat the file: paths in
> ./media/s/s0.org with respect to the directory of the ./s.org
> file. In other words, I want export NOT TO TOUCH the file: paths
> as written included files and effectively just paste the text of
> s0.org verbatim in s.org (basically similar to what #include
> directive in C preprocessor would do, e.g.). As of now, the above
> s.org exports to s.html which has the file: link converted to

This sounds like a reasonable request.
What we may do here is allowing a new parameter :verbatim

#+include: "/path/to/file" :verbatim t

This will disable footnote and link processing in
`org-export--prepare-file-contents'.

Though I am not sure if it is good enough to provide disable all/enable
all switch. Maybe even more fine-grained? - Just footnotes or just
links.

I am also not sure about other things
`org-export--prepare-file-contents' does, like indentation handling.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>



reply via email to

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