all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
To: "lu@luxdo.jp" <lu@luxdo.jp>
Cc: help-gnu-emacs@gnu.org
Subject: Re: about xhtml-mode encoding problem
Date: Wed, 11 Jul 2007 16:41:20 +0200	[thread overview]
Message-ID: <4694EC10.9030901@gmail.com> (raw)
In-Reply-To: <4694E2EE.3000907@luxdo.jp>


lu@luxdo.jp wrote:
>> Thanks, that was why I asked you which major modes you are using.
>>
>> nxhtml-mode is derived from nxml-mode and I think it handles coding 
>> systems a bit differently. Look at write-contents-functions in the 
>> buffer. I think it contains nxml-prepare-to-save. That function tries 
>> to get the coding system to use from the XML header if the coding 
>> system has not been specified explicitly for the buffer through 
>> buffer-file-coding-system.
>>
>> Is there an XML header in the buffer in your case? What coding system 
>> does it specify?
 >
> I'm Sorry to reply late.

No problem, I just wondered if you noticed my reply.


>> Is there an XML header in the buffer in your case? What coding system 
>> does it specify? 
 >
> I don't know what's the meaning.

 From the pictures you sent me it looks like your pages are HTML, not 
XHTML. Is there any reason for you to use HTML instead of the new and in 
many ways better XHTML?

The header in XHTML could look something like this

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
           "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <title>News and Notes about nXhtml</title>
     <link href="wd/grapes/nxhtml-grapes.css" rel="StyleSheet" 
type="text/css" />
   </head>
   <body>

As you can see you can specify the encoding there. The corresponding 
Emacs encoding will be used when saving the file if you are using 
nxhtml-mode (or nxml-mode).

nxhtml-mode is for editing XHTML, not HTML. That is why have had some 
trouble here.


However the package (nXhtml) you download to get nxhtml-mode includes 
more than just nxhtml-mode. The part that is interesting for you is 
mumamo-mode which can handle JSP in both HTML and XHTML. If you have 
followed the installation instructions for nXhtml then mumamo-mode is 
used for this, but it assumes that the .jsp files are XHTML.

If you really want to use HTML then you could customize 
mumamo-filenames-list. By default the MuMaMo chunk family for .jsp files 
is "JSP nXhtml Family". You could change that to "JSP HTML Family".

  reply	other threads:[~2007-07-11 14:41 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-09 14:44 about xhtml-mode encoding problem lu
2007-07-09 15:31 ` Peter Dyballa
2007-07-09 16:07   ` lu
2007-07-09 17:08     ` Lennart Borgman (gmail)
2007-07-09 18:00     ` Peter Dyballa
2007-07-09 23:26       ` lu
2007-07-09 23:37       ` about nxhtml-mode " lu
2007-07-11 12:47         ` lu
2007-07-11 13:18           ` Lennart Borgman (gmail)
2007-07-11 14:07             ` lu
2007-07-12 13:56             ` lu
2007-11-25 22:56               ` Lennart Borgman (gmail)
2007-11-26  4:53                 ` Ke Lu
2007-11-26  8:03                   ` Lennart Borgman (gmail)
2007-07-09 16:12   ` about xhtml-mode " 呂 克
2007-07-09 17:59     ` Lennart Borgman (gmail)
2007-07-11 14:02       ` lu
2007-07-11 14:41         ` Lennart Borgman (gmail) [this message]
     [not found]   ` <mailman.3225.1183997250.32220.help-gnu-emacs@gnu.org>
2007-07-09 16:41     ` B. T. Raven
2007-07-09 23:29       ` lu

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

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

  git send-email \
    --in-reply-to=4694EC10.9030901@gmail.com \
    --to=lennart.borgman@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=lu@luxdo.jp \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.