From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: another blog exporter Date: Fri, 07 Feb 2014 18:35:03 +0100 Message-ID: <87ob2i967s.fsf@gmx.us> References: <52F5137D.2000003@roklein.de> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46434) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WBpJO-0001A9-Kb for emacs-orgmode@gnu.org; Fri, 07 Feb 2014 12:34:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WBpJI-0002N7-A9 for emacs-orgmode@gnu.org; Fri, 07 Feb 2014 12:33:58 -0500 Received: from plane.gmane.org ([80.91.229.3]:53232) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WBpJI-0002N2-2u for emacs-orgmode@gnu.org; Fri, 07 Feb 2014 12:33:52 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WBpJG-0006Sm-SP for emacs-orgmode@gnu.org; Fri, 07 Feb 2014 18:33:50 +0100 Received: from ip-pool-136.iue.it ([192.167.90.136]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 07 Feb 2014 18:33:50 +0100 Received: from rasmus by ip-pool-136.iue.it with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 07 Feb 2014 18:33:50 +0100 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 Robert Klein writes: > Hi, > > around the org-mode 8.0 release I began to write a new blog exporter > using the new export framework. > > I wanted one feature org2blog didn't offer, support for different syntax > highlighters, and i wanted to learn about the new exporter and Emacs > programming. > > Around Christmas I did some polishing to make it ready for a greater public. Cool. Could you provide an example blog so that we can see the output? > ;;; Transcode Functions > > ;;;; Example Block > > (defun org-blog-example-block (example-block contents info) > "Transcode a EXAMPLE-BLOCK element from Org to HTML. > CONTENTS is nil. INFO is a plist holding contextual > information." > (if (org-export-read-attribute :attr_html example-block :textarea) > (org-html--textarea-block example-block) > ;;; beginnin here we need org/wp-syntac/syntaxhl information!!!! > (format "
\n%s
" > (org-html-format-code example-block info)))) Isn't this an exact copy of the corresponding entry in ox-html (Less the name)? Why? > ;;;; Latex Environment > > (defun org-blog-latex-environment (latex-environment contents info) > "Transcode a LATEX-ENVIRONMENT element from Org to HTML. > CONTENTS is nil. INFO is a plist holding contextual information." > (let ((processing-type (plist-get info :with-latex)) > (latex-frag (org-remove-indentation > (org-element-property :value latex-environment))) > (attributes (org-combine-plists > (org-export-read-attribute :attr_html latex-environment) > (org-export-read-attribute :attr_blog latex-environment)))) > (case processing-type > ((t mathjax) > (org-html-format-latex latex-frag 'mathjax info)) > ((dvipng imagemagick) > (let ((formula-link > (org-html-format-latex latex-frag processing-type info))) > (when (and formula-link (string-match "file:\\([^]]*\\)" formula-link)) > ;; Do not provide a caption or a name to be consistent with > ;; `mathjax' handling. > (org-html--wrap-image > (org-blog--format-image > (match-string 1 formula-link) attributes info) info)))) > (t latex-frag)))) Same. There seems to be a couple of these. . . Rasmus -- Don't panic!!!