From mboxrd@z Thu Jan 1 00:00:00 1970 From: David O'Toole Subject: convert region to html? Date: Fri, 18 May 2007 21:17:52 -0400 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HpDa3-00058p-Qh for emacs-orgmode@gnu.org; Fri, 18 May 2007 21:17:59 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HpDa1-00057Z-Rt for emacs-orgmode@gnu.org; Fri, 18 May 2007 21:17:58 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HpDa1-00057W-JM for emacs-orgmode@gnu.org; Fri, 18 May 2007 21:17:57 -0400 Received: from an-out-0708.google.com ([209.85.132.249]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HpDa1-00036M-6S for emacs-orgmode@gnu.org; Fri, 18 May 2007 21:17:57 -0400 Received: by an-out-0708.google.com with SMTP id c17so328301anc for ; Fri, 18 May 2007 18:17:56 -0700 (PDT) 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: emacs-orgmode@gnu.org I am working on my blog extension for org-publish. I would like to convert a region of text (say, between two markers) from org-mode markup into html and then paste the resulting html into another buffer where I am building a full page. I need to do this from a lisp program. It says that org-export-as-html will export an active region but I tried it and it doesn't work in a temp-buffer where (buffer-file-name) is nil. Anyway, would it be hard to expose a function like the following? (defun org-export-region-to-html (beg end) "Convert region between BEG and END into HTML, placing the result into a new buffer. The new buffer is returned." ... ... -- David O'Toole dto@gnu.org http://dto.freeshell.org/notebook/