summaryrefslogtreecommitdiff
path: root/contrib/lisp/ox-rss.el
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/lisp/ox-rss.el')
-rw-r--r--contrib/lisp/ox-rss.el33
1 files changed, 12 insertions, 21 deletions
diff --git a/contrib/lisp/ox-rss.el b/contrib/lisp/ox-rss.el
index a45107b..672e970 100644
--- a/contrib/lisp/ox-rss.el
+++ b/contrib/lisp/ox-rss.el
@@ -51,6 +51,7 @@
;; :base-extension "org"
;; :rss-image-url "http://lumiere.ens.fr/~guerry/images/faces/15.png"
;; :html-link-home "http://lumiere.ens.fr/~guerry/"
+;; :html-link-use-abs-url t
;; :rss-extension "xml"
;; :publishing-directory "/home/guerry/public_html/"
;; :publishing-function (org-rss-publish-to-rss)
@@ -160,21 +161,8 @@ non-nil."
(let ((file (buffer-file-name (buffer-base-buffer))))
(org-icalendar-create-uid file 'warn-user)
(org-rss-add-pubdate-property))
- (if async
- (org-export-async-start
- (lambda (output)
- (with-current-buffer (get-buffer-create "*Org RSS Export*")
- (erase-buffer)
- (insert output)
- (goto-char (point-min))
- (text-mode)
- (org-export-add-to-stack (current-buffer) 'rss)))
- `(org-export-as 'rss ,subtreep ,visible-only))
- (let ((outbuf (org-export-to-buffer
- 'rss "*Org RSS Export*" subtreep visible-only)))
- (with-current-buffer outbuf (text-mode))
- (when org-export-show-temporary-export-buffer
- (switch-to-buffer-other-window outbuf)))))
+ (org-export-to-buffer 'rss "*Org RSS Export*"
+ async subtreep visible-only nil nil (lambda () (text-mode))))
;;;###autoload
(defun org-rss-export-to-rss (&optional async subtreep visible-only)
@@ -203,12 +191,7 @@ Return output file's name."
(org-rss-add-pubdate-property))
(let ((outfile (org-export-output-file-name
(concat "." org-rss-extension) subtreep)))
- (if async
- (org-export-async-start
- (lambda (f) (org-export-add-to-stack f 'rss))
- `(expand-file-name
- (org-export-to-file 'rss ,outfile ,subtreep ,visible-only)))
- (org-export-to-file 'rss outfile subtreep visible-only))))
+ (org-export-to-file 'rss outfile async subtreep visible-only)))
;;;###autoload
(defun org-rss-publish-to-rss (plist filename pub-dir)
@@ -219,6 +202,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 filename) (kill-buffer)))
(org-publish-org-to
'rss filename (concat "." org-rss-extension) plist pub-dir))