Discussion:
[VM] spaces truncated in presentation text
Kyle Farrell
2012-07-03 19:58:19 UTC
Permalink
I've been noticing an occsional space characters being truncated in
the presentation text. This happens when I view mail that is in
text/html, which I'm using lynx to render. On cursory inspection, the
text is being rendered in lynx with correct spacing. Still the
presentation buffer in vm removes the occasional space.

What translation / formatting may be occuring between what is returned
from the shell via lynx and the display in vm? This is using VM 8.2.0b.

thanks,
Kyle
Uday Reddy
2012-07-03 20:36:34 UTC
Permalink
Post by Kyle Farrell
What translation / formatting may be occuring between what is returned
from the shell via lynx and the display in vm? This is using VM 8.2.0b.
None that I know of. But there could be mismatches in the the coding
systems. What Emacs version and OS are you using?

Cheers,
Uday
Kyle Farrell
2012-07-03 22:55:14 UTC
Permalink
This is from Emacs on 23.4.1 (i386-mingw-nt6.1.7601) on Windows 7.
The mail I've been noticing this in is from Outlook via an Exchange
server.

When I do notice missing space characters in the presentation buffer,
it appears to be where the lynx-rendered text has an end of line. ie-
if lynx renders:

some text here
and some more here

this can show up in the presentation buffer as:

some text hereand some more here


The lynx options I'm using are "-force_html -dont_wrap_pre -dump -pseudo_inlines -stdin -nolist -nonumbers -nomargins".

I'm wondering if this is a Windows encoding thing..? I've tried a
little bit with setting coding-system-for-read before the call to lynx
but I did not notice any change in behavior.

-Kyle
Post by Uday Reddy
Post by Kyle Farrell
What translation / formatting may be occuring between what is returned
from the shell via lynx and the display in vm? This is using VM 8.2.0b.
None that I know of. But there could be mismatches in the the coding
systems. What Emacs version and OS are you using?
Cheers,
Uday
Uday Reddy
2012-07-04 07:55:32 UTC
Permalink
Post by Kyle Farrell
This is from Emacs on 23.4.1 (i386-mingw-nt6.1.7601) on Windows 7.
But Windows doesn't have lynx. Are you using Cygwin lynx?
Post by Kyle Farrell
When I do notice missing space characters in the presentation buffer,
it appears to be where the lynx-rendered text has an end of line. ie-
some text here
and some more here
If line-endings are clobbered, that is an entirely different problem. You
should save the output of lynx in a file, visit it in Emacs using M-x
find-file-literally and see what text is there.
Post by Kyle Farrell
The lynx options I'm using are "-force_html -dont_wrap_pre -dump -pseudo_inlines -stdin -nolist -nonumbers -nomargins".
I don't understand how you are specifying options. The recommended method
for using lynx is to set `vm-mime-text/html-handler' to 'lynx and let VM
deal with all the rest. No lynx options need to be set by you.

Cheers,
Uday
Kyle Farrell
2012-07-05 21:21:02 UTC
Permalink
Thanks Uday. Yes, I am using cygwin lynx. Looks like I'm running
into an old bug with lynx 2.8.7.1 and lynx's "-nomargins" argument
that I'm using:

http://lists.nongnu.org/archive/html/lynx-dev/2009-09/msg00010.html

So no vm bug here.

That said, the reason I'm specifying "-nomargins" as an argument to
lynx is without this option the lynx output has a margin of three
spaces prepended to each line. Perhaps I should look into a different
text/html handler..?

As an aside, the vm-mime-display-internal-lynx-text/html does not
honor vm-lynx-program and hardcodes the string "lynx" as the program.
The method in vm-mime.el should be something like:

(defun vm-mime-display-internal-lynx-text/html (start end layout)
(shell-command-on-region start (1- end)
(concat vm-lynx-program " -force_html -dump -pseudo_inlines -stdin")
nil t))

-Kyle
Post by Uday Reddy
Post by Kyle Farrell
This is from Emacs on 23.4.1 (i386-mingw-nt6.1.7601) on Windows 7.
But Windows doesn't have lynx. Are you using Cygwin lynx?
Post by Kyle Farrell
When I do notice missing space characters in the presentation buffer,
it appears to be where the lynx-rendered text has an end of line. ie-
some text here
and some more here
If line-endings are clobbered, that is an entirely different problem. You
should save the output of lynx in a file, visit it in Emacs using M-x
find-file-literally and see what text is there.
Post by Kyle Farrell
The lynx options I'm using are "-force_html -dont_wrap_pre -dump -pseudo_inlines -stdin -nolist -nonumbers -nomargins".
I don't understand how you are specifying options. The recommended method
for using lynx is to set `vm-mime-text/html-handler' to 'lynx and let VM
deal with all the rest. No lynx options need to be set by you.
Cheers,
Uday
Loading...