From: Thorsten Jolitz <tjolitz@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Moving my init.el to Org
Date: Sun, 31 Aug 2014 16:12:01 +0200 [thread overview]
Message-ID: <87tx4svjda.fsf@gmail.com> (raw)
In-Reply-To: m261h8omir.fsf@polytechnique.org
Alan Schmitt <alan.schmitt@polytechnique.org> writes:
> On 2014-08-31 11:20, Thorsten Jolitz <tjolitz@gmail.com> writes:
>
>> With outshine I have many of Org-mode's advantages (and using outorg I
>> can turn my elisp file into an org file in a second and have all of
>> them), but its still just about a source-file in emacs-lisp-mode, and
>> thats what makes things convenient, fast and dynamic.
>
> It there an easy way to turn an org file with many lisp source blocks
> into an outshine file? I cannot start from the tangled file as it's
> lacking all the org structure.
Yes, use
,----[ C-h f outorg-convert-org-to-outshine RET ]
| outorg-convert-org-to-outshine is a Lisp function in `outorg.el'.
|
| (outorg-convert-org-to-outshine &optional MODE INFILE OUTFILE BATCH)
|
| Convert an existing Org-mode file into an Outshine buffer.
|
| If MODE is non-nil, the Outshine buffer will be put in this
| major-mode, otherwise the major-mode of the language of the first
| source-code block in the Org-mode buffer will be used.
|
| If INFILE is non-nil, the specified Org-mode file will be
| visited, otherwise the current buffer will be used (i.e. the
| buffer content will be copied to a temporary *outorg-edit-buffer*
| for further processing).
|
| If OUTFILE is non-nil, the converted Outshine buffer will be
| saved in this file. Its the user's responsability to make sure
| that OUTFILE's file-extension is suited for the major-mode of the
| Outshine buffer to be saved. When in doubt, consult variable
| `auto-mode-alist' for associations between file-extensions and
| major-modes.
|
| If BATCH is non-nil (and OUTFILE is non-nil, otherwise it makes
| no sense), the new Outshine file is saved and its buffer
| deleted.
`----
Note:
1. I think I took care of converting
,----
| #+BEGIN_SRC emacs-lisp :cache no
| (+ 2 2)
| #+END_SRC
`----
to
,----
| ;; #+header: :cache no
| (+ 2 2)
`----
in outorg, but it was not flawless IIRC. You could run
,----[ C-h f org-dp-toggle-headers RET ]
| org-dp-toggle-headers is an interactive Lisp function in
| `org-dp-lib.el'.
|
| (org-dp-toggle-headers &optional ACTION)
|
| Toggle header argument representation.
| With prefix-arg, prompt user for ACTION, otherwise, if non-nil,
| it should take one the values `swap', `header' or `param',
| meaning to either swap :header and :parameter values, or make
| them all :header or :parameter values repectively.
`----
on your src-blocks before conversion, as an alternative, like this
,----
| (org-dp-toggle-headers &optional 'header)
`----
to avoid losing the src-block header-args during conversion.
2. Call 'outorg-convert-org-to-outshine' just once, its only for the
initial conversion. Then you have an outshine file that you convert to
org occasionally with the usual 'outorg-edit-as-org'.
--
cheers,
Thorsten
next prev parent reply other threads:[~2014-08-31 14:12 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-31 8:37 Moving my init.el to Org Marcin Borkowski
2014-08-31 9:20 ` Thorsten Jolitz
2014-08-31 10:05 ` Thorsten Jolitz
2014-08-31 12:45 ` Alan Schmitt
2014-08-31 14:12 ` Thorsten Jolitz [this message]
2014-09-01 20:27 ` Alan Schmitt
2014-09-01 21:24 ` Thorsten Jolitz
2014-09-02 8:20 ` Alan Schmitt
2014-09-02 9:22 ` Thorsten Jolitz
2014-08-31 10:37 ` Rasmus
2014-08-31 12:41 ` Grant Rettke
2014-09-01 1:24 ` Brady Trainor
2014-09-01 15:27 ` Oleh
2014-09-02 9:01 ` Rainer M Krug
2014-09-02 12:42 ` Rasmus
2014-09-02 12:52 ` Jonathan Leech-Pepin
2014-09-03 6:49 ` Rainer M Krug
2014-09-03 11:17 ` Oleh
2014-09-03 11:48 ` Rainer M Krug
2014-09-05 14:27 ` Marcin Borkowski
2014-09-06 2:49 ` Thorsten Jolitz
2014-09-06 9:26 ` Eduardo Ochs
2014-09-06 10:10 ` Thorsten Jolitz
2014-10-30 10:19 ` OrgStruct: start with collapsed view (was: Moving my init.el to Org) Karl Voit
2014-10-30 10:32 ` OrgStruct: start with collapsed view Rasmus
2014-10-30 12:41 ` Thorsten Jolitz
2014-10-31 22:10 ` Scott Randby
2014-11-01 10:16 ` Karl Voit
2014-11-01 10:44 ` Thorsten Jolitz
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=87tx4svjda.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).