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

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Ivan Andrus <darthandrus@HIDDEN>; Keywords: patch; merged with #18871; dated Wed, 1 Jun 2016 05:19:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Merged 18871 23668. Request was from Noam Postavsky <npostavs@HIDDEN> to control <at> Full text available.

Message received at submit <at>

Received: (at submit) by; 1 Jun 2016 05:18:37 +0000
From debbugs-submit-bounces <at> Wed Jun 01 01:18:36 2016
Received: from localhost ([]:48931
	by with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at>>)
	id 1b7yY8-0002UY-Lo
	for submit <at>; Wed, 01 Jun 2016 01:18:36 -0400
Received: from ([]:51674)
 by with esmtp (Exim 4.84_2)
 (envelope-from <darthandrus@HIDDEN>) id 1b7yY6-0002UK-Ta
 for submit <at>; Wed, 01 Jun 2016 01:18:35 -0400
Received: from Debian-exim by with spam-scanned (Exim 4.71)
 (envelope-from <darthandrus@HIDDEN>) id 1b7yY0-0000VQ-Bz
 for submit <at>; Wed, 01 Jun 2016 01:18:29 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM,
 T_DKIM_INVALID autolearn=disabled version=3.3.2
Received: from ([2001:4830:134:3::11]:58902)
 by with esmtp (Exim 4.71)
 (envelope-from <darthandrus@HIDDEN>) id 1b7yY0-0000VD-87
 for submit <at>; Wed, 01 Jun 2016 01:18:28 -0400
Received: from ([2001:4830:134:3::10]:42632)
 by with esmtp (Exim 4.71)
 (envelope-from <darthandrus@HIDDEN>) id 1b7yXx-0004kl-Ub
 for bug-gnu-emacs@HIDDEN; Wed, 01 Jun 2016 01:18:27 -0400
Received: from Debian-exim by with spam-scanned (Exim 4.71)
 (envelope-from <darthandrus@HIDDEN>) id 1b7yXu-0000UR-MI
 for bug-gnu-emacs@HIDDEN; Wed, 01 Jun 2016 01:18:25 -0400
Received: from ([2607:f8b0:4001:c0b::235]:35115)
 by with esmtp (Exim 4.71)
 (envelope-from <darthandrus@HIDDEN>) id 1b7yXu-0000UL-G2
 for bug-gnu-emacs@HIDDEN; Wed, 01 Jun 2016 01:18:22 -0400
Received: by with SMTP id z189so70760964itg.0
 for <bug-gnu-emacs@HIDDEN>; Tue, 31 May 2016 22:18:22 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20120113;
 :mime-version; bh=7EHlTAyvkCbvzMVwrvkzRkTA65rBHSZsn4Pr6a4GYyA=;
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20130820;
X-Gm-Message-State: ALyK8tIV7y65e/cd5GvaWv4LoOUiBJN81ZQSa6rABeGYewGM0O4CH2tgalDoy23gr0o+hQ==
X-Received: by with SMTP id 138mr2665559itk.35.1464758301653;
 Tue, 31 May 2016 22:18:21 -0700 (PDT)
Received: from [] ( [])
 by with ESMTPSA id s205sm11279919itd.16.2016.
 for <bug-gnu-emacs@HIDDEN>
 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128);
 Tue, 31 May 2016 22:18:21 -0700 (PDT)
From: Ivan Andrus <darthandrus@HIDDEN>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
Subject: 25.0.94; nxml mode doesn't indent correctly if prolog gets deleted
Message-Id: <A57F582A-0909-4F7F-B2BA-DCEDAA6AB596@HIDDEN>
Date: Tue, 31 May 2016 23:18:19 -0600
To: bug-gnu-emacs@HIDDEN
Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\))
X-Mailer: Apple Mail (2.3124)
X-detected-operating-system: by GNU/Linux 2.2.x-3.x [generic]
X-detected-operating-system: by GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at>
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <>
List-Unsubscribe: <>, 
 <mailto:debbugs-submit-request <at>>
List-Archive: <>
List-Post: <mailto:debbugs-submit <at>>
List-Help: <mailto:debbugs-submit-request <at>>
List-Subscribe: <>, 
 <mailto:debbugs-submit-request <at>>
Errors-To: debbugs-submit-bounces <at>
Sender: "Debbugs-submit" <debbugs-submit-bounces <at>>
X-Spam-Score: -4.0 (----)

=46rom emacs -Q evaluate the following and notice that they are =

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

  (insert "\n<test>\n <bob/>\n</test>")
  (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.


In GNU Emacs (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

Configured features:

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:
Using vacuous schema
Indenting region...done
C-c C-c is undefined

Load-path shadows:
None found.

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

Acknowledgement sent to Ivan Andrus <darthandrus@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#23668; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sat, 18 May 2019 19:15:01 UTC

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