From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: generating org headings from a source block Date: Tue, 10 Nov 2015 11:16:00 -0500 Message-ID: <87si4dg79b.fsf@alphaville.usersys.redhat.com> References: <87wptqg7k5.fsf@alphaville.usersys.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47507) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZwBav-00085M-4b for emacs-orgmode@gnu.org; Tue, 10 Nov 2015 11:16:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZwBar-0000lD-SE for emacs-orgmode@gnu.org; Tue, 10 Nov 2015 11:16:29 -0500 Received: from plane.gmane.org ([80.91.229.3]:47847) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZwBar-0000kx-Lb for emacs-orgmode@gnu.org; Tue, 10 Nov 2015 11:16:25 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ZwBai-0002dC-5T for emacs-orgmode@gnu.org; Tue, 10 Nov 2015 17:16:16 +0100 Received: from nat-pool-bos-t.redhat.com ([66.187.233.206]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 10 Nov 2015 17:16:16 +0100 Received: from ndokos by nat-pool-bos-t.redhat.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 10 Nov 2015 17:16:16 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Matt Price 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