emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Thorsten Jolitz <tjolitz@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Writing .el files for org in org?
Date: Tue, 27 May 2014 10:45:24 +0200	[thread overview]
Message-ID: <8738fv1ufv.fsf@gmail.com> (raw)
In-Reply-To: m2oayq51dz.fsf@krugs.de

Rainer M Krug <Rainer@krugs.de> writes:

Hi Rainer, 

> But as I am struggling with elisp, I would like to put the ob-R.el file
> into an org file which is then tangled into the ob-R.el file.

again, this is the main use case for outshine & outorg. 

They work with old-school and outshine (= outcommented org-mode)
headlines, so you just have to structure ob-R.el with some headlines,
either like this:

,--------------
| ;;; Level 1
| ;;;; Level 2
`--------------

or like this

,---------------
| ;; * Level 1
| ;; ** Level 2
`---------------

(just like you structure an Org file) and then you can switch between
emacs-lisp-mode and org-mode with

,-----------------------------
| M-# M-# (outorg-edit-as-org)
`-----------------------------

and 

,---------------------------------
| M-# (outorg-copy-edits-and-exit)
`---------------------------------

Org-mode and emacs-lisp-mode thus become two different views on the same
(well-structured) file, and you can easily switch between them. 

-- 
cheers,
Thorsten

  parent reply	other threads:[~2014-05-27  8:45 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-21 20:21 Writing .el files for org in org? Rainer M Krug
2014-05-21 23:25 ` Aaron Ecay
2014-05-22  8:12   ` Rainer M Krug
2014-05-22  8:56   ` Bastien
2014-05-22  9:25     ` Rainer M Krug
2014-05-22  9:29       ` Bastien
2014-05-22  9:54         ` Rainer M Krug
2014-05-22 11:04           ` Bastien
2014-05-22 11:42             ` Rainer M Krug
2014-05-22 15:10               ` Bastien
2014-05-23  7:29                 ` Rainer M Krug
2014-06-02 11:22             ` John Kitchin
2014-06-02 14:00               ` Rainer M Krug
2014-07-27 21:50                 ` Bastien
2014-07-30  2:04                   ` John Kitchin
2014-05-22 15:44           ` Josh Berry
2014-05-22 18:49             ` Rainer M Krug
2014-05-22  0:30 ` Grant Rettke
2014-05-22  8:30   ` Rainer M Krug
2014-05-22 23:34     ` Grant Rettke
2014-05-27  8:45 ` Thorsten Jolitz [this message]
2014-05-27  9:07   ` Rainer M Krug

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=8738fv1ufv.fsf@gmail.com \
    --to=tjolitz@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /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).