unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#16820: 24.3; nxml comment block indentation issue
@ 2014-02-20  4:44 Nate Eagleson
  2020-08-12 22:01 ` Stefan Kangas
  0 siblings, 1 reply; 6+ messages in thread
From: Nate Eagleson @ 2014-02-20  4:44 UTC (permalink / raw)
  To: 16820

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

This bug report will be sent to the Bug-GNU-Emacs mailing list
and the GNU bug tracker at debbugs.gnu.org.  Please check that
the From: line contains a valid email address.  After a delay of up
to one day, you should receive an acknowledgment at that address.

Please write in English if possible, as the Emacs maintainers
usually do not have translators for other languages.

Please describe exactly what actions triggered the bug, and
the precise symptoms of the bug.  If you can, give a recipe
starting from `emacs -Q':

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.

I couldn't find any mention of this bug in the mailing list archives,
which I searched with Google's site: feature, but I may have 
missed something.

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.

If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
    `bt full' and `xbacktrace'.
For information about debugging Emacs, please read the file
/Applications/Emacs.app/Contents/Resources/etc/DEBUG.


In GNU Emacs 24.3.1 (x86_64-apple-darwin, NS apple-appkit-1038.36)
of 2013-03-12 on bob.porkrind.org
Windowing system distributor `Apple', version 10.3.1038
Configured using:
`configure '--host=x86_64-apple-darwin' '--build=i686-apple-darwin'
'--with-ns' 'build_alias=i686-apple-darwin'
'host_alias=x86_64-apple-darwin' 'CC=gcc -mmacosx-version-min=10.5 ''

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: nXML

Minor modes in effect:
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
C-x C-f M-p n x <tab> <return> C-n C-n C-n <tab> C-/ 
M-x e m a <backspace> <backspace> <backspace> r e p 
o <tab> <tab> o <tab> <backspace> r <tab> <return>

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
user-error: Beginning of history; no preceding item
Using vacuous schema
Loading vc-git...done
Undo!
Making completion list...

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr mail-utils help-mode vc-git nxml-uchnm rng-xsd xsd-regexp
rng-cmpct rng-nxml rng-valid rng-loc rng-uri rng-parse nxml-parse
rng-match rng-dt rng-util rng-pttrn nxml-ns easymenu nxml-mode
nxml-outln nxml-rap nxml-util nxml-glyph nxml-enc xmltok time-date
tooltip ediff-hook vc-hooks lisp-float-type mwheel ns-win tool-bar dnd
fontset image regexp-opt fringe tabulated-list newcomment lisp-mode
register page menu-bar rfn-eshadow timer select scroll-bar mouse
jit-lock font-lock syntax facemenu font-core frame cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev
minibuffer loaddefs button faces cus-face macroexp files text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process ns multi-tty
emacs)


-Nate

http://www.nateeag.com


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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#16820: 24.3; nxml comment block indentation issue
  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
  0 siblings, 1 reply; 6+ messages in thread
From: Stefan Kangas @ 2020-08-12 22:01 UTC (permalink / raw)
  To: Nate Eagleson; +Cc: 16820

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?

Best regards,
Stefan Kangas





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#16820: 24.3; nxml comment block indentation issue
  2020-08-12 22:01 ` Stefan Kangas
@ 2020-10-01 12:12   ` Stefan Kangas
  2020-10-06  3:09     ` Nathan Eagleson
  0 siblings, 1 reply; 6+ messages in thread
From: Stefan Kangas @ 2020-10-01 12:12 UTC (permalink / raw)
  To: Nate Eagleson; +Cc: 16820

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.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#16820: 24.3; nxml comment block indentation issue
  2020-10-01 12:12   ` Stefan Kangas
@ 2020-10-06  3:09     ` Nathan Eagleson
  2020-10-20 16:03       ` Stefan Kangas
  0 siblings, 1 reply; 6+ messages in thread
From: Nathan Eagleson @ 2020-10-06  3:09 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: 16820

[-- 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 --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#16820: 24.3; nxml comment block indentation issue
  2020-10-06  3:09     ` Nathan Eagleson
@ 2020-10-20 16:03       ` Stefan Kangas
  2020-10-23  2:43         ` Nathan Eagleson
  0 siblings, 1 reply; 6+ messages in thread
From: Stefan Kangas @ 2020-10-20 16:03 UTC (permalink / raw)
  To: Nathan Eagleson; +Cc: 16820

reopen 16820
tags 16820 confirmed
thanks

Nathan Eagleson <nate@nateeag.com> writes:

> 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.

Oh, right.  Yes, that indeed does seem like a bug.  Reopening.

Thanks for writing back.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#16820: 24.3; nxml comment block indentation issue
  2020-10-20 16:03       ` Stefan Kangas
@ 2020-10-23  2:43         ` Nathan Eagleson
  0 siblings, 0 replies; 6+ messages in thread
From: Nathan Eagleson @ 2020-10-23  2:43 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: 16820

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

Sure thing. I'm sorry for completely missing your first request for info.

On Tue, Oct 20, 2020 at 12:03 PM Stefan Kangas <stefan@marxist.se> wrote:

> reopen 16820
> tags 16820 confirmed
> thanks
>
> Nathan Eagleson <nate@nateeag.com> writes:
>
> > 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.
>
> Oh, right.  Yes, that indeed does seem like a bug.  Reopening.
>
> Thanks for writing back.
>

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-10-23  2:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2020-10-20 16:03       ` Stefan Kangas
2020-10-23  2:43         ` Nathan Eagleson

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).