TransWikia.com

How can I set default paths for INCLUDE blocks under each heading in orgmode?

Emacs Asked by scientific_explorer on September 2, 2021

I am writing a document where I have a collection of code for different topics. My document structure is as follows.

* Heading1

Some text
#+include: "Heading1/file11.py" src python

Test illustrating something else
#+include: "Heading1/file64.py" src python


* Heading2

Some text
#+include: "Heading2/file84.py" src python

Test illustrating something else
#+include: "Heading2/file96.py" src python

My directory structure is as below.

.
├── Heading1
│   ├── file11.py
│   └── file64.py
└── Heading2
    ├── file84.py
    └── file96.py

Is there a way I can do something like the following where I declare each base folder under each heading so that I don’t have to repeatedly write the heading when I include the source file?

* Heading1
#+declare base foldername as Heading1

Some text
#+include: "file11.py" src python

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP