diff options
Diffstat (limited to 'bom.el')
-rw-r--r-- | bom.el | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -29,6 +29,7 @@ (require 'hierarchy) (require 'web-server) +(require 'ox-publish) (defvar bom-state-files '((act . "IDN11060") @@ -44,10 +45,11 @@ (defun bom-api (state) "Get weather forecast data of STATE from the BOM FTP." (if-let ((filename (alist-get (intern (downcase state)) bom-state-files))) - (with-current-buffer - (find-file-noselect - (format "/ftp:anonymous@ftp.bom.gov.au:/anon/gen/fwo/%s.xml" filename)) - (libxml-parse-xml-region (point-min) (point-max))) + (progn + (with-current-buffer + (find-file-noselect + (format "/ftp:anonymous@ftp.bom.gov.au:/anon/gen/fwo/%s.xml" filename)) + (libxml-parse-xml-region (point-min) (point-max)))) (user-error "State %s not found" state))) (defun bom-get-areas (resp) |