Skip to content

[Feature Request] Parse #+INCLUDE lines #17

Open

Description

@spicyriceball

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?

Activity

  1. kaushalmodi commented on Apr 8, 2020

    @kaushalmodi
    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.

  2. kaushalmodi commented on Apr 8, 2020

    @kaushalmodi
    Member

    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.

  3. added a commit that references this issue on May 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions