emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Eric Schulte" <schulte.eric@gmail.com>
To: Scot Becker <scot.becker@gmail.com>
Cc: Dan Davison <davison@stats.ox.ac.uk>,
	Org-mode ml <emacs-orgmode@gnu.org>
Subject: Re: org-style folding for a .emacs
Date: Tue, 14 Jul 2009 22:17:37 -0700	[thread overview]
Message-ID: <m2vdlua5ji.fsf@gmail.com> (raw)
In-Reply-To: <e0e1fe620907140401v6386d567kc05c2e815f41393a@mail.gmail.com> (Scot Becker's message of "Tue, 14 Jul 2009 12:01:01 +0100")

Scot Becker <scot.becker@gmail.com> 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

  reply	other threads:[~2009-07-15  5:17 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-13 21:23 org-style folding for a .emacs Scot Becker
2009-07-13 22:56 ` Eric S Fraga
2009-07-13 23:07 ` Michael Zeller
2009-07-14 11:55   ` Sébastien Vauban
2009-07-15  3:12     ` Michael Zeller
2009-07-15 15:52       ` Sébastien Vauban
2009-07-13 23:26 ` Dan Davison
2009-07-14 11:01   ` Scot Becker
2009-07-15  5:17     ` Eric Schulte [this message]
2009-07-15 21:02       ` Sébastien Vauban
2009-07-16 23:31         ` Eric Schulte
2009-07-28 14:39           ` Sébastien Vauban
2009-07-30  0:51             ` Eric Schulte
2009-07-16  1:02 ` Daniel Clemente
2009-07-16 19:50 ` Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2vdlua5ji.fsf@gmail.com \
    --to=schulte.eric@gmail.com \
    --cc=davison@stats.ox.ac.uk \
    --cc=emacs-orgmode@gnu.org \
    --cc=scot.becker@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).