From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robert Klein Subject: Re: another blog exporter Date: Fri, 07 Feb 2014 20:17:48 +0100 Message-ID: <52F5315C.6040504@roklein.de> References: <52F5137D.2000003@roklein.de> <87ob2i967s.fsf@gmx.us> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34932) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WBqw0-0005BP-J1 for emacs-orgmode@gnu.org; Fri, 07 Feb 2014 14:18:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WBqvu-0005Ex-DM for emacs-orgmode@gnu.org; Fri, 07 Feb 2014 14:17:56 -0500 Received: from moutng.kundenserver.de ([212.227.17.10]:49371) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WBqvu-0005Es-1r for emacs-orgmode@gnu.org; Fri, 07 Feb 2014 14:17:50 -0500 In-Reply-To: <87ob2i967s.fsf@gmx.us> 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 Hi Rasmus, thank you very much for your feedback! On 02/07/2014 06:35 PM, Rasmus wrote: > Could you provide an example blog so that we can see the output? The two latest posts ("FreeBSD" and "DHCP") at http://www.xyzzy.de/ I put the original org for download at the end of both posts. >> ;;; 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? > - org-blog-example-block /is/ an exact copy, I planned to add the highlighters here, too, and to support line numbers. Forgot it :( - org-blog-latex-environment adds support for =#+ATTR_BLOG:= - org-blog-latex-fragment currently also is an exact copy. I'm not sure mathjax works, so I put it here for further work. - org-blog-link supports =attr_blog= and fills the list of images to be uploaded. (I really hated to copy this one... in an earler version I cl-flet-ted org-html--format-image to avoid copying this one. for org-blog-export-[as|to]-blog, I had no choice. :) I just found out, when I introduced scheduled posting I broke unscheduled posting; this is the patch: --- emacs/ox-blog.el 2014-01-21 10:57:50 +0000 +++ emacs/ox-blog.el 2014-02-07 18:38:52 +0000 @@ -1089,7 +1089,7 @@ ;; administrator may post (post-status (cond ((equal draft-or-publish-p "draft") "draft") ((equal "contributor" user-role) "pending") - ((and publish-datetime + ((and (not (string= "" publish-datetime)) (or (equal "author" user-role) (equal "administrator" user-role))) "future") Best regards and thank you very much for the feedback, Robert