Browse Source

library of babel: new code block for expanding headings

* contrib/babel/library-of-babel.org (Write): new code block for
  expanding headings
Eric Schulte 11 years ago
parent
commit
b5967dfa88
1 changed files with 14 additions and 0 deletions
  1. 14 0
      contrib/babel/library-of-babel.org

+ 14 - 0
contrib/babel/library-of-babel.org

@@ -161,6 +161,20 @@ plot(data)
 
 ** Gnuplot
 
+* Org reference
+** headline references
+#+source: headline
+#+begin_src emacs-lisp :var headline=top :var file='()
+  (save-excursion
+    (when file (get-file-buffer file))
+    (org-open-link-from-string (org-make-link-string headline))
+    (save-restriction
+      (org-narrow-to-subtree)
+      (buffer-string)))
+#+end_src
+
+#+call: headline(headline="headline references")
+
 * Tables
 ** LaTeX Table export
 *** booktabs