瀏覽代碼

contrib/lisp/ox-rss.el (org-rss-publish-to-rss): Add the PUBDATE property when publishing

* contrib/lisp/ox-rss.el (org-rss-publish-to-rss): Add the PUBDATE property
when publishing.

Thanks to Mikko Kouhia for reporting this bug.
Bastien Guerry 11 年之前
父節點
當前提交
330eb689cd
共有 1 個文件被更改,包括 8 次插入0 次删除
  1. 8 0
      contrib/lisp/ox-rss.el

+ 8 - 0
contrib/lisp/ox-rss.el

@@ -213,6 +213,14 @@ is the property list for the given project.  PUB-DIR is the
 publishing directory.
 
 Return output file name."
+  (let ((bf (get-file-buffer filename)))
+    (if bf
+	(with-current-buffer bf
+	  (org-rss-add-pubdate-property)
+	  (write-file filename))
+      (find-file filename)
+      (org-rss-add-pubdate-property)
+      (write-file) (kill-buffer)))
   (org-publish-org-to
    'rss filename (concat "." org-rss-extension) plist pub-dir))