From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Levin Du" Subject: [patch]org-blog.el: fix broken org-publish-blog-index Date: Wed, 28 May 2008 15:23:10 +0800 Message-ID: <9649271a0805280023t212a1ae5l7f70e8559c1223af@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0352275916==" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K1G0I-0004RK-Tl for emacs-orgmode@gnu.org; Wed, 28 May 2008 03:23:22 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K1G0F-0004Q7-J6 for emacs-orgmode@gnu.org; Wed, 28 May 2008 03:23:21 -0400 Received: from [199.232.76.173] (port=48177 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K1G0F-0004Q1-5L for emacs-orgmode@gnu.org; Wed, 28 May 2008 03:23:19 -0400 Received: from mx20.gnu.org ([199.232.41.8]:60298) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1K1G0E-0007vC-EC for emacs-orgmode@gnu.org; Wed, 28 May 2008 03:23:18 -0400 Received: from ti-out-0910.google.com ([209.85.142.185]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1K1G09-0007KG-Lb for emacs-orgmode@gnu.org; Wed, 28 May 2008 03:23:15 -0400 Received: by ti-out-0910.google.com with SMTP id u5so3134964tia.10 for ; Wed, 28 May 2008 00:23:11 -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: Org-mode Mode --===============0352275916== Content-Type: multipart/alternative; boundary="----=_Part_276_20448275.1211959390899" ------=_Part_276_20448275.1211959390899 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I think the API has changed a bit. Patch attched:--- a/lisp/org-blog.el +++ b/lisp/org-blog.el @@ -170,11 +170,12 @@ Follow up with org-publish-all to upload to the site." ;; pluggable index generation function for org-publish. -(defun org-publish-blog-index (plist &optional index-filename) +(defun org-publish-blog-index (project &optional index-filename) "Publish an index of all finished blog posts. This function is suitable for use in the :index-function keyword of org-publish-project-alist." - (let* ((posts (nreverse (sort (org-publish-get-base-files plist "*~") 'string<))) + (let* ((plist (cdr project)) + (posts (nreverse (sort (org-publish-get-base-files project "*~") 'string<))) (base-directory (file-name-as-directory (or org-blog-directory (plist-get plist :base-directory)))) (blog-base-url (file-name-as-directory (plist-get plist :blog-base-url))) (blog-title (plist-get plist :blog-title)) - Levin ------=_Part_276_20448275.1211959390899 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I think the API has changed a bit. Patch attched:
--- a/lisp/org-blog.el
+++ b/lisp/org-blog.el
@@ -170,11 +170,12 @@ Follow up with org-publish-all to upload to the site."
 
 ;; pluggable index generation function for org-publish.
 
-(defun org-publish-blog-index (plist &optional index-filename)
+(defun org-publish-blog-index (project &optional index-filename)
   "Publish an index of all finished blog posts.
 This function is suitable for use in the :index-function keyword
 of org-publish-project-alist."
-  (let* ((posts (nreverse (sort (org-publish-get-base-files plist "*~") 'string<)))
+  (let* ((plist (cdr project))
+         (posts (nreverse (sort (org-publish-get-base-files project "*~") 'string<)))
  (base-directory (file-name-as-directory (or org-blog-directory (plist-get plist :base-directory))))
  (blog-base-url (file-name-as-directory (plist-get plist :blog-base-url)))
  (blog-title (plist-get plist :blog-title))


- Levin
------=_Part_276_20448275.1211959390899-- --===============0352275916== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --===============0352275916==--