[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orgmode] org-style folding for a .emacs
From: |
Eric Schulte |
Subject: |
Re: [Orgmode] org-style folding for a .emacs |
Date: |
Tue, 14 Jul 2009 22:17:37 -0700 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.92 (darwin) |
Scot Becker <address@hidden> 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.
> address@hidden
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Footnotes:
[1] git clone git://github.com/eschulte/org-babel.git
Re: [Orgmode] org-style folding for a .emacs, Michael Zeller, 2009/07/14
Re: [Orgmode] org-style folding for a .emacs, Daniel Clemente, 2009/07/15
Re: [Orgmode] org-style folding for a .emacs, Bastien, 2009/07/16