1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

Newsticker: Use libxml instead of `xml-parse-region'. Fix some glitches. Clean up.

* lisp/net/newst-backend.el: Remove Time-stamp.  Rename variable
`newsticker--download-logos' to `newsticker-download-logos' and
make it customizable.
(newsticker--sentinel-work): Move xml-workarounds to function
`newsticker--do-xml-workarounds', call unless libxml-parser is
used.  Allow single quote in regexp for encoding.  Use
libxml-parser if available, else fall back to `xml-parse-region'.
Take care of possibly missing namespace prefixes (like "RDF"
instead of "rdf:RDF") when checking xml nodes and attributes (as
libxml correctly removes the prefixes).  Always use Atom 1.0 as
fallback feed type.  Rename `newsticker--download-logos' to
`newsticker-download-logos'
(newsticker--unxml, newsticker--unxml-node)
(newsticker--unxml-attribute): New.
(newsticker--parse-atom-1.0): Call `unxml' in case that embedded
HTML code has become part of the xml parse tree.
(newsticker--parse-rss-1.0, newsticker--parse-rss-2.0): Take care
of possibly missing namespace prefixes.
(newsticker--parse-generic-items): Code formatting. Typo.
(newsticker--images-dir): Add trailing slash.
(newsticker--image-get): Fix error message.

* lisp/net/newst-plainview.el: Remove Time-stamp.

* lisp/net/newst-reader.el: Remove Time-stamp.
(newsticker-download-logos): Rename variable
`newsticker--download-logos' to `newsticker-download-logos' and
make it customizable.
(newsticker--print-extra-elements): Add optional parameter
'htmlish for using html markup.  Amend list of ignored elements.
(newsticker--do-print-extra-element): Add parameter 'htmlish for
using html markup.

* lisp/net/newst-ticker.el: Remove Time-stamp.

* lisp/net/newst-treeview.el (newsticker--treeview-item-show): Use html
for formatting extra elements.

* lisp/net/newsticker.el:  Remove Time-stamp, Version.
(newsticker-version): Make obsolete.
This commit is contained in:
Ulf Jasper 2014-10-01 19:20:00 +02:00
parent f94ec2f3c8
commit 34912c0a2b
7 changed files with 214 additions and 98 deletions

View file

@ -781,8 +781,11 @@ for the button."
(put-text-property pos (point) 'face 'newsticker-enclosure-face)
(setq pos (point))
(insert "\n")
(newsticker--print-extra-elements item newsticker--treeview-url-keymap)
(put-text-property pos (point) 'face 'newsticker-extra-face)
(set-marker marker1 pos)
(newsticker--print-extra-elements item newsticker--treeview-url-keymap t)
(set-marker marker2 (point))
(newsticker--treeview-render-text marker1 marker2)
(put-text-property marker1 marker2 'face 'newsticker-extra-face)
(goto-char (point-min)))))
(if (and newsticker-treeview-automatically-mark-displayed-items-as-old
item