Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Parse #+INCLUDE lines #17

Open
spicyriceball opened this issue Apr 8, 2020 · 2 comments
Open

[Feature Request] Parse #+INCLUDE lines #17

spicyriceball opened this issue Apr 8, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@spicyriceball
Copy link

Sometimes org files are split into multiple org files. This could be due to multiple org files using the same parts, so it's sort of "DRY", or you simply have modular stuff you want to bring into one file. The INCLUDE word can be used to include lines from other files when exporting.

Currently, you have to do something like this with ntangle:

emacs file.org -q --batch -f org-org-export-to-org --kill
ntangle file.org.org
rm file.org.org

it could be nice if we could just do:

ntangle file.org

However, it does make sense if the maintainer doesn't want this in ntangle since the default org-babel-load-file (which ntangle sort of mimics?) doesn't have this behavior as far as I know. Thoughts on throwing this onto the backlog or nay?

@kaushalmodi
Copy link
Member

The #+include is a pretty loaded functionality.. it then opens up the need to support the full include functionality, which I am not open to. PR's are of course welcome.

But I don't mind adding functionality for just the basic #+include: /path/to/the/other/file.org.

@kaushalmodi
Copy link
Member

kaushalmodi commented Apr 8, 2020

In summary:

Feature Example Will be supported by ntangle?
#+include: "~/my-book/chapter2.org" Yes
#+include: "~/my-book/chapter2.org" :minlevel 1 No
#+include: "~/.emacs" src emacs-lisp No
#+include: "~/my-book/chapter2.org" :minlevel 1 No
#+include: "~/.emacs" :lines "5-10" No
#+include: "~/.emacs" :lines "-10" No
#+include: "~/.emacs" :lines "10-" No
#+include: "./paper.org::*conclusion" :lines 1-20 No
#+include: "./paper.org::#theory" :only-contents t No

Examples are from the Org manual.

@kaushalmodi kaushalmodi added the enhancement New feature or request label Apr 8, 2020
kaushalmodi added a commit that referenced this issue May 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants