emacs-pretest-bug
[Top][All Lists]
Advanced

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

sgml-mode indent-region bug?


From: glaprade
Subject: sgml-mode indent-region bug?
Date: Tue, 14 Jan 2003 08:36:25 -0700

        From: "Stefan Monnier <address@hidden>"
<monnier+gnu.emacs.help/news/@flint.cs.yale.edu>
        Newsgroups: gnu.emacs.help
        Subject: Re: xml indenting, possibly with psgml?
        Date: 12 Jan 2003 15:46:49 -0500
        Organization: Yale University
        User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

        >>
http://savannah.gnu.org/cgi-bin/viewcvs/emacs/emacs/lisp/textmodes/sgml-mode
.el?rev=HEAD
        > I downloaded this guy and loaded it up, but when I C-x h and C-M \
it
        > doesn't seem to indent logically.  It basically indents every line
        > increasingly so that they form a backwards stair-step pattern.
Any hints???

        Just like with most auto-indenting modes (well, maybe more so ;-),
you have
        to be careful where you break your lines.  Try to insert newlines at
        various places to see what helps.  In any case, send a problematic
sample to
        address@hidden so we can see what to do with it.


                Stefan


Stefan, here is my sample file:

<grocery_list>
     <item id="0001">
          <name>banana</name>
          <unit>lbs</unit>
          <quantity>5</quantity>
          <perishable>yes</perishable>
          <priority>3</priority>
     </item>
     <item id="0002">
          <name>coffee</name>
          <unit>can</unit>
          <quantity>2</quantity>
          <perishable>no</perishable>
          <priority>2</priority>
     </item>
     <item id="0003">
          <name>apple</name>
          <unit>lbs</unit>
          <quantity>4</quantity>
          <perishable>yes</perishable>
          <priority>3</priority>
     </item>
     <item id="0004">
          <name>rice</name>
          <unit>lbs</unit>
          <quantity>5</quantity>
          <perishable>no</perishable>
          <priority>4</priority>
     </item>
</grocery_list>


After C-x h and C-M \ I get this:

        <grocery_list>
             <item id="0001">
                       <name>banana</name>
                                 <unit>lbs</unit>
                                           <quantity>5</quantity>
        
<perishable>yes</perishable>
        
<priority>3</priority>
                                                                    </item>
        
<item id="0002">
        
<name>coffee</name>
        
<unit>can</unit>
        
<quantity>2</quantity>
        
<perishable>no</perishable>
        
<priority>2</priority>
        
</item>
        
<item id="0003">
        
<name>apple</name>
        
<unit>lbs</unit>
        
<quantity>4</quantity>
        
<perishable>yes</perishable>
        
<priority>3</priority>
        
</item>
        
<item id="0004">
        
<name>rice</name>
        
<unit>lbs</unit>
        
<quantity>5</quantity>
        
<perishable>no</perishable>
        
<priority>4</priority>
        
</item>
        
</grocery_list>




reply via email to

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