Giter VIP home page Giter VIP logo

Comments (10)

renard avatar renard commented on August 22, 2024

Currently the #+include: file does not work. But writing a piece of code to include the raw content of file could be easily done.

A quick look shows up the org-export-expand-include-keyword would help.

I leave the post open since I won't be available for a couple of weeks.

from o-blog.

renard avatar renard commented on August 22, 2024

Can you please try to apply that patch:

diff --git a/o-blog.el b/o-blog.el
index 54eebcb..6791e61 100644
--- a/o-blog.el
+++ b/o-blog.el
@@ -664,6 +664,7 @@ headers and body."
        (insert text)
        (goto-char (point-min))
        (org-mode)
+       (org-export-expand-include-keyword)
        (while (<= 2 (save-match-data (funcall outline-level)))
          (org-promote-subtree))
        (run-hooks 'o-blog-html-plugins-hook)

from o-blog.

geekinthesticks avatar geekinthesticks commented on August 22, 2024

Thanks that doesn't work. I have had a look at org-exp.el and it looks as though using org-export-handle-include-files should work, but it doesn't. My elisp skills are very basic, so I am not sure why it isn't working.

from o-blog.

renard avatar renard commented on August 22, 2024

Ok I do not have any free time this week. I would be able to have a look at beginning of November to fix this.

Cheers.

from o-blog.

geekinthesticks avatar geekinthesticks commented on August 22, 2024

Thank you, meanwhile I'll see if I can fix it myself.

from o-blog.

geekinthesticks avatar geekinthesticks commented on August 22, 2024

A bit of progress - the following:

(defun org-publish-blog-sync (file)
"Publish FILE synchronously."
(with-current-buffer (or
(get-file-buffer file)
(find-file file))
(org-export-handle-include-files)

(run-hooks 'o-blog-before-publish-hook)

does correctly include all INCLUDE files, but the full included text ends up in sample.org. I guess I need to try and modify it so it creates a temp file, with all the inclusions then uses the temp file for the export.

from o-blog.

tonyday567 avatar tonyday567 commented on August 22, 2024

Any progress? I have asked the question in the org mailing list about this. It doesn't feel like the intended behaviour.

Message copy/pasted below:

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

from o-blog.

ifree avatar ifree commented on August 22, 2024

Can this solve in o-blog v2 ?

from o-blog.

renard avatar renard commented on August 22, 2024

The aim of V2 is to allow user to organize their files as they want.
Thus this might be possible. For the moment V2 is in a big early stage.

from o-blog.

jave avatar jave commented on August 22, 2024

isnt this fixed now? I use #INCLUDE all the time!

from o-blog.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.