emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] [ANN] Convert Org-mode file to Source-code file


From: Thorsten Jolitz
Subject: Re: [O] [ANN] Convert Org-mode file to Source-code file
Date: Fri, 21 Jun 2013 11:00:46 +0200
User-agent: Gnus/5.130002 (Ma Gnus v0.2) Emacs/24.3 (gnu/linux)

Charles Berry <address@hidden> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]