From xemacs-m  Fri Jan 31 23:31:24 1997
Received: from altair.xemacs.org (steve@xemacs.miranova.com [206.190.83.19])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id XAA21876
	for <xemacs-beta@xemacs.org>; Fri, 31 Jan 1997 23:31:22 -0600 (CST)
Received: (from steve@localhost)
	by altair.xemacs.org (8.8.5/8.8.5) id VAA16688;
	Fri, 31 Jan 1997 21:42:38 -0800
To: xemacs-beta@xemacs.org
Subject: Re: html-mode: &nbsp; -> space?!?
References: <199701310844.DAA02979@localhost.interport.net> 	<m2wwst21hw.fsf@altair.xemacs.org> <199702010300.WAA03067@localhost>
X-Url: http://www.miranova.com/%7Esteve/
Mail-Copies-To: never
X-Face: #!T9!#9s-3o8)*uHlX{Ug[xW7E7Wr!*L46-OxqMu\xz23v|R9q}lH?cRS{rCNe^'[`^sr5"
 f8*@r4ipO6Jl!:Ccq<xoV[Qz2u8<8-+Vwf2gzJ44lf_/y9OaQ`@#Q65{U4/TC)i2`~/M&QI$X>p:9I
 OSS'2{-)-4wBnVeg0S\O4Al@)uC[pD|+
X-Attribution: sb
From: Steven L Baur <steve@miranova.com>
In-Reply-To: Peter Pezaris's message of Fri, 31 Jan 1997 22:00:19 -0500
Mime-Version: 1.0 (generated by tm-edit 7.101)
Content-Type: text/plain; charset=US-ASCII
Date: 31 Jan 1997 21:42:38 -0800
Message-ID: <m2g1zh3wvl.fsf@altair.xemacs.org>
Lines: 74
X-Mailer: Gnus v5.4.8/XEmacs 20.0

Peter Pezaris writes:

>>> At this point the "&nbsp;" has turned to a space.  Bad
>>> html-mode.

Steve> Only on the screen.  It's saved in the file as &nbsp;.
Steve> All of the & character codes work this way.
 
> I don't understand the motivation behind this.  html-mode is NOT a
> WYSIWYG editor.  At all.  It is a _source_ level editor.

Please note, I didn't write any of html-mode.  The primary author is
Lennart Staflin.  The XEmacs additions were done by Ben Wing.

> Here are the itemized problems I have with this misfeature:

> 1. It happens only when you save the buffer, not when you visit the
>    file.  Why?

This is a bug.  What does this statement
(member 'fix-sgml2iso find-file-hooks)
return when you evaluate it in the minibuffer?

> 2. html-mode is not a WYSIWYG editor save this singular feature

This is the *only* aspect of html that can be WYSIWYG.

> 3. It creates serious ambiguities in the display of your HTML buffer

In the case of &nbsp;, I agree.  Not so for the other ISO Latin-1
characters.

> 4. It is entirely unobvious how to turn it off

True.  I thought I'd made a patch for this last Summer, but I can't
find it now.

> 5. It violates the principle of least surprise (WHAT THE FUCK
>    HAPPENED TO MY HTML CODE!!!)

Put
(setq html-auto-sgml-entity-conversion nil)
in your .emacs and it won't bother you again.

> I see no reason for this feature to exist, and a lot of reasons for
> it not to.  Could someone please explain the purpose to me? Either
> I'm totally missing the point of this is just Plain Bad.

Index: psgml-html.el
===================================================================
RCS file: /usr/local/xemacs/xemacs-20.0/lisp/psgml/psgml-html.el,v
retrieving revision 1.2
diff -u -r1.2 psgml-html.el
--- psgml-html.el	1997/01/26 00:21:42	1.2
+++ psgml-html.el	1997/02/01 05:38:21
@@ -30,9 +30,13 @@
 
 ;;; Code:
 
+(defvar html-auto-sgml-entity-conversion t
+  "*Control automatic sgml entity to ISO-8859-1 conversion")
+
 (require 'psgml)
 (require 'derived)
-(require 'iso-sgml)
+(when html-auto-sgml-entity-conversion
+  (require 'iso-sgml))
 (require 'tempo)			;essential part of html-helper-mode
 
 ;;{{{ user variables

-- 
steve@miranova.com baur
Unsolicited commercial e-mail will be billed at $250/message.

