* Recursively including files
@ 2006-09-19 5:00 gdetre
2006-09-20 18:59 ` John Sullivan
0 siblings, 1 reply; 2+ messages in thread
From: gdetre @ 2006-09-19 5:00 UTC (permalink / raw)
Dear all,
I'm a grad student, and I write a lot of notes. There's
often considerable redundancy between related topics, where
I end up wanting to have the same paragraph appear in
multiple places. If we were programming, we'd abstract the
general case as a function, and call it when necessary. In
terms of writing notes, I would like to be able to create
some markup in my notes that means "embed some other file's
contents here".
Two things make this complicated: I would
like to be able to edit an embedded file in-place and for those
changes to be saved into the embedded file, and I would like
to have embedded files be able to embed other files.
I use Emacs Muse as my markup/publishing environment, and it
works well. Michael Olson has suggested something like the
following approach:
1) when you open the file, scan for something like the
following markup:
<include> my_filename.muse </include>
2) place a marker at the very beginning and end of that
region
3) make everything between the markers invisible, and maybe
intangible
4) insert the contents of my_filename.muse between the two
markers, maybe in a different color
5) upon saving, check inside the contents of the throwaway region
we've defined (between the markers) for any nested
embedded files/throwaway regions
6) for each throwaway region, save its contents to the
appropriate file
I hope that's clear. In other words, I want to be able to
deal with a file like the following:
* Heading 1
This is my file. It includes file1.muse
<include> file1.muse </include>
Where file1.muse also includes another file. Is there any
functionality that you can think of that would help me,
beyond pairs of markers, buffer-local-variables and
invisibility/intangibility? Any suggestions would be
welcomed,
Thank you,
Greg
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Recursively including files
2006-09-19 5:00 Recursively including files gdetre
@ 2006-09-20 18:59 ` John Sullivan
0 siblings, 0 replies; 2+ messages in thread
From: John Sullivan @ 2006-09-20 18:59 UTC (permalink / raw)
gdetre@gmail.com writes:
> Two things make this complicated: I would
> like to be able to edit an embedded file in-place and for those
> changes to be saved into the embedded file, and I would like
> to have embedded files be able to embed other files.
>
You really want the full duplicated text to appeear in all of these other
files? Why not just use a Muse hyperlink to the appropriate paragraph, which
then exists in just one place?
--
-John Sullivan
-http://www.wjsullivan.net
-GPG Key: AE8600B6
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-09-20 18:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-19 5:00 Recursively including files gdetre
2006-09-20 18:59 ` John Sullivan
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.