From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: org-style folding for a .emacs Date: Tue, 14 Jul 2009 22:17:37 -0700 Message-ID: References: <8763dwxiyu.fsf@stats.ox.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MQwsH-000070-8G for emacs-orgmode@gnu.org; Wed, 15 Jul 2009 01:17:49 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MQwsC-0008UJ-Iz for emacs-orgmode@gnu.org; Wed, 15 Jul 2009 01:17:48 -0400 Received: from [199.232.76.173] (port=47875 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MQwsC-0008UA-8i for emacs-orgmode@gnu.org; Wed, 15 Jul 2009 01:17:44 -0400 Received: from wf-out-1314.google.com ([209.85.200.168]:7577) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MQwsB-0004Lb-FT for emacs-orgmode@gnu.org; Wed, 15 Jul 2009 01:17:43 -0400 Received: by wf-out-1314.google.com with SMTP id 23so1202968wfg.24 for ; Tue, 14 Jul 2009 22:17:41 -0700 (PDT) In-Reply-To: (Scot Becker's message of "Tue, 14 Jul 2009 12:01:01 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Scot Becker Cc: Dan Davison , Org-mode ml Scot Becker writes: > Thanks Eric, Michael and Dan, for the assistance. > > Both options look good (outline-minor-mode and a literate org file). > > My first draft of this request for help actually included > consideration of a "literate" org file, but I deleted it, since I > thought it would be too complex, and your work (Dan) was too far from > finished to be usable by someone of Not A Lot of Time. If I can make > it work, this does sound even more powerful than the > outline-minor-mode solution. Hi Scot, I've added some simplifying functions to the literate programming functionality of org-babel. It should now be easy to embed your elisp initialization into org-mode files. Specifically there is now a new `org-babel-load-file' function which can load the elisp portions of org-mode files in the same manner as the normal `load-file' command. To use this you need to clone the latest version of org-babel[1], and then add the following to your emacs initialization (this worked for me when a base emacs "emacs -Q"). --8<---------------cut here---------------start------------->8--- (add-to-list 'load-path "~/path/to/org/lisp") (add-to-list 'load-path "~/path/to/org-babel/lisp") (require 'org-babel-init) ;; now you can load your org-mode files with embedded elisp (org-babel-load-file "~/path/to/org-mode-file.org") ;; for example (org-babel-load-file "~/path/to/org-babel/test-tangle.org") --8<---------------cut here---------------end--------------->8--- Hopefully this will provide the literate programming functionality without too much trouble. Cheers -- Eric > I had two reasons for the request: first it was just to have a modular > init file without actually making it modular (i.e. by folding it > org-like), the second was to make an init file that might be of use to > others, especially Emacs beginners, for which an org-rich literate > solution would be nice, both for its folding and for links to the full > range of things that org supports (or can be made to support). > > Thanks all for the examples. I'll give it a try. > > Scot > > > _______________________________________________ > Emacs-orgmode mailing list > Remember: use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode Footnotes: [1] git clone git://github.com/eschulte/org-babel.git