[Date Prev][Date Next][Thread Prev][][Date Index][Thread Index]

Re: keep html format

Santiago Mejia <santiagomejiar@xxxxxxxxx> writes:

> Thanks a lot for your prompt response.  
> Do you, by any chance, have any idea whehter this might work with w3,
> the stand alone emacs web-browser?
> Or, can you, perhaps, think of an alternative solution?

Using w3m-filter feature could help. I was able to see them bold with
the following codes.

--8<---------------cut here---------------start------------->8---
(setq w3m-use-filter t)
(require 'shimbun)
(defun my-w3m-filter-replace-span (url)
  (goto-char (point-min))
  (while (search-forward "<span class=b>" nil t)
    (goto-char (1- (point)))
    (shimbun-end-of-tag "span")
    (replace-match "<b>\\1</b>" t)))
(eval-after-load "w3m-filter"
     (add-to-list 'w3m-filter-rules
		  '("http://www.wordreference.com/"; my-w3m-filter-replace-span))))
--8<---------------cut here---------------end--------------->8---

>>>>>>> In [emacs-w3m : No.10969] Santiago Mejia wrote:
>> [...]
>>> In firefox, http://www.wordreference.com/deen/dabei will display some
>>> things underlined, and others in bold (in particular, "nahe dabei:" is in
>>> bold, and "close by", which comes right next, is not).
>>> However, when I call
>>> (w3m-browse-url http://www.wordreference.com/deen/dabei)
>>> most of this formatting is lost, and I have no way of automatically
>>> distinguishing  German expressions from English ones.
>>> Is there a way to keep track of the html formatting?