From mboxrd@z Thu Jan 1 00:00:00 1970 From: Charles Berry Subject: Re: Possible to use src block to generate org headlines for export? Date: Wed, 23 Jul 2014 16:06:20 +0000 (UTC) Message-ID: References: <87zjg1gddd.fsf@fastmail.fm> <87wqb4amqb.fsf@gmail.com> <8738dshkdw.fsf@fastmail.fm> <8761io2jnz.fsf@fastmail.fm> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51150) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X9z3z-0000UF-3V for emacs-orgmode@gnu.org; Wed, 23 Jul 2014 12:06:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X9z3o-0002b8-Rh for emacs-orgmode@gnu.org; Wed, 23 Jul 2014 12:06:43 -0400 Received: from plane.gmane.org ([80.91.229.3]:57844) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X9z3o-0002b0-Ld for emacs-orgmode@gnu.org; Wed, 23 Jul 2014 12:06:32 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1X9z3m-00085B-V9 for emacs-orgmode@gnu.org; Wed, 23 Jul 2014 18:06:31 +0200 Received: from 137.110.37.167 ([137.110.37.167]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 23 Jul 2014 18:06:30 +0200 Received: from ccberry by 137.110.37.167 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 23 Jul 2014 18:06:30 +0200 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 Lundin 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