Hello,
I have a main text file in which I have included several other files (tex files for example) using the make-include command.
I would like to be able to expand only one of these included files , so that I can access and edit its content directly in TeXmacs, without expanding all the other inclusions in the main document.
I know about the buffer-expand-includes command, but it expands all included files at once.
What I am looking for is a function that can expand only a single included file — specifically, the one that appears just above the cursor at the moment of execution.
More precisely, this function should:
- locate in the document tree the first
(include ...)node above the cursor; - replace this node with the actual content of the included file;
- move the cursor to the end of the newly inserted content.
I have tried to adapt the buffer-expand-includes function and the definitions found in
progs/generic/document-part.scm , but I haven’t succeeded so far.
Perhaps such a function already exists?
Thank you very much for any help or suggestions you might provide.