emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] generating org headings from a source block


From: Nick Dokos
Subject: Re: [O] generating org headings from a source block
Date: Tue, 10 Nov 2015 11:16:00 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Matt Price <address@hidden> writes:

>     > also, (c): I'd rather set the level of the org heading based on 
> context. Can I do that when I call
>     from
>     > a source block? Should I maybe be doing this some other way (e.g., jsut 
> write an interactive
>     function
>     > and call it with M-x? But I like being able to assemble all the 
> readings at one go, if possible. 
>     >
>    
>     Pass the level as a parameter?
>
> Can I pass the level of the current heading as a parameter, e.g.:
>  
>
> where obviously CURRENT-ORG-LEVEL is some function I don't know how to access?
>

You can at the very least set the level manually:

#+BEGIN_SRC elisp :results output raw :var level=3
...

by just eyeballing where the source block is in your file.
I think that's easy and does not require any programming.
You just have to remember to change the level when you cut
and paste the code block to other places.

There is org-current-level though if you want to go that way.

--
Nick




reply via email to

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