Skip to content
This repository has been archived by the owner on Aug 14, 2024. It is now read-only.

RFC: Outer file references #39

Open
MatejKastak opened this issue Aug 23, 2020 · 0 comments
Open

RFC: Outer file references #39

MatejKastak opened this issue Aug 23, 2020 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed question Further information is requested
Milestone

Comments

@MatejKastak
Copy link
Owner

Motivation

In order to avoid text duplication, its nice to be able to specify a portion of text that should be included from another document. This will be extra handy if some notes should include answer from another note (e.g. exam note) or when creating a whole document as a compilation of notes.

Constrains

  • users should only need to specify only a file path and a heading to search
  • if two titles have name collision allow users to specify a unique link or some sort of ID of the heading they want to include
  • users should be able to specify whether to include also heading or only the body part of specified node
  • all images in the included nodes should be processed correctly
  • allow users to input another options like depth of include

Technical implementation

This cannot be done with a pure org-mode since pandoc does not support including only portion of files org-doc (example: /tmp/file.org:*My heading).

  • The files need to be preprocessed and all links (images, etc) needs to be normalized when the text is included
  • We will write a preprocessor in python that will create a temporary file with all includes replaced with corresponding text
  • I don't think there is a reason to support recursive references (this can potentially simplify implementation)
  • I would like this to generate reasonable pdfs even without preprocessor, for example the references should not break the original org file syntax

Syntax - TBD

An example document showcasing the different ways to include other nodes.

@MatejKastak MatejKastak added enhancement New feature or request help wanted Extra attention is needed question Further information is requested labels Aug 23, 2020
@MatejKastak MatejKastak added this to the 2.0.0 milestone Aug 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant