emacs-w3m filling
Bug #912518 reported by
Uday Reddy
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
VM |
Triaged
|
Low
|
khinsen |
Bug Description
The attached html message shows the problem that, no matter what `w3m-fill-column' is set to, the message does not get filled correctly. Lines get broken like this:
EURIM News: Government outlines our 'high tech
future'
Yesterday, Universities and Science Minister David
Willetts
set out a plan to help Britain become the best place in
the
world for science and research and announced:
How can we get around this problem? Perhaps the issue is the image that is displayed in the middle of html? Is it possible to disable the image display?
To post a comment you must log in.
The real question is: what do we expect to see?
If you look at that message with some other mail reader with proper HTML support, you get a table with a right-justified image near the top of the message. If you browse to such a page with w3m-emacs, you get a page formatted for a larger width than the current frame; you have to scroll horizontally to see everything. For this particular page, it would be possible to format to a given width, as long as it's larger than the image. But my impression is that emacs-w3m cannot do it, not even in its own browser mode. So to get this particular message displayed as one would wish, it probably takes a modification to emacs-w3m.
There are other situations (which I see frequently in my inbox) where displaying the HTML part to a predefined width is not possible at all. Tables with multiple columns cannot be compressed arbitrarily. Any HTML browser will require horizontal scolling in that case.
My current workaround is the function shown below (which I have bound to C-c C-t) that toggles the value of truncate-lines in the presentation buffer. I disable truncation for reading HTML tables, and re-enable it for displaying plain text messages properly. A better solution would be to set truncate-lines when a message containing a w3m-rendered HTM part is displayed.
Independently, one could improve emacs-w3m's rendering of compressible tables such as the ones in the attached test message, but as I said this probably needs to be done in emacs-w3m.
(defun vm-toggle- line-truncation () select- folder- buffer- and-validate 1 (vm-interactive-p)) -buffer
(set- buffer vm-presentation -buffer) ) mode-line- update) ))
(interactive)
(save-excursion
(vm-
(and vm-presentation
(setq truncate-lines (not truncate-lines))
(when truncate-lines
(setq word-wrap t))
(force-