[Top][All Lists]

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

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

From: Matt Price
Subject: Re: [O] generating org headings from a source block
Date: Tue, 10 Nov 2015 11:31:03 -0500

On Tue, Nov 10, 2015 at 11:16 AM, Nick Dokos <address@hidden> wrote:

>     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.

:var level=(1+ (org-current-level))
works great.  Thank you Nick!

reply via email to

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