emacs-devel
[Top][All Lists]
Advanced

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

Re: 23.0.60; Defaut encoding for XML files should be undefined (instead


From: Stephen J. Turnbull
Subject: Re: 23.0.60; Defaut encoding for XML files should be undefined (instead of utf-8)
Date: Mon, 18 Feb 2008 15:26:57 +0900

Miles Bader writes:
 > "Stephen J. Turnbull" <address@hidden> writes:
 > > What's ungraceful about C-x C-s responding with
 > >     Warning:  This XML document does not seem to conform to XML
 > >     charset declaration rules.  Would you like to
 > >     (1) add an XML processor instruction (coding cookie)
 > >     (2) link to a parent document which specifies the encoding
 > >     (3) create a dummy parent document (available only to your sessions)
 > >     (4) save as is in the [buffer-file-coding-system] encoding?
 > 
 > The discussion is about what to do when visiting a file, not saving
 > it.

Do the same thing at visit time by default.  It's not like the
implementation would differ, it's just it would be a post-visit hook
instead of a pre-save hook.

 > [Whether the above sort of "extreme nannying"

"Extreme nannying"?  It's just an extension of the idea of providing a
document skeleton for a single file to multi-file documents.

 > knowing Emacs, users, it seems a good bet some would chaff
 > at the presumption.]

Let them chafe, and provide some lotion in the form of configurability
for those who know what they're doing and why.  But here, we're
talking about defaults.

 > For visiting, I rather like what I suggested earlier, changing Emacs'
 > format-specific-coding mechanisms to support format-specific coding
 > _preferences_ as well as "absolute codings".

IMO, users who know enough about coding systems and the various
formats to use such a facility would be just as happy to use
`file-coding-system-alist'.  Learning about it will be a burden for
the "naive" users who want things to "just work".  And maintaining a
database of defaults will be a burden on maintainers disproportionate
to the benefit.

Also, I appealed to PSGML and AUCTeX for a reason.  There are many
cases now where multi-file documents are the norm.  I think that not
only DTP files, but also multi-file source programs could benefit from
these techniques, over and above what we get from tag tables already.

As users get used to thinking of it as a general facility rather than
a property of just one mode, they'll generate neat ideas about what to
do with it.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]