unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Nathan Eagleson <nate@nateeag.com>
To: Stefan Kangas <stefan@marxist.se>
Cc: 16820@debbugs.gnu.org
Subject: bug#16820: 24.3; nxml comment block indentation issue
Date: Mon, 5 Oct 2020 23:09:01 -0400	[thread overview]
Message-ID: <CA+vbweZ6iYEBwgjgO7Ua33TE4-WwwG44F1DGNBVj_Lsyf3xuMg@mail.gmail.com> (raw)
In-Reply-To: <CADwFkmkqndNp5tL5VJnLxS00xoSVvRq9WAfY08A11DZbZ5XPVQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1893 bytes --]

Sorry, I missed your original request.

This seems like a bug to me because multi-paragraph comment bodies are
usually indented to align with the comment start token.

If you strip trailing whitespace on save, this behavior results in bad
comment indentation, something like:

    <!-- First line of comment is here. It may go on for
    several lines in a format something like you'd expect.

After the blank line, the comment is outdented relative to the
comment start/end markers.

    -->

This is all from distant memory, so apologies if I'm describing it
incorrectly.

-Nate

On Thu, Oct 1, 2020 at 8:12 AM Stefan Kangas <stefan@marxist.se> wrote:

> tags 16820 + wontfix notabug
> close 16820
> thanks
>
> Stefan Kangas <stefan@marxist.se> writes:
>
> > Nate Eagleson <nate@nateeag.com> writes:
> >
> >> nxml-mode indents multiple lines in a comment block to match the
> >> preceding line's indentation, even for blank lines. It should ignore
> >> blank lines when determining indent level.
> > [...]
> >>
> >> To reproduce:
> >>
> >> Start emacs with -Q.
> >>
> >> Create a new buffer.
> >>
> >> Start XML mode: M-x xml-mode
> >>
> >> Enter the following text:
> >>
> >> <test>
> >>  <!-- This is a comment.
> >>
> >> This is the next paragraph in the comment.
> >> -->
> >> </test>
> >>
> >> Put the cursor before '-->' and press Tab. It will indent to the same
> >> level as '<!--'.
> >>
> >> Put the cursor before 'This is the next paragraph in the comment' and
> >> press Tab. Nothing will happen.
> >>
> >> Move up one line to the blank line. Press spacebar twice.
> >>
> >> Move back down a line. Press Tab. The second line will now indent as
> >> expected.
> >
> > I can reproduce this, but I'm not sure this is a bug.  Why shouldn't it
> > take blank lines into consideration?
>
> More information was requested, but none was given within 7 weeks, so
> I'm closing this bug.
>

[-- Attachment #2: Type: text/html, Size: 2872 bytes --]

  reply	other threads:[~2020-10-06  3:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-20  4:44 bug#16820: 24.3; nxml comment block indentation issue Nate Eagleson
2020-08-12 22:01 ` Stefan Kangas
2020-10-01 12:12   ` Stefan Kangas
2020-10-06  3:09     ` Nathan Eagleson [this message]
2020-10-20 16:03       ` Stefan Kangas
2020-10-23  2:43         ` Nathan Eagleson

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=CA+vbweZ6iYEBwgjgO7Ua33TE4-WwwG44F1DGNBVj_Lsyf3xuMg@mail.gmail.com \
    --to=nate@nateeag.com \
    --cc=16820@debbugs.gnu.org \
    --cc=stefan@marxist.se \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).