help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: SGML/XML: fill-paragraph between start and end tags


From: Stefan Monnier
Subject: Re: SGML/XML: fill-paragraph between start and end tags
Date: Fri, 05 Mar 2004 14:28:48 GMT
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

> I am writing xml in sgml-mode.

If you're not using it already I recommend you try out the sgml-mode.el
version in the Emacs-CVS repository, which you can browse from
http://savannah.gnu.org/projects/emacs.  It has some improvements for
XML editing.

> Is there a convenient way to perform a fill-paragraph that operates only
> between the start-tag and end-tag surrounding the current point?

Other than selecting the region and calling fill-region, no, I don't know
how to do that conveniently.

> If I have this:

> <report>
>   <title>This is a short tag</title>
>   <description>
>     <p>This is a long paragraph...</p>
>   </description>
> </report>

> and do a fill-paragraph while the point is between the <p> and </p>,
> then I get this,

> <report>
>   <title>This is a short tag</title>
>   <description>
>     <p>This is a long paragraph that needs to be
>   filled only between the "p" tags.</p>
>   </description> </report>

A lonely tag like </description> should be considered as
a paragraph separator and prevent filling.  There's obviously a bug.
Please report it with M-x report-emacs-bug.  But if you can try it with the
above-mentioned CVS code first (I believe the new sgml-mode.el still works
in Emacs-21.3) it's even better.


        Stefan


reply via email to

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