From: Frédéric Perrin Date: Mon, 31 Jan 2011 22:59:50 +0000 (+0100) Subject: Add a function to write an Atom feed to a file. X-Git-Url: http://gitweb.fperrin.net/?p=atom.el.git;a=commitdiff_plain;h=26f96667d51b3fbe8509db1534b3786ed384046d Add a function to write an Atom feed to a file. --- diff --git a/atom.el b/atom.el index c645cda..c73c7d9 100644 --- a/atom.el +++ b/atom.el @@ -167,6 +167,12 @@ fragment. See `atom-add-entry' for additional details." (xml-print atom) (insert "\n")) +(defun atom-write-file (atom filename) + "Writes the feed ATOM to FILENAME." + (with-temp-buffer + (atom-print atom) + (write-region (point-min) (point-max) filename))) + (defun atom-format-time (&optional time) "Format a time according to RFC3339."