GNU bug report logs - #23668
25.0.94; nxml mode doesn't indent correctly if prolog gets deleted

Previous Next

Package: emacs;

Reported by: Ivan Andrus <darthandrus <at> gmail.com>

Date: Wed, 1 Jun 2016 05:19:02 UTC

Severity: normal

Tags: fixed, patch

Merged with 18871

Found in versions 24.4, 25.0.94, 26.1

Fixed in version 27.1

Done: Noam Postavsky <npostavs <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 23668 in the body.
You can then email your comments to 23668 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#23668; Package emacs. (Wed, 01 Jun 2016 05:19:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ivan Andrus <darthandrus <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 01 Jun 2016 05:19:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ivan Andrus <darthandrus <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.0.94; nxml mode doesn't indent correctly if prolog gets deleted
Date: Tue, 31 May 2016 23:18:19 -0600
From emacs -Q evaluate the following and notice that they are different.


(with-temp-buffer
  (insert "\n <test>\n <bob/>\n</test>")
  (xml-mode)
  (indent-region (point-min) (point-max))
  (buffer-substring-no-properties (point-min) (point-max)))

(with-temp-buffer
  (insert "\n<test>\n <bob/>\n</test>")
  (xml-mode)
  (indent-region (point-min) (point-max))
  (buffer-substring-no-properties (point-min) (point-max)))


As best as I could determine it has to do with the prolog being parsed,
then deleted, but not being reparsed.  Thus it thinks <test> is
part of the prolog.  Unfortunately, the code is rather more than I have
time to understand at the moment.

-Ivan


In GNU Emacs 25.0.94.4 (x86_64-apple-darwin15.4.0, NS appkit-1404.46 Version 10.11.4 (Build 15E65))
of 2016-05-30 built on iandrus-osx
Repository revision: 6bdfb36bbff6dbe3ee2c3a15df9051c6656996ad
Windowing system distributor 'Apple', version 10.3.1404
Configured using:
'configure --with-ns --with-modules
PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig'

Configured features:
JPEG RSVG IMAGEMAGICK DBUS NOTIFY ACL GNUTLS LIBXML2 ZLIB
TOOLKIT_SCROLL_BARS NS MODULES

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-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 messages:
<test>
<bob/>
</test>"
Using vacuous schema
Indenting region...done
"
<test>
  <bob/>
</test>"
C-c C-c is undefined

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message dired format-spec rfc822 mml
mml-sec password-cache epg epg-config gnus-util mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail
rfc2047 rfc2045 ietf-drums mm-util help-fns help-mode cl-loaddefs pcase
cl-lib mail-prsvr mail-utils 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 mule-util tooltip eldoc
electric uniquify ediff-hook vc-hooks lisp-float-type mwheel ns-win
ucs-normalize term/common-win tool-bar dnd fontset image regexp-opt
fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register
page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock
font-lock syntax facemenu font-core frame cl-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese charscript case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice
loaddefs button faces cus-face macroexp files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote dbusbind kqueue cocoa ns multi-tty
make-network-process emacs)

Memory information:
((conses 16 209690 10284)
(symbols 48 21797 0)
(miscs 40 45 201)
(strings 32 19574 5815)
(string-bytes 1 563342)
(vectors 16 34982)
(vector-slots 8 677819 3811)
(floats 8 178 121)
(intervals 56 230 6)
(buffers 976 12))






Merged 18871 23668. Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Sat, 18 May 2019 19:00:02 GMT) Full text and rfc822 format available.

Merged 18871 23668 32823. Request was from npostavs <at> gmail.com to control <at> debbugs.gnu.org. (Mon, 27 May 2019 19:23:02 GMT) Full text and rfc822 format available.

Disconnected #32823 from all other report(s). Request was from npostavs <at> gmail.com to control <at> debbugs.gnu.org. (Mon, 27 May 2019 20:36:02 GMT) Full text and rfc822 format available.

Added tag(s) fixed. Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Tue, 04 Jun 2019 13:00:07 GMT) Full text and rfc822 format available.

bug marked as fixed in version 27.1, send any further explanations to 18871 <at> debbugs.gnu.org and Vincent Lefevre <vincent <at> vinc17.net> Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Tue, 04 Jun 2019 13:00:09 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 03 Jul 2019 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 357 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.