From: Thorsten Jolitz <tjolitz@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: [ANN] Convert Org-mode file to Source-code file
Date: Fri, 21 Jun 2013 11:00:46 +0200 [thread overview]
Message-ID: <87ehbvbzy9.fsf@gmail.com> (raw)
In-Reply-To: loom.20130620T200615-356@post.gmane.org
Charles Berry <ccberry@ucsd.edu> writes:
> Thorsten Jolitz <tjolitz <at> gmail.com> writes:
>
>>
>> Hi List,
>>
>> it is now possible to convert existing Org-mode files with
>> source-blocks into machine-executable source-code files, using the
>> following function from `outorg.el':
>>
>> #+begin_src emacs-lisp
>> (defun outorg-convert-org-file-to-source-code
>> (&optional mode infile outfile BATCH)
>
>
> With this buffer
>
> ,----
> |
> |
> | * head1
> |
> | abc
> |
> |
> | #+NAME: test-src
> | #+BEGIN_SRC R
> | ls()
> | #+END_SRC
> `----
>
> it fails with
>
> Debugger entered--Lisp error: (void-variable
> outorg-code-buffer-beg-of-subtree-marker)
> (set-marker outorg-code-buffer-beg-of-subtree-marker nil)
> outorg-reset-global-vars()
> outorg-copy-edits-and-exit()
> ...
>
> in the backtrace.
This should be fixed now, thanks for reporting.
> The tmp buffer looks right, though
>
> ,----
> |
> |
> | ## * head1
> |
> | ## abc
> |
> |
> | ## #+NAME: test-src
> | ls()
> `----
Please note that I renamed
,---------------------------------------
| outorg-convert-org-file-to-source-code
`---------------------------------------
to
,-------------------------------
| outorg-convert-org-to-outshine
`-------------------------------
because that better reflects its purpose.
This
,--------------
| ## * head1
`--------------
is actually the decisive part of the output, since the converted
source-code file will have (if outshine is activated) the look&feel of
the original Org-mode file, only that now the text parts are 'caged'
behind comments while in the Org file the source code was 'caged' in
special blocks.
--
cheers,
Thorsten
next prev parent reply other threads:[~2013-06-21 9:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-20 0:19 [ANN] Convert Org-mode file to Source-code file Thorsten Jolitz
2013-06-20 18:17 ` Charles Berry
2013-06-21 9:00 ` Thorsten Jolitz [this message]
2013-06-21 16:11 ` Charles Berry
2013-06-21 17:16 ` Thorsten Jolitz
2013-06-20 18:37 ` Eric Schulte
2013-06-21 9:58 ` 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=87ehbvbzy9.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).