0

I have a document (let's say myfile.org) in which I use copies of a same section in several places. In order to avoid text duplication, I use the following syntax:

#+include: "./myfile.org::#section_to_copy_id :onlycontents t"

This works as expected but I would like to remove the explicit reference to the name of the current file (because I often duplicate the file and I must change the name for each include line).

Is it possible to use and implicit notation to tell to the include directive to use the current file?

I also tried with defining a macro:

#+MACRO: filename (eval (buffer-file-name (window-buffer (minibuffer-selected-window))))

but macros do not seem to be expanded in #+include: directives.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.