unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Daniel Rubin <daniel@warum-ada.de>
To: help-gnu-emacs@gnu.org
Subject: Re: getting rid of ^M displayed by emacs-w3m
Date: Sun, 25 Mar 2007 11:48:19 +0200	[thread overview]
Message-ID: <46064563.9010609@warum-ada.de> (raw)
In-Reply-To: <87mz2216zf.fsf@localhorst.mine.nu>

David Hansen wrote:

> X-Post to the emacs-w3m mailing list.
> 
> [ summary for the w3m devels: some html page includes the string
> "&#13;" and emacs-w3m inserts a raw carriage return into the
> buffer, which of course looks kind off ugly ]
> 
> On Sun, 25 Mar 2007 10:58:37 +1100 Alexey Pustyntsev wrote:
> 
>> David Hansen <david.hansen@gmx.net> writes:
>>
>>> To me this looks like the page explicitly asked to display a
>>> carriage return.  So I think what emacs w3m does here is reasonable.
>>> But maybe this "&#13;" is some html trick I don't know...
>> Thanks David.
>>
>> What I don't understand here is why w3m doesn't display
>> ^M (or, perhaps, something else) in xterm when the page explicitly
>> asks to do so.
> 
> Some of the rendering is done by w3m and some within emacs.  The
> translation of entities to characters is one of the things that
> happens in emacs.
> 
>>> How do you think should emacs-w3m render a carriage return?
>> I consider ^M to be garbage in the rendered html so it should not be
>> displayed by default unless, of course, specifically requested.
> 
> If the html source includes the entity "&#13;" it explicitly
> requested the display of a carriage return (whatever this means), at
> least in my opinion.  But again, this might be some html "feature" I
> don't know about.
> 
> IMHO the right thing to do here is to read up in the HTML specs how
> whitespaces encoded with html entities should be treated.

Could it be the HTML file contains _both_, line-endings indicated 
by CR as well as some by newline or CR/LF?
So maybe Emacs is somehow tricked to believe it's displaying a 
-unix or -dos encoded file and rejects to recognise the discrete 
^Ms as newlines, while the terminal unconditionally displays 
anything looking like it might be a newline as such.

Just a thought.

Have fun
----Daniel

-- 
Daniel Rubin
daniel warum-ada de

      reply	other threads:[~2007-03-25  9:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-23 23:00 getting rid of ^M displayed by emacs-w3m Alexey Pustyntsev
2007-03-24 18:27 ` Alexey Pustyntsev
2007-03-24 19:03   ` Peter Dyballa
2007-03-24 21:07     ` Alexey Pustyntsev
2007-03-24 21:17       ` David Hansen
2007-03-24 23:58         ` Alexey Pustyntsev
2007-03-25  0:50           ` David Hansen
2007-03-25  9:48             ` Daniel Rubin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46064563.9010609@warum-ada.de \
    --to=daniel@warum-ada.de \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).