(when (file-exists-p file)
(with-temp-buffer
(let ((coding-system-for-read 'binary)
- (input-coding-system 'binary)
emacs-lisp-mode-hook)
(insert-file-contents file)
(emacs-lisp-mode)
server ".el"))
nnrss-directory)))
(let ((coding-system-for-write 'binary)
- (output-coding-system 'binary)
print-level print-length)
(with-temp-file file
(insert "(setq nnrss-group-alist '"
(when (file-exists-p file)
(with-temp-buffer
(let ((coding-system-for-read 'binary)
- (input-coding-system 'binary)
emacs-lisp-mode-hook)
(insert-file-contents file)
(emacs-lisp-mode)
server ".el"))
nnrss-directory)))
(let ((coding-system-for-write 'binary)
- (output-coding-system 'binary)
print-level print-length)
(with-temp-file file
(insert "(setq nnrss-group-data '"
(nnrss-translate-file-chars
(concat group ".xml"))
nnrss-directory))))
- (nnrss-fetch file t)
+ (setq xml (nnrss-fetch file t))
(setq url (or (nth 2 (assoc group nnrss-server-data))
(second (assoc group nnrss-group-alist))))
(unless url
(setq extra (or (nnrss-node-text content-ns 'encoded item)
(nnrss-node-text rss-ns 'description item)))
(setq author (or (nnrss-node-text rss-ns 'author item)
- (nnrss-node-text dc-ns 'creator item)))
+ (nnrss-node-text dc-ns 'creator item)
+ (nnrss-node-text dc-ns 'contributor item)))
(setq date (or (nnrss-node-text dc-ns 'date item)
(nnrss-node-text rss-ns 'pubDate item)
(message-make-date)))
(defun nnrss-find-rss-via-syndic8 (url)
"query syndic8 for the rss feeds it has for the url."
- (if (locate-library "xml-rpc")
- (progn (require 'xml-rpc)
- (let ((feedid (xml-rpc-method-call
- "http://www.syndic8.com/xmlrpc.php"
- 'syndic8.FindSites
- url)))
- (if feedid
- (let* ((feedinfo (xml-rpc-method-call
- "http://www.syndic8.com/xmlrpc.php"
- 'syndic8.GetFeedInfo
- feedid))
- (urllist
- (delq nil
- (mapcar
- (lambda (listinfo)
- (if (string-equal
- (cdr (assoc "status" listinfo))
- "Syndicated")
- (cons
- (cdr (assoc "sitename" listinfo))
- (list
- (cons 'title
- (cdr (assoc
- "sitename" listinfo)))
- (cons 'href
- (cdr (assoc
- "dataurl" listinfo)))))))
- feedinfo))))
- (if (> (length urllist) 1)
- (let ((completion-ignore-case t)
- (selection
- (mapcar (lambda (listinfo)
- (cons (cdr (assoc "sitename" listinfo))
- (string-to-int
- (cdr (assoc "feedid" listinfo)))))
- feedinfo)))
- (cdr (assoc
- (completing-read
- "Multiple feeds found. Select one: "
- selection nil t) urllist)))
- (cdar urllist))))))
- (error (message "XML-RPC is not available... not checking Syndic8."))))
+ (if (not (locate-library "xml-rpc"))
+ (progn
+ (message "XML-RPC is not available... not checking Syndic8.")
+ nil)
+ (require 'xml-rpc)
+ (let ((feedid (xml-rpc-method-call
+ "http://www.syndic8.com/xmlrpc.php"
+ 'syndic8.FindSites
+ url)))
+ (when feedid
+ (let* ((feedinfo (xml-rpc-method-call
+ "http://www.syndic8.com/xmlrpc.php"
+ 'syndic8.GetFeedInfo
+ feedid))
+ (urllist
+ (delq nil
+ (mapcar
+ (lambda (listinfo)
+ (if (string-equal
+ (cdr (assoc "status" listinfo))
+ "Syndicated")
+ (cons
+ (cdr (assoc "sitename" listinfo))
+ (list
+ (cons 'title
+ (cdr (assoc
+ "sitename" listinfo)))
+ (cons 'href
+ (cdr (assoc
+ "dataurl" listinfo)))))))
+ feedinfo))))
+ (if (not (> (length urllist) 1))
+ (cdar urllist)
+ (let ((completion-ignore-case t)
+ (selection
+ (mapcar (lambda (listinfo)
+ (cons (cdr (assoc "sitename" listinfo))
+ (string-to-int
+ (cdr (assoc "feedid" listinfo)))))
+ feedinfo)))
+ (cdr (assoc
+ (completing-read
+ "Multiple feeds found. Select one: "
+ selection nil t) urllist)))))))))
(defun nnrss-rss-p (data)
"Test if data is an RSS feed. Simply ensures that the first