emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Possible to use src block to generate org headlines for export?


From: Charles Berry
Subject: Re: [O] Possible to use src block to generate org headlines for export?
Date: Wed, 23 Jul 2014 16:06:20 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Matt Lundin <mdl <at> imapmail.org> writes:

[deleted]

> Footnotes:
> 
> [fn:1] If one really needs to see the headlines in the original org
> buffer, a hook can be used to remove the :RESULTS: drawer.
> 
> --8<---------------cut here---------------start------------->8---
> (defun my-remove-stray-results-drawer (backend)
>   (when (eq backend 'html)
>     (while (re-search-forward "^\\s-*:RESULTS:\\s-*\n" nil t)
>       (replace-match ""))))
> 
> (add-hook 'org-export-before-parsing-hook 'my-remove-results-drawer)
> --8<---------------cut here---------------end--------------->8---
> 
> 

Or wrap the results in a drawer when you type C-c C-c, but render them as 
raw on export (which removes the drawer and replaces with raw results).

Like so:


#+header: :results (if (boundp 'backend) "raw" "drawer") 
#+BEGIN_SRC emacs-lisp :exports both 
(format "* headline\n1\n2\n5\n")
#+END_SRC

HTH,

Chuck




reply via email to

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