From 26f96667d51b3fbe8509db1534b3786ed384046d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fr=C3=A9d=C3=A9ric=20Perrin?= Date: Mon, 31 Jan 2011 23:59:50 +0100 Subject: [PATCH] Add a function to write an Atom feed to a file. --- atom.el | 6 ++++++ 1 file changed, 6 insertions(+) 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." -- 2.43.0