* Indentation problems in SGML mode
@ 2003-05-13 16:18 Jeffery B. Rancier
0 siblings, 0 replies; 12+ messages in thread
From: Jeffery B. Rancier @ 2003-05-13 16:18 UTC (permalink / raw)
I'm seeing peculiar indentation in some of my XML files. For example,
if I start with the following:
<?xml version="1.0"?>
<project name="ScreenDesigner" default="help" basedir=".">
<!-- Project directories -->
<property name="src.dir" value="src"/>
<property name="doc.dir" value="doc"/>
<property name="dist.dir" value="dist"/>
<property name="lib.dir" value="lib"/>
<property name="bin.dir" value="bin"/>
<!-- Temporary build directories -->
<property name="build.dir" value="build"/>
<property name="build.classes" value="${build.dir}/classes"/>
<property name="build.doc" value="${build.dir}/doc"/>
<property name="build.lib" value="${build.dir}/lib"/>
and run mark-whole-buffer, and run indent-region, I get the
following. Is a bug in SGML mode?
<?xml version="1.0"?>
<project name="ScreenDesigner" default="help" basedir=".">
<!-- Project directories -->
<property name="src.dir" value="src"/>
<property name="doc.dir" value="doc"/>
<property name="dist.dir" value="dist"/>
<property name="lib.dir" value="lib"/>
<property name="bin.dir" value="bin"/>
<!-- Temporary build directories -->
<property name="build.dir" value="build"/>
<property name="build.classes" value="${build.dir}/classes"/>
<property name="build.doc" value="${build.dir}/doc"/>
<property name="build.lib" value="${build.dir}/lib"/>
--
Thanks,
Jeff
,----
| Jeffery B. Rancier
|
| Softechnics
| a METTLER TOLEDO company
`----
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Indentation problems in SGML mode
[not found] <mailman.6112.1052843222.21513.help-gnu-emacs@gnu.org>
@ 2003-05-13 19:58 ` Kai Großjohann
2003-05-13 23:21 ` Peter Lee
` (2 more replies)
0 siblings, 3 replies; 12+ messages in thread
From: Kai Großjohann @ 2003-05-13 19:58 UTC (permalink / raw)
jeff.rancier@softechnics.com (Jeffery B. Rancier) writes:
> I'm seeing peculiar indentation in some of my XML files. For example,
> if I start with the following:
Are you using PSGML or the SGML mode that comes with Emacs?
Did you turn on XML mode for this buffer, or the generic SGML mode?
--
This line is not blank.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Indentation problems in SGML mode
2003-05-13 19:58 ` Indentation problems in SGML mode Kai Großjohann
@ 2003-05-13 23:21 ` Peter Lee
2003-05-15 8:35 ` Kai Großjohann
2003-05-15 17:27 ` Jeffery B. Rancier
[not found] ` <mailman.6260.1053020030.21513.help-gnu-emacs@gnu.org>
2 siblings, 1 reply; 12+ messages in thread
From: Peter Lee @ 2003-05-13 23:21 UTC (permalink / raw)
kai.grossjohann@gmx.net (Kai Großjohann) writes:
> jeff.rancier@softechnics.com (Jeffery B. Rancier) writes:
>
>> I'm seeing peculiar indentation in some of my XML files. For example,
>> if I start with the following:
I'm having problems with fontification myself. I have the following in
my .emacs:
autoload 'xml-mode "psgml" "psgml" t)
(defun my-xml-mode-hook ()
(cond (window-system
(setq sgml-set-face t)
(setq sgml-indent-data t))))
(add-hook 'sgml-mode-hook 'my-xml-mode-hook)
When I open an xml file it is initially not fontified. However if I
select a region and do C-M-\ it then fontifies.
Any ideas why that would be ?
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Indentation problems in SGML mode
2003-05-13 23:21 ` Peter Lee
@ 2003-05-15 8:35 ` Kai Großjohann
2003-05-15 14:53 ` Kevin Rodgers
2003-05-15 15:22 ` Peter Lee
0 siblings, 2 replies; 12+ messages in thread
From: Kai Großjohann @ 2003-05-15 8:35 UTC (permalink / raw)
Peter Lee <pete_lee@swbell.net> writes:
> When I open an xml file it is initially not fontified. However if I
> select a region and do C-M-\ it then fontifies.
That's because PSGML uses its own fontification mechanism, and avoids
font-lock. PSGML does fontification lazily, in a way, so it only
fontifies things that you change. You can also go to a line
and hit TAB -- then it will fontify everything up to that line.
When PSGML was written, font-lock was probably not powerful enough for
proper SGML font-locking: you can change the < and > characters in
SGML, so regular expressions don't work.
--
This line is not blank.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Indentation problems in SGML mode
2003-05-15 8:35 ` Kai Großjohann
@ 2003-05-15 14:53 ` Kevin Rodgers
2003-05-16 6:21 ` Kai Großjohann
2003-05-15 15:22 ` Peter Lee
1 sibling, 1 reply; 12+ messages in thread
From: Kevin Rodgers @ 2003-05-15 14:53 UTC (permalink / raw)
Kai Großjohann wrote:
> When PSGML was written, font-lock was probably not powerful enough for
> proper SGML font-locking: you can change the < and > characters in
> SGML, so regular expressions don't work.
I don't think that's the issue, since PSGML does not support different
values of stago, etago, and tagc (other than the default values "<",
"</", and ">"):
| File: psgml.info, Node: SGML declaration, Next: Managing the DTD, Prev:
Validate, Up: Top
|
| SGML Declaration
****************|
|
| PSGML does not understand the SGML declaration, it accepts one in the
| file but it is ignored. If you have the SGML declaration in another
| file you can make `sgmls' use it when you use the `C-c C-v'
| (`sgml-validate') command (*note Validate::.).
|
| PSGML has some options in what features it uses and what markup it
| creates. You have to set these options to make PSGML's behavior
| consistent with your SGML declaration and personal preferences.
|
| - User Option: sgml-omittag
| Set this to `t' if the SGML declaration has `OMITTAG YES' and to
| `nil' otherwise.
|
| - User Option: sgml-shorttag
| Set this to `t' if the SGML declaration has `SHORTTAG YES' and to
| `nil' otherwise.
|
| - User Option: sgml-always-quote-attributes
| If non-nil, quote all attribute values inserted after finishing
| edit attributes. If this variable is `nil' and `sgml-shorttag' is
| non-`nil', attribute values that consists of only name characters
| will not be quoted.
|
| - User Option: sgml-minimize-attributes
| Determines minimization of attributes inserted by edit-attributes.
| If non-nil, omit attribute name if the attribute value is from a
| token group. If `max', omit attributes with default value.
| Minimization will only be done if they produce legal SGML (assuming
| `sgml-omittag' and `sgml-shorttag' are set correctly).
--
<a href="mailto:<kevin.rodgers@ihs.com>">Kevin Rodgers</a>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Indentation problems in SGML mode
2003-05-15 8:35 ` Kai Großjohann
2003-05-15 14:53 ` Kevin Rodgers
@ 2003-05-15 15:22 ` Peter Lee
1 sibling, 0 replies; 12+ messages in thread
From: Peter Lee @ 2003-05-15 15:22 UTC (permalink / raw)
kai.grossjohann@gmx.net (Kai Großjohann) writes:
> That's because PSGML uses its own fontification mechanism, and avoids
> font-lock. PSGML does fontification lazily, in a way, so it only
> fontifies things that you change. You can also go to a line
> and hit TAB -- then it will fontify everything up to that line.
>
> When PSGML was written, font-lock was probably not powerful enough for
> proper SGML font-locking: you can change the < and > characters in
> SGML, so regular expressions don't work.
That's fine... I just wanted to make sure it wasn't a config issue on
my end.
Thanks for the info.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Indentation problems in SGML mode
2003-05-13 19:58 ` Indentation problems in SGML mode Kai Großjohann
2003-05-13 23:21 ` Peter Lee
@ 2003-05-15 17:27 ` Jeffery B. Rancier
[not found] ` <mailman.6260.1053020030.21513.help-gnu-emacs@gnu.org>
2 siblings, 0 replies; 12+ messages in thread
From: Jeffery B. Rancier @ 2003-05-15 17:27 UTC (permalink / raw)
kai.grossjohann@gmx.net (Kai Großjohann) writes:
> Are you using PSGML or the SGML mode that comes with Emacs?
Out of the box SGML mode. (along with xslt-process as the minor mode).
> Did you turn on XML mode for this buffer, or the generic SGML mode?
No. I add nothing to the auto-mode-alist for an xml extension. Suggestions?
--
Thanks,
Jeff
,----
| Jeffery B. Rancier
|
| Softechnics
| a METTLER TOLEDO company
`----
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Indentation problems in SGML mode
2003-05-15 14:53 ` Kevin Rodgers
@ 2003-05-16 6:21 ` Kai Großjohann
0 siblings, 0 replies; 12+ messages in thread
From: Kai Großjohann @ 2003-05-16 6:21 UTC (permalink / raw)
Kevin Rodgers <ihs_4664@yahoo.com> writes:
> Kai Großjohann wrote:
>
>> When PSGML was written, font-lock was probably not powerful enough for
>> proper SGML font-locking: you can change the < and > characters in
>> SGML, so regular expressions don't work.
>
> I don't think that's the issue, since PSGML does not support different
> values of stago, etago, and tagc (other than the default values "<",
> "</", and ">"):
Oh. So why does it things this way, then?
--
This line is not blank.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Indentation problems in SGML mode
[not found] ` <mailman.6260.1053020030.21513.help-gnu-emacs@gnu.org>
@ 2003-05-17 17:16 ` Stefan Monnier
2003-05-19 14:36 ` Jeffery B. Rancier
[not found] ` <mailman.6432.1053392287.21513.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 12+ messages in thread
From: Stefan Monnier @ 2003-05-17 17:16 UTC (permalink / raw)
>> Are you using PSGML or the SGML mode that comes with Emacs?
> Out of the box SGML mode. (along with xslt-process as the minor mode).
Out of the box, Emacs's sgml-mode does not have xslt-process, does not do
indentation, and does not know anything about XML.
You might want to try:
http://savannah.gnu.org/cgi-bin/viewcvs/emacs/emacs/lisp/textmodes/sgml-mode.el?rev=HEAD
which adds XML support and indentation to "out of the box SGML mode".
Stefan
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Indentation problems in SGML mode
2003-05-17 17:16 ` Stefan Monnier
@ 2003-05-19 14:36 ` Jeffery B. Rancier
[not found] ` <mailman.6432.1053392287.21513.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 12+ messages in thread
From: Jeffery B. Rancier @ 2003-05-19 14:36 UTC (permalink / raw)
"Stefan Monnier" <monnier+gnu.emacs.help/news/@flint.cs.yale.edu> writes:
>>> Are you using PSGML or the SGML mode that comes with Emacs?
>> Out of the box SGML mode. (along with xslt-process as the minor mode).
>
> Out of the box, Emacs's sgml-mode does not have xslt-process, does not do
> indentation, and does not know anything about XML.
> You might want to try:
>
> http://savannah.gnu.org/cgi-bin/viewcvs/emacs/emacs/lisp/textmodes/sgml-mode.el?rev=HEAD
>
> which adds XML support and indentation to "out of the box SGML mode".
That appears to be the same module included in my install (although
more current, is that what you were implying?), in
/emacs-21.3/lisp/textmodes/sgml-mode.el.
Also, from the Menu->SGML->File Options, there is *Indent Step*, and
*Indent Data*. Are we talking about two different SGML modes?
--
Thanks,
Jeff
,----
| Jeffery B. Rancier
|
| Softechnics
| a METTLER TOLEDO company
`----
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Indentation problems in SGML mode
[not found] ` <mailman.6432.1053392287.21513.help-gnu-emacs@gnu.org>
@ 2003-05-20 6:40 ` Stefan Monnier
2003-05-21 20:39 ` Jeffery B. Rancier
0 siblings, 1 reply; 12+ messages in thread
From: Stefan Monnier @ 2003-05-20 6:40 UTC (permalink / raw)
>> Out of the box, Emacs's sgml-mode does not have xslt-process, does not do
>> indentation, and does not know anything about XML.
>> You might want to try:
>>
>> http://savannah.gnu.org/cgi-bin/viewcvs/emacs/emacs/lisp/textmodes/sgml-mode.el?rev=HEAD
>>
>> which adds XML support and indentation to "out of the box SGML mode".
> That appears to be the same module included in my install (although
> more current, is that what you were implying?), in
> /emacs-21.3/lisp/textmodes/sgml-mode.el.
As indirectly mentioned in my previous message, "more current" in this case
implies "adds XML support and indentation".
Stefan
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Indentation problems in SGML mode
2003-05-20 6:40 ` Stefan Monnier
@ 2003-05-21 20:39 ` Jeffery B. Rancier
0 siblings, 0 replies; 12+ messages in thread
From: Jeffery B. Rancier @ 2003-05-21 20:39 UTC (permalink / raw)
"Stefan Monnier" <monnier+gnu.emacs.help/news/@flint.cs.yale.edu> writes:
>>> Out of the box, Emacs's sgml-mode does not have xslt-process, does not do
>>> indentation, and does not know anything about XML.
>>> You might want to try:
>>>
>>> http://savannah.gnu.org/cgi-bin/viewcvs/emacs/emacs/lisp/textmodes/sgml-mode.el?rev=HEAD
>>>
>>> which adds XML support and indentation to "out of the box SGML mode".
>
>> That appears to be the same module included in my install (although
>> more current, is that what you were implying?), in
>> /emacs-21.3/lisp/textmodes/sgml-mode.el.
>
> As indirectly mentioned in my previous message, "more current" in this case
> implies "adds XML support and indentation".
>
OK, I found buried in the XAE package, a version of PSGML. So, that
is in fact what I'm using. I removed that and retrieved the current
PSGML:
Emacs : GNU Emacs 21.3.1 (i386-msvc-nt5.1.2600)
of 2003-03-27 on buffy
Package: psgml.el 1.3.1
I guess I'll submit a bug-report.
Thanks.
Jeff
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2003-05-21 20:39 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <mailman.6112.1052843222.21513.help-gnu-emacs@gnu.org>
2003-05-13 19:58 ` Indentation problems in SGML mode Kai Großjohann
2003-05-13 23:21 ` Peter Lee
2003-05-15 8:35 ` Kai Großjohann
2003-05-15 14:53 ` Kevin Rodgers
2003-05-16 6:21 ` Kai Großjohann
2003-05-15 15:22 ` Peter Lee
2003-05-15 17:27 ` Jeffery B. Rancier
[not found] ` <mailman.6260.1053020030.21513.help-gnu-emacs@gnu.org>
2003-05-17 17:16 ` Stefan Monnier
2003-05-19 14:36 ` Jeffery B. Rancier
[not found] ` <mailman.6432.1053392287.21513.help-gnu-emacs@gnu.org>
2003-05-20 6:40 ` Stefan Monnier
2003-05-21 20:39 ` Jeffery B. Rancier
2003-05-13 16:18 Jeffery B. Rancier
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.