From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bernt Hansen Subject: Re: body-only for single file html export Date: Sun, 19 Dec 2010 17:10:57 -0500 Message-ID: <87y67lct1q.fsf@norang.ca> References: <20101218184623.GA22172@chemistry.coe.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from [140.186.70.92] (port=33260 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PURT4-0000jm-Cm for emacs-orgmode@gnu.org; Sun, 19 Dec 2010 17:11:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PURT3-0000HG-58 for emacs-orgmode@gnu.org; Sun, 19 Dec 2010 17:11:02 -0500 Received: from mho-01-ewr.mailhop.org ([204.13.248.71]:37663) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PURT2-0000H8-VR for emacs-orgmode@gnu.org; Sun, 19 Dec 2010 17:11:01 -0500 In-Reply-To: <20101218184623.GA22172@chemistry.coe.edu> (joe@chemistry.coe.edu's message of "Sat, 18 Dec 2010 12:46:23 -0600") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: joe@chemistry.coe.edu Cc: emacs-orgmode@gnu.org joe writes: > I would like to use the ":body-only" option for exporting html (and > ocassionally latex). Reading through the docs and maillist, I think I > understand how to do this if I'm publishing an entire project. I > don't have a project, though... > > I use emacs for editing html textareas and on-the-fly html editing, > and want to export a single file using the body-only option. > > I was hoping I could simply do something like this in the template but > it doesn't seem to work: > > #+OPTIONS: body-only:t > > If someone can help me with an org-mode-export-html function that sets > the body-only option for a single file (without setting up a project), > I would be very grateful. > > Thank you much! Hi Joe, (global-set-key (kbd " x") 'bh/test) (defun bh/test (arg) (interactive "P") (org-export-as-html arg nil nil nil t)) then f9-x in an org-mode buffer will export as body-only and put a copy in the kill ring so you can paste it. HTH, Bernt