Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
7b953864
Commit
7b953864
authored
Jun 27, 2012
by
Stefan Monnier
Browse files
* lisp/gnus/shr.el (shr-render-buffer): New command.
(shr-visit-file): Use it.
parent
6e9590e2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
5 deletions
+16
-5
lisp/gnus/ChangeLog
lisp/gnus/ChangeLog
+5
-0
lisp/gnus/shr.el
lisp/gnus/shr.el
+11
-5
No files found.
lisp/gnus/ChangeLog
View file @
7b953864
2012-06-27 Stefan Monnier <monnier@iro.umontreal.ca>
* shr.el (shr-render-buffer): New command.
(shr-visit-file): Use it.
2012-06-27 Katsumi Yamaoka <yamaoka@jpl.org>
* tests/gnustest-nntp.el, tests/gnustest-registry.el:
...
...
lisp/gnus/shr.el
View file @
7b953864
...
...
@@ -129,17 +129,23 @@ cid: URL as the argument.")
;; Public functions and commands.
(
defun
shr-
visit-file
(
file
)
"
Parse FILE as an HTML document, and render it in a new
buffer."
(
interactive
"fHTML file name: "
)
(
defun
shr-
render-buffer
(
buffer
)
"
Display the HTML rendering of the current
buffer."
(
interactive
(
list
(
current-buffer
))
)
(
pop-to-buffer
"*html*"
)
(
erase-buffer
)
(
shr-insert-document
(
with-temp-buffer
(
insert-file-contents
file
)
(
with-current-buffer
buffer
(
libxml-parse-html-region
(
point-min
)
(
point-max
))))
(
goto-char
(
point-min
)))
(
defun
shr-visit-file
(
file
)
"Parse FILE as an HTML document, and render it in a new buffer."
(
interactive
"fHTML file name: "
)
(
with-temp-buffer
(
insert-file-contents
file
)
(
shr-render-buffer
(
current-buffer
))))
;;;###autoload
(
defun
shr-insert-document
(
dom
)
"Render the parsed document DOM into the current buffer.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment