* xml indenting again (sgml-mode broken???)
@ 2003-06-04 0:35 Bjoern
2003-06-04 0:49 ` Galen Boyer
` (5 more replies)
0 siblings, 6 replies; 16+ messages in thread
From: Bjoern @ 2003-06-04 0:35 UTC (permalink / raw)
*SIGH* - now that I've upgraded to emacs 21.3 (Win32) from 21.2,
html/xml-indenting appears to be broken again (not indenting, just
inserting LOADS of whitespace everywhere). I searched the ng archives
and found old answers to a similiar request of mine. I think back then I
downloaded a new version of sgml-mode and replaced the one that comes
with emacs. However, now sgml-mode doesn't recognise comments in my
xml-files anymore, and it complains about unmatched tags, because I have
something like
<!-- servlet>
...
</servlet>
...
</servlet-mapping -->
in my file.
I tried copying the sgml-mode.el from my old emacs installation, but it
didn't work, either (I also byte-compiled it).
What can I do now? I don't want to use psgml because of the pestering
for DTDs.
I also need to look for a mode that can handle jsp-Files well, so
recommendations for that would be much appreciated.
Many thanks in advance!
Bjoern
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: xml indenting again (sgml-mode broken???)
2003-06-04 0:35 xml indenting again (sgml-mode broken???) Bjoern
@ 2003-06-04 0:49 ` Galen Boyer
2003-06-04 12:41 ` Bjoern
2003-06-04 2:12 ` Stefan Monnier
` (4 subsequent siblings)
5 siblings, 1 reply; 16+ messages in thread
From: Galen Boyer @ 2003-06-04 0:49 UTC (permalink / raw)
On Wed, 04 Jun 2003, p2@blinker.net wrote:
> I also need to look for a mode that can handle jsp-Files well, so
> recommendations for that would be much appreciated.
Get mmm-mode. Look in the mmm-sample.el. This has the example needed
to get you started. From there, you should be able to make it so you
have html-helper-mode as the main mode and jde for the java sections.
Of course, you'd need to download the jde for that as well.
--
Galen deForest Boyer
Sweet dreams and flying machines in pieces on the ground.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: xml indenting again (sgml-mode broken???)
2003-06-04 0:35 xml indenting again (sgml-mode broken???) Bjoern
2003-06-04 0:49 ` Galen Boyer
@ 2003-06-04 2:12 ` Stefan Monnier
2003-06-04 7:03 ` Bjoern
2003-06-04 15:51 ` Artur Hefczyc
` (3 subsequent siblings)
5 siblings, 1 reply; 16+ messages in thread
From: Stefan Monnier @ 2003-06-04 2:12 UTC (permalink / raw)
> <!-- servlet>
> ...
> </servlet>
> ...
> </servlet-mapping -->
I don't use such things, so I'm not sure what sgml-mode.el should do there.
Could describe to a non-web-hacker what things can look like and how
sgml-mode.el should ideally treat them ?
Stefan
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: xml indenting again (sgml-mode broken???)
2003-06-04 2:12 ` Stefan Monnier
@ 2003-06-04 7:03 ` Bjoern
2003-06-04 15:44 ` Stefan Monnier
0 siblings, 1 reply; 16+ messages in thread
From: Bjoern @ 2003-06-04 7:03 UTC (permalink / raw)
Stefan Monnier wrote:
>> <!-- servlet>
>> ...
>> </servlet>
>> ...
>> </servlet-mapping -->
>
>
> I don't use such things, so I'm not sure what sgml-mode.el should do there.
> Could describe to a non-web-hacker what things can look like and how
> sgml-mode.el should ideally treat them ?
It's just a section that is commented out (<!-- comment --> being the
xml syntax for comments). I'm not sure what would be the best way to
indent it. Perhaps the whole
<!--
....
-->
block should be treated like any tag that stretches over several lines like
<
...
/>
Bjoern
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: xml indenting again (sgml-mode broken???)
2003-06-04 0:49 ` Galen Boyer
@ 2003-06-04 12:41 ` Bjoern
0 siblings, 0 replies; 16+ messages in thread
From: Bjoern @ 2003-06-04 12:41 UTC (permalink / raw)
Galen Boyer wrote:
> On Wed, 04 Jun 2003, p2@blinker.net wrote:
>
>
>> I also need to look for a mode that can handle jsp-Files well, so
>> recommendations for that would be much appreciated.
>
>
> Get mmm-mode. Look in the mmm-sample.el. This has the example
> needed to get you started. From there, you should be able to make it
> so you have html-helper-mode as the main mode and jde for the java
> sections.
Thanks, I was going to check it out, but it appears that there is an
open bug saying that 'indenting sometimes doesn't work in JDE-mode' :-(
I might try it at a later time, but now I need a break (spent countless
hours trying to configure emacs)...
I just tested HTML-HELPER-MODE, but it doesn't work, either (JDE
indenting does nothing, everything is aligned to the left). Besides, I
don't understand the html-indenting policy of html-helper mode.
Bjoern
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: xml indenting again (sgml-mode broken???)
2003-06-04 7:03 ` Bjoern
@ 2003-06-04 15:44 ` Stefan Monnier
2003-06-04 18:37 ` Bjoern
0 siblings, 1 reply; 16+ messages in thread
From: Stefan Monnier @ 2003-06-04 15:44 UTC (permalink / raw)
>>>>> "Bjoern" == Bjoern <p2@blinker.net> writes:
> It's just a section that is commented out (<!-- comment --> being the xml
> syntax for comments). I'm not sure what would be the best way to indent
> it.
Even if you're not sure, it seems you know enough to consider the behavior
of the sgml-mode.el that you got from the CVS repository to be incorrect,
so could you describe in what way it's incorrect ?
Stefan
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: xml indenting again (sgml-mode broken???)
2003-06-04 0:35 xml indenting again (sgml-mode broken???) Bjoern
2003-06-04 0:49 ` Galen Boyer
2003-06-04 2:12 ` Stefan Monnier
@ 2003-06-04 15:51 ` Artur Hefczyc
2003-06-04 18:44 ` Bjoern
2003-06-04 17:13 ` Kevin Rodgers
` (2 subsequent siblings)
5 siblings, 1 reply; 16+ messages in thread
From: Artur Hefczyc @ 2003-06-04 15:51 UTC (permalink / raw)
> I tried copying the sgml-mode.el from my old emacs installation, but it
> didn't work, either (I also byte-compiled it).
Have you ever tried xml-lite-mode?
I provides simple intending feature and a little more.
Look here for a little more description:
http://wttools.sourceforge.net/emacs-stuff/emacsandxml.html
> What can I do now? I don't want to use psgml because of the pestering
> for DTDs.
what is wrong with psgml and DTD? Haven't you DTD for your
documents? It seems to me you still should be able to use psgml.
Artur
--
Artur Hefczyc
Open Source Developer
http://www.geotools.org/
http://wttools.sourceforge.net/
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: xml indenting again (sgml-mode broken???)
2003-06-04 0:35 xml indenting again (sgml-mode broken???) Bjoern
` (2 preceding siblings ...)
2003-06-04 15:51 ` Artur Hefczyc
@ 2003-06-04 17:13 ` Kevin Rodgers
2003-06-04 18:38 ` Bjoern
2003-06-06 5:37 ` d2003xx
2003-06-06 16:02 ` Stefan Monnier
5 siblings, 1 reply; 16+ messages in thread
From: Kevin Rodgers @ 2003-06-04 17:13 UTC (permalink / raw)
Bjoern wrote:
> *SIGH* - now that I've upgraded to emacs 21.3 (Win32) from 21.2,
> html/xml-indenting appears to be broken again (not indenting, just
> inserting LOADS of whitespace everywhere). I searched the ng archives
> and found old answers to a similiar request of mine. I think back then I
> downloaded a new version of sgml-mode and replaced the one that comes
> with emacs. However, now sgml-mode doesn't recognise comments in my
> xml-files anymore, and it complains about unmatched tags, because I have
> something like
>
> <!-- servlet>
> ...
> </servlet>
> ...
> </servlet-mapping -->
>
> in my file.
What happens if you use a marked section instead:
<![IGNORE [
...
]]>
--
<a href="mailto:<kevin.rodgers@ihs.com>">Kevin Rodgers</a>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: xml indenting again (sgml-mode broken???)
2003-06-04 15:44 ` Stefan Monnier
@ 2003-06-04 18:37 ` Bjoern
2003-06-04 19:42 ` Stefan Monnier
0 siblings, 1 reply; 16+ messages in thread
From: Bjoern @ 2003-06-04 18:37 UTC (permalink / raw)
Stefan Monnier wrote:
> Even if you're not sure, it seems you know enough to consider the behavior
> of the sgml-mode.el that you got from the CVS repository to be incorrect,
> so could you describe in what way it's incorrect ?
If for example I indent the following document with M-x indent-region:
<tagxy>
<!--
</sometag>
-->
</tagxy>
I get the error "unmatched tags <tagxy> and </sometag>. So it seems the
mode doesn't recognise the comments.
I hope it even is sgml-mode? It says (XML) in the Mode Bar (or what it's
called), and is also the mode I am in after typing 'M-x sgml-mode'.
Thank you for your interest!
Bjoern
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: xml indenting again (sgml-mode broken???)
2003-06-04 17:13 ` Kevin Rodgers
@ 2003-06-04 18:38 ` Bjoern
0 siblings, 0 replies; 16+ messages in thread
From: Bjoern @ 2003-06-04 18:38 UTC (permalink / raw)
Kevin Rodgers wrote:
[...]
>> comes with emacs. However, now sgml-mode doesn't recognise comments in
>> my xml-files anymore, and it complains about unmatched tags, because I
>> have something like
>>
>> <!-- servlet>
>> ...
>> </servlet>
>> ...
>> </servlet-mapping -->
>>
>> in my file.
>
>
> What happens if you use a marked section instead:
>
>
> <![IGNORE [
>
> ...
>
> ]]>
I get the same error message about unmatched tags.
Bjoern
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: xml indenting again (sgml-mode broken???)
2003-06-04 15:51 ` Artur Hefczyc
@ 2003-06-04 18:44 ` Bjoern
0 siblings, 0 replies; 16+ messages in thread
From: Bjoern @ 2003-06-04 18:44 UTC (permalink / raw)
Artur Hefczyc wrote:
[...]
> Have you ever tried xml-lite-mode?
> I provides simple intending feature and a little more.
> Look here for a little more description:
> http://wttools.sourceforge.net/emacs-stuff/emacsandxml.html
Yes, I've been looking for it, but I found some page saying that it has
merged with sgml-mode now. But your link says it hasn't been merged yet?
I think the author of xml-lite has been answering in this very thread,
so I hope there will be an easy fix for sgml-mode ;-)
[...]
> what is wrong with psgml and DTD? Haven't you DTD for your
> documents? It seems to me you still should be able to use psgml.
I don't always have DTDs, ie for ant build.xml files, or for xml-format
that I make up on my own and can't be bothered to also write a DTD for.
I guess there should be a way to switch off that bloody error message of
psgml, but who knows how long it would take to find it...
Bjoern
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: xml indenting again (sgml-mode broken???)
2003-06-04 18:37 ` Bjoern
@ 2003-06-04 19:42 ` Stefan Monnier
0 siblings, 0 replies; 16+ messages in thread
From: Stefan Monnier @ 2003-06-04 19:42 UTC (permalink / raw)
> <tagxy>
> <!--
> </sometag>
> -->
> </tagxy>
> I get the error "unmatched tags <tagxy> and </sometag>. So it seems the mode
> doesn't recognise the comments.
Could you please be more precise ? E.g. when do you get this error ?
I can guess it's when you hit TAB, but where do you hit it ?
Does it work when you hit TAB on the last line (the one with </tagxy>) ?
Does the error lead to a bad behavior, if so which one ?
After all, just complaining about an unmatched tag is not a problem:
you can always ignore the message if you know it's groundless.
Or is it just that the message annoys you ?
[..time passes..]
I think I see what you're talking about. If I hit TAB on the -->
line I also get the message (and it wrongly indents to column 0).
I'll see what I can do about it. It should be able to notice the
<!-- when working its way backwards and infer that it was inside a
comment.
> I hope it even is sgml-mode? It says (XML) in the Mode Bar (or what it's
> called), and is also the mode I am in after typing 'M-x sgml-mode'.
Sounds like we're talking about the same mode: it tries to automatically
detect whether you're using XML or SGML.
Stefan
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: xml indenting again (sgml-mode broken???)
2003-06-04 0:35 xml indenting again (sgml-mode broken???) Bjoern
` (3 preceding siblings ...)
2003-06-04 17:13 ` Kevin Rodgers
@ 2003-06-06 5:37 ` d2003xx
2003-06-06 16:02 ` Stefan Monnier
5 siblings, 0 replies; 16+ messages in thread
From: d2003xx @ 2003-06-06 5:37 UTC (permalink / raw)
Bjoern <p2@blinker.net> wrote in message news:<bbjepf$abn1r$1@ID-142197.news.dfncis.de>...
> *SIGH* - now that I've upgraded to emacs 21.3 (Win32) from 21.2,
> html/xml-indenting appears to be broken again (not indenting, just
> inserting LOADS of whitespace everywhere). I searched the ng archives
> and found old answers to a similiar request of mine. I think back then I
> downloaded a new version of sgml-mode and replaced the one that comes
> with emacs. However, now sgml-mode doesn't recognise comments in my
> xml-files anymore, and it complains about unmatched tags, because I have
> something like
>
> <!-- servlet>
> ...
> </servlet>
> ...
> </servlet-mapping -->
>
> in my file.
>
> I tried copying the sgml-mode.el from my old emacs installation, but it
> didn't work, either (I also byte-compiled it).
>
> What can I do now? I don't want to use psgml because of the pestering
> for DTDs.
>
> I also need to look for a mode that can handle jsp-Files well, so
> recommendations for that would be much appreciated.
>
> Many thanks in advance!
sgml-mode in GNU Emacs 21.3.50 has supported indent.
You may either check it out from the CVS or download from my site:
http://61.70.221.93/stuff/sgml-mode.el
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: xml indenting again (sgml-mode broken???)
2003-06-04 0:35 xml indenting again (sgml-mode broken???) Bjoern
` (4 preceding siblings ...)
2003-06-06 5:37 ` d2003xx
@ 2003-06-06 16:02 ` Stefan Monnier
2003-06-07 21:36 ` Bjoern
5 siblings, 1 reply; 16+ messages in thread
From: Stefan Monnier @ 2003-06-06 16:02 UTC (permalink / raw)
> with emacs. However, now sgml-mode doesn't recognise comments in my
> xml-files anymore, and it complains about unmatched tags, because I have
> something like
> <!-- servlet>
> ...
> </servlet>
> ...
> </servlet-mapping -->
Please try the sgml-mode.el in Emacs CVS. I've just installed a change
that should help in such cases. I'd be happy to hear whether it works well
or not for you.
Stefan
PS: In case you can't remember, the location is
http://savannah.gnu.org/cgi-bin/viewcvs/emacs/emacs/lisp/textmodes/sgml-mode.el?rev=HEAD
and you can get there by following links from savannah.gnu.org/projects/emacs.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: xml indenting again (sgml-mode broken???)
2003-06-06 16:02 ` Stefan Monnier
@ 2003-06-07 21:36 ` Bjoern
2003-06-07 22:39 ` Stefan Monnier
0 siblings, 1 reply; 16+ messages in thread
From: Bjoern @ 2003-06-07 21:36 UTC (permalink / raw)
Stefan Monnier wrote:
>> with emacs. However, now sgml-mode doesn't recognise comments in my
>> xml-files anymore, and it complains about unmatched tags, because I have
>> something like
>
>
>> <!-- servlet>
>> ...
>> </servlet>
>> ...
>> </servlet-mapping -->
>
>
> Please try the sgml-mode.el in Emacs CVS. I've just installed a change
> that should help in such cases. I'd be happy to hear whether it works well
> or not for you.
Many thanks for your efforts! It still complains about ummatched tags.
However, you are right, it still indents properly. The error message can
be ignored, although it would be nice as a sort of basic validator if
unmatched tags were detected correctly.
Maybe something else was wrong when I first got the impression that
indenting doesn't work, though, because now also html-mode seems to
indent correctly, which definitely wasn't the case at first.
Bjoern
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: xml indenting again (sgml-mode broken???)
2003-06-07 21:36 ` Bjoern
@ 2003-06-07 22:39 ` Stefan Monnier
0 siblings, 0 replies; 16+ messages in thread
From: Stefan Monnier @ 2003-06-07 22:39 UTC (permalink / raw)
> Many thanks for your efforts! It still complains about ummatched tags.
Yes, I haven't tried to address this issue. I think the error-reporting
is a bit too simplistic to be able to eliminate those messages (we've
already sent them out by the time we notice what's going on).
But it shouldn't be too hard to fix it and would bring more benefits (such
as better messages when they're relevant).
> Maybe something else was wrong when I first got the impression that
> indenting doesn't work, though, because now also html-mode seems to indent
> correctly, which definitely wasn't the case at first.
html-mode is also a derivative of sgml-mode and uses the same
indentation code.
Stefan
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2003-06-07 22:39 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-04 0:35 xml indenting again (sgml-mode broken???) Bjoern
2003-06-04 0:49 ` Galen Boyer
2003-06-04 12:41 ` Bjoern
2003-06-04 2:12 ` Stefan Monnier
2003-06-04 7:03 ` Bjoern
2003-06-04 15:44 ` Stefan Monnier
2003-06-04 18:37 ` Bjoern
2003-06-04 19:42 ` Stefan Monnier
2003-06-04 15:51 ` Artur Hefczyc
2003-06-04 18:44 ` Bjoern
2003-06-04 17:13 ` Kevin Rodgers
2003-06-04 18:38 ` Bjoern
2003-06-06 5:37 ` d2003xx
2003-06-06 16:02 ` Stefan Monnier
2003-06-07 21:36 ` Bjoern
2003-06-07 22:39 ` Stefan Monnier
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.