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> debbugs.gnu.org. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 1 Jun 2016 05:18:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jun 01 01:18:36 2016
Received: from localhost ([127.0.0.1]:48931 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1b7yY8-0002UY-Lo
	for submit <at> debbugs.gnu.org; Wed, 01 Jun 2016 01:18:36 -0400
Received: from eggs.gnu.org ([208.118.235.92]:51674)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <darthandrus@HIDDEN>) id 1b7yY6-0002UK-Ta
 for submit <at> debbugs.gnu.org; Wed, 01 Jun 2016 01:18:35 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <darthandrus@HIDDEN>) id 1b7yY0-0000VQ-Bz
 for submit <at> debbugs.gnu.org; Wed, 01 Jun 2016 01:18:29 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
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 lists.gnu.org ([2001:4830:134:3::11]:58902)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <darthandrus@HIDDEN>) id 1b7yY0-0000VD-87
 for submit <at> debbugs.gnu.org; Wed, 01 Jun 2016 01:18:28 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:42632)
 by lists.gnu.org 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 eggs.gnu.org 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 mail-it0-x235.google.com ([2607:f8b0:4001:c0b::235]:35115)
 by eggs.gnu.org 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 mail-it0-x235.google.com 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; d=gmail.com; s=20120113;
 h=from:content-transfer-encoding:subject:message-id:date:to
 :mime-version; bh=7EHlTAyvkCbvzMVwrvkzRkTA65rBHSZsn4Pr6a4GYyA=;
 b=Bm7ZsAwzttAlLQfEuC/hpED9IcFYclYULwvKJZJfNWZPmiz6+uSpNWD2/YtQj1jAgF
 2dQ/wVbJJ54rGqn2FLJO37al53YljCSNzmiBxG7+8CtGsdS55N1saJiepaZa9rAPqxVU
 U7QuYKJy2w7bBOpWM//5CXblA7bgW0TVNgan6PCgqQcdhRcOWEmG1kZjpOl3wR3asikm
 lBopPKD8IL/AItG1o1kONYskIApZIEyKPRZaNZZZN3qlPZmIY3ul9IIsYn2iIiXDKDAB
 OvJC+Ow/+iFqmF0FJ2BR3hjMNToOWkRycJBtWpNrkzrEqgvWm59PRxXYJZoujZRsOws5
 wnxw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:from:content-transfer-encoding:subject
 :message-id:date:to:mime-version;
 bh=7EHlTAyvkCbvzMVwrvkzRkTA65rBHSZsn4Pr6a4GYyA=;
 b=kWHsyAt746jKSHbdy5gO9pVAV2Bc8zVE90bnpuzM6i2UfyqwrFXLxOFY3O2nqTCFFO
 SJoaAjjmtfOkwU9DR+aJbOKSMkoJjnF8EdF9xF1hwlWBe1543cd3Gpasi5fEtHnCLDvW
 MGrx3ck249Fa8rzBAjbRreVkvD2luXPJPfmGPDp7QLd8QYxbcjN3caOtTuBIy80gHvC+
 SZ0d1VpCXvuqNJqIOdBlyW1tfyS5L5auGfXU7JJuYW8udBIapgdCMOUL0sPOzK8EUteq
 IVcTS0ueGnWan9j8mdWCwqFYrAc6EHqv9mRRB62Pp+AmC9bTrIVS0dGFOtLamppisPQw
 +Lew==
X-Gm-Message-State: ALyK8tIV7y65e/cd5GvaWv4LoOUiBJN81ZQSa6rABeGYewGM0O4CH2tgalDoy23gr0o+hQ==
X-Received: by 10.36.1.144 with SMTP id 138mr2665559itk.35.1464758301653;
 Tue, 31 May 2016 22:18:21 -0700 (PDT)
Received: from [10.0.2.34] (174-23-122-197.slkc.qwest.net. [174.23.122.197])
 by smtp.gmail.com with ESMTPSA id s205sm11279919itd.16.2016.05.31.22.18.20
 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 eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-detected-operating-system: by eggs.gnu.org: 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> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.0 (----)

=46rom 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=3D/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))






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.