From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: gdetre@gmail.com Newsgroups: gmane.emacs.help Subject: Recursively including files Date: 18 Sep 2006 22:00:03 -0700 Organization: http://groups.google.com Message-ID: <1158642003.421249.59300@e3g2000cwe.googlegroups.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: sea.gmane.org 1158644451 10790 80.91.229.2 (19 Sep 2006 05:40:51 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 19 Sep 2006 05:40:51 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Sep 19 07:40:51 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GPYLi-0007mM-6t for geh-help-gnu-emacs@m.gmane.org; Tue, 19 Sep 2006 07:40:50 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GPYLh-0001Ra-Dc for geh-help-gnu-emacs@m.gmane.org; Tue, 19 Sep 2006 01:40:49 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!e3g2000cwe.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 59 Original-NNTP-Posting-Host: 140.180.135.66 Original-X-Trace: posting.google.com 1158642008 22544 127.0.0.1 (19 Sep 2006 05:00:08 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Tue, 19 Sep 2006 05:00:08 +0000 (UTC) User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.7) Gecko/20060909 Firefox/1.5.0.7,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: e3g2000cwe.googlegroups.com; posting-host=140.180.135.66; posting-account=egscuA0AAADmw6uEnKDrezAYEUN8vMg4 Original-Xref: shelby.stanford.edu gnu.emacs.help:141859 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:37481 Archived-At: 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: my_filename.muse 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 file1.muse 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