emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Rob Duncan <rduncan@tesla.com>
To: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Access outline from a code block
Date: Sun, 31 Jul 2016 19:09:09 +0000	[thread overview]
Message-ID: <B9092180-B1A2-49C8-81B3-515D1F6E42B3@teslamotors.com> (raw)

The manual states that the :var header argument can be given a reference to a table, a list, a literal example, a code block, or results.  But I want to use a reference to an outline tree—is there some way to do this?  My experiments have all failed:

#+NAME: example-outline
* L1
** L2a
*** L3a
** L2b
** L2c

* Results
#+NAME: table-length
#+BEGIN_SRC emacs-lisp :var ref=example-outline
(print (format "%S" ref))
  #+END_SRC

#+RESULTS: table-length
: "nil"

Alternatively, is there a way to pass the name as a literal and then explicitly resolve it within the code block and get the outline data?

Thanks,

Rob.

                 reply	other threads:[~2016-07-31 19:09 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=B9092180-B1A2-49C8-81B3-515D1F6E42B3@teslamotors.com \
    --to=rduncan@tesla.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).