forked from mirrors/org-mode
Change indentation to match coding style guideline.
* org-feed.el: Change indentation to match coding style guideline. Cosmetic changes.
This commit is contained in:
parent
66eadedab3
commit
60bbc07a11
|
@ -166,10 +166,11 @@ Here are the keyword-value pair allows in `org-feed-alist'.
|
||||||
When the handler is called, point will be at the feed headline.
|
When the handler is called, point will be at the feed headline.
|
||||||
|
|
||||||
:parse-feed function
|
:parse-feed function
|
||||||
This function gets passed a buffer, and should return a list of entries,
|
This function gets passed a buffer, and should return a list
|
||||||
each being a property list containing the `:guid' and `:item-full-text'
|
of entries, each being a property list containing the
|
||||||
keys. The default is `org-feed-parse-rss-feed'; `org-feed-parse-atom-feed'
|
`:guid' and `:item-full-text' keys. The default is
|
||||||
is an alternative.
|
`org-feed-parse-rss-feed'; `org-feed-parse-atom-feed' is an
|
||||||
|
alternative.
|
||||||
|
|
||||||
:parse-entry function
|
:parse-entry function
|
||||||
This function gets passed an entry as returned by the parse-feed
|
This function gets passed an entry as returned by the parse-feed
|
||||||
|
@ -333,7 +334,8 @@ it can be a list structured like an entry in `org-feed-alist'."
|
||||||
(setq old-status (org-feed-read-previous-status inbox-pos drawer))
|
(setq old-status (org-feed-read-previous-status inbox-pos drawer))
|
||||||
;; Add the "handled" status to the appropriate entries
|
;; Add the "handled" status to the appropriate entries
|
||||||
(setq entries (mapcar (lambda (e)
|
(setq entries (mapcar (lambda (e)
|
||||||
(setq e (plist-put e :handled
|
(setq e
|
||||||
|
(plist-put e :handled
|
||||||
(nth 1 (assoc
|
(nth 1 (assoc
|
||||||
(plist-get e :guid)
|
(plist-get e :guid)
|
||||||
old-status)))))
|
old-status)))))
|
||||||
|
@ -652,7 +654,8 @@ formatted as a string, not the original XML data."
|
||||||
'href)))
|
'href)))
|
||||||
;; Add <title/> as :title.
|
;; Add <title/> as :title.
|
||||||
(setq entry (plist-put entry :title
|
(setq entry (plist-put entry :title
|
||||||
(org-feed-unescape (car (xml-node-children
|
(org-feed-unescape
|
||||||
|
(car (xml-node-children
|
||||||
(car (xml-get-children xml 'title)))))))
|
(car (xml-get-children xml 'title)))))))
|
||||||
(let* ((content (car (xml-get-children xml 'content)))
|
(let* ((content (car (xml-get-children xml 'content)))
|
||||||
(type (xml-get-attribute-or-nil content 'type)))
|
(type (xml-get-attribute-or-nil content 'type)))
|
||||||
|
@ -660,15 +663,22 @@ formatted as a string, not the original XML data."
|
||||||
(cond
|
(cond
|
||||||
((string= type "text")
|
((string= type "text")
|
||||||
;; We like plain text.
|
;; We like plain text.
|
||||||
(setq entry (plist-put entry :description (org-feed-unescape (car (xml-node-children content))))))
|
(setq entry (plist-put entry :description
|
||||||
|
(org-feed-unescape
|
||||||
|
(car (xml-node-children content))))))
|
||||||
((string= type "html")
|
((string= type "html")
|
||||||
;; TODO: convert HTML to Org markup.
|
;; TODO: convert HTML to Org markup.
|
||||||
(setq entry (plist-put entry :description (org-feed-unescape (car (xml-node-children content))))))
|
(setq entry (plist-put entry :description
|
||||||
|
(org-feed-unescape
|
||||||
|
(car (xml-node-children content))))))
|
||||||
((string= type "xhtml")
|
((string= type "xhtml")
|
||||||
;; TODO: convert XHTML to Org markup.
|
;; TODO: convert XHTML to Org markup.
|
||||||
(setq entry (plist-put entry :description (prin1-to-string (xml-node-children content)))))
|
(setq entry (plist-put entry :description
|
||||||
|
(prin1-to-string
|
||||||
|
(xml-node-children content)))))
|
||||||
(t
|
(t
|
||||||
(setq entry (plist-put entry :description (format "Unknown '%s' content." type)))))))
|
(setq entry (plist-put entry :description
|
||||||
|
(format "Unknown '%s' content." type)))))))
|
||||||
entry))
|
entry))
|
||||||
|
|
||||||
(provide 'org-feed)
|
(provide 'org-feed)
|
||||||
|
|
Loading…
Reference in a new issue