unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#21293: 24.5; libxml-xml-parse-region and comments at end of file
@ 2015-08-19  9:29 patrick mc allister
  2016-03-01  6:09 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 3+ messages in thread
From: patrick mc allister @ 2015-08-19  9:29 UTC (permalink / raw)
  To: 21293

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

It seems something goes wrong with `libxml-parse-xml-region' when
there are comments at the end of the file:

emacs -Q

then run this function to see the problem:

(defun setup-problem ()
  (let ((testBuffer (get-buffer-create "*a libxml parse problem")))
    (with-current-buffer testBuffer
      (erase-buffer)
      (insert "<something />
<!-- a comment -->
<!-- another comment -->")
      (goto-char (point-min))
      (libxml-parse-xml-region (point-min) (point-max)))))

(setup-problem) ;; (top nil (comment nil " a comment ") (comment nil " another comment "))

So it seems the "something" element does not make it into the list?
The problem only appears if there are more than two comments at the
end. If there's only one, the region gets parsed as expected, and the
last comment gets lost:

(defun setup-problem-b ()
  (let ((testBuffer (get-buffer-create "*a libxml parse problem")))
    (with-current-buffer testBuffer
      (erase-buffer)
      (insert "<something />
<!-- only one comment -->")
      (goto-char (point-min))
      (libxml-parse-xml-region (point-min) (point-max)))))

(setup-problem-b) ;; (something nil)

If there's a comment at the beginning, it works, however:

(defun setup-comment-beginning ()
  (let ((testBuffer (get-buffer-create "*a libxml parse problem")))
    (with-current-buffer testBuffer
      (erase-buffer)
      (insert "<!-- a comment at the start -->
<something />
<!-- only one comment -->
<!-- and one more comment -->")
      (goto-char (point-min))
      (libxml-parse-xml-region (point-min) (point-max)))))

(setup-comment-beginning) ;; (top nil (something nil) (comment nil " only one comment ") (comment nil " and one more comment "))

In GNU Emacs 24.5.1 (x86_64-pc-linux-gnu, GTK+ Version 3.16.4)
 of 2015-06-28 on trouble, modified by Debian
Windowing system distributor `The X.Org Foundation', version 11.0.11702000
System Description:	Debian GNU/Linux testing (stretch)

Configured using:
 `configure --build x86_64-linux-gnu --prefix=/usr
 --sharedstatedir=/var/lib --libexecdir=/usr/lib
 --localstatedir=/var/lib --infodir=/usr/share/info
 --mandir=/usr/share/man --with-pop=yes
 --enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.5/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.5/site-lisp:/usr/share/emacs/site-lisp
 --build x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib
 --libexecdir=/usr/lib --localstatedir=/var/lib
 --infodir=/usr/share/info --mandir=/usr/share/man --with-pop=yes
 --enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.5/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.5/site-lisp:/usr/share/emacs/site-lisp
 --with-x=yes --with-x-toolkit=gtk3 --with-toolkit-scroll-bars
 'CFLAGS=-g -O2 -fstack-protector-strong -Wformat
 -Werror=format-security -Wall' CPPFLAGS=-D_FORTIFY_SOURCE=2
 LDFLAGS=-Wl,-z,relro'

Important settings:
  value of $LANG: en_GB.utf8
  locale-coding-system: utf-8-unix

Major mode: nXML

Minor modes in effect:
  noXML-fold-mode: t
  savehist-mode: t
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-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
  visual-line-mode: t
  transient-mark-mode: t

Recent messages:
(top nil (comment nil " Local variables: ") (comment nil " time-stamp-pattern: \"0/Last modified:[ 	]+\\\\\\\\?[\\\"<]+\" ") (comment nil " abadvar: t ") (comment nil " End: "))
Quit [2 times]
Mark set
nil [2 times]
Undo!
(html nil (head nil (title (...) (comment nil " Last modified: <2015-08-19 10:52:17 auser> ") "
  The title
") (comment nil " Local variables: ") (comment nil " time-stamp-pattern: \"0/Last modified:[ 	]+\\\\\\\\?[\\\"<]+\" ") (comment nil " abadvar: t ") (comment nil " End: ")))
Making completion list...
Quit

Load-path shadows:
~/research/emacs-stuff/tei-edit/ind-ext hides ~/research/emacs-stuff/ind-ext
~/research/emacs-stuff/tei-edit/tei-edit hides ~/research/emacs-stuff/tei-edit
~/research/emacs-stuff/noxml-fold hides ~/webstuff/emacs-things/noXML-fold/noxml-fold
/home/auser/quicklisp/dists/quicklisp/software/slime-2.14/slime hides /usr/share/emacs24/site-lisp/slime/slime
/home/auser/quicklisp/dists/quicklisp/software/slime-2.14/slime-autoloads hides /usr/share/emacs24/site-lisp/slime/slime-autoloads
/home/auser/quicklisp/dists/quicklisp/software/slime-2.14/slime-tests hides /usr/share/emacs24/site-lisp/slime/slime-tests
/home/auser/quicklisp/dists/quicklisp/software/slime-2.14/contrib/slime-mrepl hides /usr/share/emacs24/site-lisp/slime/contrib/slime-mrepl
/home/auser/quicklisp/dists/quicklisp/software/slime-2.14/contrib/slime-motd hides /usr/share/emacs24/site-lisp/slime/contrib/slime-motd
/home/auser/quicklisp/dists/quicklisp/software/slime-2.14/contrib/slime-references hides /usr/share/emacs24/site-lisp/slime/contrib/slime-references
/home/auser/quicklisp/dists/quicklisp/software/slime-2.14/contrib/slime-trace-dialog hides /usr/share/emacs24/site-lisp/slime/contrib/slime-trace-dialog
/home/auser/quicklisp/dists/quicklisp/software/slime-2.14/contrib/slime-presentations hides /usr/share/emacs24/site-lisp/slime/contrib/slime-presentations
/home/auser/quicklisp/dists/quicklisp/software/slime-2.14/contrib/slime-xref-browser hides /usr/share/emacs24/site-lisp/slime/contrib/slime-xref-browser
/home/auser/quicklisp/dists/quicklisp/software/slime-2.14/contrib/slime-autodoc hides /usr/share/emacs24/site-lisp/slime/contrib/slime-autodoc
/home/auser/quicklisp/dists/quicklisp/software/slime-2.14/contrib/slime-snapshot hides /usr/share/emacs24/site-lisp/slime/contrib/slime-snapshot
/home/auser/quicklisp/dists/quicklisp/software/slime-2.14/contrib/slime-scratch hides /usr/share/emacs24/site-lisp/slime/contrib/slime-scratch
/home/auser/quicklisp/dists/quicklisp/software/slime-2.14/contrib/slime-editing-commands hides /usr/share/emacs24/site-lisp/slime/contrib/slime-editing-commands
/home/auser/quicklisp/dists/quicklisp/software/slime-2.14/contrib/slime-media hides /usr/share/emacs24/site-lisp/slime/contrib/slime-media
/home/auser/quicklisp/dists/quicklisp/software/slime-2.14/contrib/bridge hides /usr/share/emacs24/site-lisp/slime/contrib/bridge
/home/auser/quicklisp/dists/quicklisp/software/slime-2.14/contrib/slime-tramp hides /usr/share/emacs24/site-lisp/slime/contrib/slime-tramp
/home/auser/quicklisp/dists/quicklisp/software/slime-2.14/contrib/slime-hyperdoc hides /usr/share/emacs24/site-lisp/slime/contrib/slime-hyperdoc
/home/auser/quicklisp/dists/quicklisp/software/slime-2.14/contrib/slime-repl hides /usr/share/emacs24/site-lisp/slime/contrib/slime-repl
/home/auser/quicklisp/dists/quicklisp/software/slime-2.14/contrib/slime-clipboard hides /usr/share/emacs24/site-lisp/slime/contrib/slime-clipboard
/home/auser/quicklisp/dists/quicklisp/software/slime-2.14/contrib/slime-parse hides /usr/share/emacs24/site-lisp/slime/contrib/slime-parse
/home/auser/quicklisp/dists/quicklisp/software/slime-2.14/contrib/slime-cl-indent hides /usr/share/emacs24/site-lisp/slime/contrib/slime-cl-indent
/home/auser/quicklisp/dists/quicklisp/software/slime-2.14/contrib/slime-sbcl-exts hides /usr/share/emacs24/site-lisp/slime/contrib/slime-sbcl-exts
/home/auser/quicklisp/dists/quicklisp/software/slime-2.14/contrib/slime-sprof hides /usr/share/emacs24/site-lisp/slime/contrib/slime-sprof
/home/auser/quicklisp/dists/quicklisp/software/slime-2.14/contrib/slime-banner hides /usr/share/emacs24/site-lisp/slime/contrib/slime-banner
/home/auser/quicklisp/dists/quicklisp/software/slime-2.14/contrib/slime-compiler-notes-tree hides /usr/share/emacs24/site-lisp/slime/contrib/slime-compiler-notes-tree
/home/auser/quicklisp/dists/quicklisp/software/slime-2.14/contrib/slime-asdf hides /usr/share/emacs24/site-lisp/slime/contrib/slime-asdf
/home/auser/quicklisp/dists/quicklisp/software/slime-2.14/contrib/slime-fuzzy hides /usr/share/emacs24/site-lisp/slime/contrib/slime-fuzzy
/home/auser/quicklisp/dists/quicklisp/software/slime-2.14/contrib/slime-fancy-trace hides /usr/share/emacs24/site-lisp/slime/contrib/slime-fancy-trace
/home/auser/quicklisp/dists/quicklisp/software/slime-2.14/contrib/slime-fancy-inspector hides /usr/share/emacs24/site-lisp/slime/contrib/slime-fancy-inspector
/home/auser/quicklisp/dists/quicklisp/software/slime-2.14/contrib/slime-highlight-edits hides /usr/share/emacs24/site-lisp/slime/contrib/slime-highlight-edits
/home/auser/quicklisp/dists/quicklisp/software/slime-2.14/contrib/slime-indentation hides /usr/share/emacs24/site-lisp/slime/contrib/slime-indentation
/home/auser/quicklisp/dists/quicklisp/software/slime-2.14/contrib/slime-mdot-fu hides /usr/share/emacs24/site-lisp/slime/contrib/slime-mdot-fu
/home/auser/quicklisp/dists/quicklisp/software/slime-2.14/contrib/slime-scheme hides /usr/share/emacs24/site-lisp/slime/contrib/slime-scheme
/home/auser/quicklisp/dists/quicklisp/software/slime-2.14/contrib/slime-fontifying-fu hides /usr/share/emacs24/site-lisp/slime/contrib/slime-fontifying-fu
/home/auser/quicklisp/dists/quicklisp/software/slime-2.14/contrib/slime-enclosing-context hides /usr/share/emacs24/site-lisp/slime/contrib/slime-enclosing-context
/home/auser/quicklisp/dists/quicklisp/software/slime-2.14/contrib/inferior-slime hides /usr/share/emacs24/site-lisp/slime/contrib/inferior-slime
/home/auser/quicklisp/dists/quicklisp/software/slime-2.14/contrib/slime-typeout-frame hides /usr/share/emacs24/site-lisp/slime/contrib/slime-typeout-frame
/home/auser/quicklisp/dists/quicklisp/software/slime-2.14/contrib/slime-package-fu hides /usr/share/emacs24/site-lisp/slime/contrib/slime-package-fu
/home/auser/quicklisp/dists/quicklisp/software/slime-2.14/contrib/slime-presentation-streams hides /usr/share/emacs24/site-lisp/slime/contrib/slime-presentation-streams
/home/auser/quicklisp/dists/quicklisp/software/slime-2.14/contrib/slime-fancy hides /usr/share/emacs24/site-lisp/slime/contrib/slime-fancy
/home/auser/quicklisp/dists/quicklisp/software/slime-2.14/contrib/slime-c-p-c hides /usr/share/emacs24/site-lisp/slime/contrib/slime-c-p-c
/usr/share/emacs/24.5/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup
/usr/share/emacs/site-lisp/rst hides /usr/share/emacs/24.5/lisp/textmodes/rst
/usr/share/emacs24/site-lisp/org-mode/ob-gnuplot hides /usr/share/emacs/24.5/lisp/org/ob-gnuplot
/usr/share/emacs24/site-lisp/org-mode/ob-ref hides /usr/share/emacs/24.5/lisp/org/ob-ref
/usr/share/emacs24/site-lisp/org-mode/ob-calc hides /usr/share/emacs/24.5/lisp/org/ob-calc
/usr/share/emacs24/site-lisp/org-mode/ox-icalendar hides /usr/share/emacs/24.5/lisp/org/ox-icalendar
/usr/share/emacs24/site-lisp/org-mode/org-rmail hides /usr/share/emacs/24.5/lisp/org/org-rmail
/usr/share/emacs24/site-lisp/org-mode/org-compat hides /usr/share/emacs/24.5/lisp/org/org-compat
/usr/share/emacs24/site-lisp/org-mode/org-bibtex hides /usr/share/emacs/24.5/lisp/org/org-bibtex
/usr/share/emacs24/site-lisp/org-mode/ob-tangle hides /usr/share/emacs/24.5/lisp/org/ob-tangle
/usr/share/emacs24/site-lisp/org-mode/ob-core hides /usr/share/emacs/24.5/lisp/org/ob-core
/usr/share/emacs24/site-lisp/org-mode/org-attach hides /usr/share/emacs/24.5/lisp/org/org-attach
/usr/share/emacs24/site-lisp/org-mode/org-list hides /usr/share/emacs/24.5/lisp/org/org-list
/usr/share/emacs24/site-lisp/org-mode/ox-ascii hides /usr/share/emacs/24.5/lisp/org/ox-ascii
/usr/share/emacs24/site-lisp/org-mode/ob-shen hides /usr/share/emacs/24.5/lisp/org/ob-shen
/usr/share/emacs24/site-lisp/org-mode/ob-matlab hides /usr/share/emacs/24.5/lisp/org/ob-matlab
/usr/share/emacs24/site-lisp/org-mode/ob-octave hides /usr/share/emacs/24.5/lisp/org/ob-octave
/usr/share/emacs24/site-lisp/org-mode/ob-sql hides /usr/share/emacs/24.5/lisp/org/ob-sql
/usr/share/emacs24/site-lisp/org-mode/org-version hides /usr/share/emacs/24.5/lisp/org/org-version
/usr/share/emacs24/site-lisp/org-mode/ob-lilypond hides /usr/share/emacs/24.5/lisp/org/ob-lilypond
/usr/share/emacs24/site-lisp/org-mode/org-plot hides /usr/share/emacs/24.5/lisp/org/org-plot
/usr/share/emacs24/site-lisp/org-mode/org-element hides /usr/share/emacs/24.5/lisp/org/org-element
/usr/share/emacs24/site-lisp/org-mode/ox-latex hides /usr/share/emacs/24.5/lisp/org/ox-latex
/usr/share/emacs24/site-lisp/org-mode/org-clock hides /usr/share/emacs/24.5/lisp/org/org-clock
/usr/share/emacs24/site-lisp/org-mode/ob-maxima hides /usr/share/emacs/24.5/lisp/org/ob-maxima
/usr/share/emacs24/site-lisp/org-mode/org-crypt hides /usr/share/emacs/24.5/lisp/org/org-crypt
/usr/share/emacs24/site-lisp/org-mode/ob-haskell hides /usr/share/emacs/24.5/lisp/org/ob-haskell
/usr/share/emacs24/site-lisp/org-mode/ob-eval hides /usr/share/emacs/24.5/lisp/org/ob-eval
/usr/share/emacs24/site-lisp/org-mode/ob-js hides /usr/share/emacs/24.5/lisp/org/ob-js
/usr/share/emacs24/site-lisp/org-mode/ob-org hides /usr/share/emacs/24.5/lisp/org/ob-org
/usr/share/emacs24/site-lisp/org-mode/org-indent hides /usr/share/emacs/24.5/lisp/org/org-indent
/usr/share/emacs24/site-lisp/org-mode/org hides /usr/share/emacs/24.5/lisp/org/org
/usr/share/emacs24/site-lisp/org-mode/ox-texinfo hides /usr/share/emacs/24.5/lisp/org/ox-texinfo
/usr/share/emacs24/site-lisp/org-mode/ob-picolisp hides /usr/share/emacs/24.5/lisp/org/ob-picolisp
/usr/share/emacs24/site-lisp/org-mode/ob-sqlite hides /usr/share/emacs/24.5/lisp/org/ob-sqlite
/usr/share/emacs24/site-lisp/org-mode/org-colview hides /usr/share/emacs/24.5/lisp/org/org-colview
/usr/share/emacs24/site-lisp/org-mode/ox-md hides /usr/share/emacs/24.5/lisp/org/ox-md
/usr/share/emacs24/site-lisp/org-mode/org-eshell hides /usr/share/emacs/24.5/lisp/org/org-eshell
/usr/share/emacs24/site-lisp/org-mode/org-bbdb hides /usr/share/emacs/24.5/lisp/org/org-bbdb
/usr/share/emacs24/site-lisp/org-mode/org-mouse hides /usr/share/emacs/24.5/lisp/org/org-mouse
/usr/share/emacs24/site-lisp/org-mode/ob-fortran hides /usr/share/emacs/24.5/lisp/org/ob-fortran
/usr/share/emacs24/site-lisp/org-mode/org-faces hides /usr/share/emacs/24.5/lisp/org/org-faces
/usr/share/emacs24/site-lisp/org-mode/org-entities hides /usr/share/emacs/24.5/lisp/org/org-entities
/usr/share/emacs24/site-lisp/org-mode/ob-io hides /usr/share/emacs/24.5/lisp/org/ob-io
/usr/share/emacs24/site-lisp/org-mode/org-table hides /usr/share/emacs/24.5/lisp/org/org-table
/usr/share/emacs24/site-lisp/org-mode/ob-makefile hides /usr/share/emacs/24.5/lisp/org/ob-makefile
/usr/share/emacs24/site-lisp/org-mode/ob-screen hides /usr/share/emacs/24.5/lisp/org/ob-screen
/usr/share/emacs24/site-lisp/org-mode/org-timer hides /usr/share/emacs/24.5/lisp/org/org-timer
/usr/share/emacs24/site-lisp/org-mode/ox-html hides /usr/share/emacs/24.5/lisp/org/ox-html
/usr/share/emacs24/site-lisp/org-mode/ob-asymptote hides /usr/share/emacs/24.5/lisp/org/ob-asymptote
/usr/share/emacs24/site-lisp/org-mode/org-datetree hides /usr/share/emacs/24.5/lisp/org/org-datetree
/usr/share/emacs24/site-lisp/org-mode/ob-C hides /usr/share/emacs/24.5/lisp/org/ob-C
/usr/share/emacs24/site-lisp/org-mode/ob-awk hides /usr/share/emacs/24.5/lisp/org/ob-awk
/usr/share/emacs24/site-lisp/org-mode/ob-java hides /usr/share/emacs/24.5/lisp/org/ob-java
/usr/share/emacs24/site-lisp/org-mode/ox hides /usr/share/emacs/24.5/lisp/org/ox
/usr/share/emacs24/site-lisp/org-mode/ob-clojure hides /usr/share/emacs/24.5/lisp/org/ob-clojure
/usr/share/emacs24/site-lisp/org-mode/ob-latex hides /usr/share/emacs/24.5/lisp/org/ob-latex
/usr/share/emacs24/site-lisp/org-mode/org-macs hides /usr/share/emacs/24.5/lisp/org/org-macs
/usr/share/emacs24/site-lisp/org-mode/org-pcomplete hides /usr/share/emacs/24.5/lisp/org/org-pcomplete
/usr/share/emacs24/site-lisp/org-mode/ob-perl hides /usr/share/emacs/24.5/lisp/org/ob-perl
/usr/share/emacs24/site-lisp/org-mode/ob-table hides /usr/share/emacs/24.5/lisp/org/ob-table
/usr/share/emacs24/site-lisp/org-mode/org-capture hides /usr/share/emacs/24.5/lisp/org/org-capture
/usr/share/emacs24/site-lisp/org-mode/org-mhe hides /usr/share/emacs/24.5/lisp/org/org-mhe
/usr/share/emacs24/site-lisp/org-mode/org-agenda hides /usr/share/emacs/24.5/lisp/org/org-agenda
/usr/share/emacs24/site-lisp/org-mode/ob-css hides /usr/share/emacs/24.5/lisp/org/ob-css
/usr/share/emacs24/site-lisp/org-mode/org-macro hides /usr/share/emacs/24.5/lisp/org/org-macro
/usr/share/emacs24/site-lisp/org-mode/ob-plantuml hides /usr/share/emacs/24.5/lisp/org/ob-plantuml
/usr/share/emacs24/site-lisp/org-mode/org-src hides /usr/share/emacs/24.5/lisp/org/org-src
/usr/share/emacs24/site-lisp/org-mode/ob-lisp hides /usr/share/emacs/24.5/lisp/org/ob-lisp
/usr/share/emacs24/site-lisp/org-mode/ox-org hides /usr/share/emacs/24.5/lisp/org/ox-org
/usr/share/emacs24/site-lisp/org-mode/org-habit hides /usr/share/emacs/24.5/lisp/org/org-habit
/usr/share/emacs24/site-lisp/org-mode/ob-ledger hides /usr/share/emacs/24.5/lisp/org/ob-ledger
/usr/share/emacs24/site-lisp/org-mode/ob-lob hides /usr/share/emacs/24.5/lisp/org/ob-lob
/usr/share/emacs24/site-lisp/org-mode/org-archive hides /usr/share/emacs/24.5/lisp/org/org-archive
/usr/share/emacs24/site-lisp/org-mode/ox-man hides /usr/share/emacs/24.5/lisp/org/ox-man
/usr/share/emacs24/site-lisp/org-mode/org-ctags hides /usr/share/emacs/24.5/lisp/org/org-ctags
/usr/share/emacs24/site-lisp/org-mode/ob-comint hides /usr/share/emacs/24.5/lisp/org/ob-comint
/usr/share/emacs24/site-lisp/org-mode/ob-exp hides /usr/share/emacs/24.5/lisp/org/ob-exp
/usr/share/emacs24/site-lisp/org-mode/org-feed hides /usr/share/emacs/24.5/lisp/org/org-feed
/usr/share/emacs24/site-lisp/org-mode/org-id hides /usr/share/emacs/24.5/lisp/org/org-id
/usr/share/emacs24/site-lisp/org-mode/org-mobile hides /usr/share/emacs/24.5/lisp/org/org-mobile
/usr/share/emacs24/site-lisp/org-mode/org-inlinetask hides /usr/share/emacs/24.5/lisp/org/org-inlinetask
/usr/share/emacs24/site-lisp/org-mode/ob hides /usr/share/emacs/24.5/lisp/org/ob
/usr/share/emacs24/site-lisp/org-mode/ox-beamer hides /usr/share/emacs/24.5/lisp/org/ox-beamer
/usr/share/emacs24/site-lisp/org-mode/org-protocol hides /usr/share/emacs/24.5/lisp/org/org-protocol
/usr/share/emacs24/site-lisp/org-mode/ox-odt hides /usr/share/emacs/24.5/lisp/org/ox-odt
/usr/share/emacs24/site-lisp/org-mode/org-w3m hides /usr/share/emacs/24.5/lisp/org/org-w3m
/usr/share/emacs24/site-lisp/org-mode/ob-scheme hides /usr/share/emacs/24.5/lisp/org/ob-scheme
/usr/share/emacs24/site-lisp/org-mode/ob-mscgen hides /usr/share/emacs/24.5/lisp/org/ob-mscgen
/usr/share/emacs24/site-lisp/org-mode/ob-sh hides /usr/share/emacs/24.5/lisp/org/ob-sh
/usr/share/emacs24/site-lisp/org-mode/org-docview hides /usr/share/emacs/24.5/lisp/org/org-docview
/usr/share/emacs24/site-lisp/org-mode/ob-emacs-lisp hides /usr/share/emacs/24.5/lisp/org/ob-emacs-lisp
/usr/share/emacs24/site-lisp/org-mode/org-gnus hides /usr/share/emacs/24.5/lisp/org/org-gnus
/usr/share/emacs24/site-lisp/org-mode/org-info hides /usr/share/emacs/24.5/lisp/org/org-info
/usr/share/emacs24/site-lisp/org-mode/org-loaddefs hides /usr/share/emacs/24.5/lisp/org/org-loaddefs
/usr/share/emacs24/site-lisp/org-mode/ob-sass hides /usr/share/emacs/24.5/lisp/org/ob-sass
/usr/share/emacs24/site-lisp/org-mode/ob-python hides /usr/share/emacs/24.5/lisp/org/ob-python
/usr/share/emacs24/site-lisp/org-mode/ob-ocaml hides /usr/share/emacs/24.5/lisp/org/ob-ocaml
/usr/share/emacs24/site-lisp/org-mode/org-footnote hides /usr/share/emacs/24.5/lisp/org/org-footnote
/usr/share/emacs24/site-lisp/org-mode/org-irc hides /usr/share/emacs/24.5/lisp/org/org-irc
/usr/share/emacs24/site-lisp/org-mode/ob-scala hides /usr/share/emacs/24.5/lisp/org/ob-scala
/usr/share/emacs24/site-lisp/org-mode/ob-dot hides /usr/share/emacs/24.5/lisp/org/ob-dot
/usr/share/emacs24/site-lisp/org-mode/ob-keys hides /usr/share/emacs/24.5/lisp/org/ob-keys
/usr/share/emacs24/site-lisp/org-mode/org-install hides /usr/share/emacs/24.5/lisp/org/org-install
/usr/share/emacs24/site-lisp/org-mode/ob-ruby hides /usr/share/emacs/24.5/lisp/org/ob-ruby
/usr/share/emacs24/site-lisp/org-mode/ob-R hides /usr/share/emacs/24.5/lisp/org/ob-R
/usr/share/emacs24/site-lisp/org-mode/ox-publish hides /usr/share/emacs/24.5/lisp/org/ox-publish
/usr/share/emacs24/site-lisp/org-mode/ob-ditaa hides /usr/share/emacs/24.5/lisp/org/ob-ditaa
/usr/share/emacs/24.5/site-lisp/slime/lib/ert hides /usr/share/emacs/24.5/lisp/emacs-lisp/ert
/usr/share/emacs/24.5/site-lisp/slime/lib/ert-x hides /usr/share/emacs/24.5/lisp/emacs-lisp/ert-x
/usr/share/emacs24/site-lisp/auctex/tex-font hides /usr/share/emacs/site-lisp/auctex/tex-font
/usr/share/emacs24/site-lisp/auctex/multi-prompt hides /usr/share/emacs/site-lisp/auctex/multi-prompt
/usr/share/emacs24/site-lisp/auctex/tex-style hides /usr/share/emacs/site-lisp/auctex/tex-style
/usr/share/emacs24/site-lisp/auctex/plain-tex hides /usr/share/emacs/site-lisp/auctex/plain-tex
/usr/share/emacs24/site-lisp/auctex/prv-emacs hides /usr/share/emacs/site-lisp/auctex/prv-emacs
/usr/share/emacs24/site-lisp/auctex/bib-cite hides /usr/share/emacs/site-lisp/auctex/bib-cite
/usr/share/emacs24/site-lisp/auctex/tex-bar hides /usr/share/emacs/site-lisp/auctex/tex-bar
/usr/share/emacs24/site-lisp/auctex/latex hides /usr/share/emacs/site-lisp/auctex/latex
/usr/share/emacs24/site-lisp/auctex/tex-fold hides /usr/share/emacs/site-lisp/auctex/tex-fold
/usr/share/emacs24/site-lisp/auctex/tex hides /usr/share/emacs/site-lisp/auctex/tex
/usr/share/emacs24/site-lisp/auctex/context-nl hides /usr/share/emacs/site-lisp/auctex/context-nl
/usr/share/emacs24/site-lisp/auctex/texmathp hides /usr/share/emacs/site-lisp/auctex/texmathp
/usr/share/emacs24/site-lisp/auctex/font-latex hides /usr/share/emacs/site-lisp/auctex/font-latex
/usr/share/emacs24/site-lisp/auctex/tex-mik hides /usr/share/emacs/site-lisp/auctex/tex-mik
/usr/share/emacs24/site-lisp/auctex/context-en hides /usr/share/emacs/site-lisp/auctex/context-en
/usr/share/emacs24/site-lisp/auctex/tex-info hides /usr/share/emacs/site-lisp/auctex/tex-info
/usr/share/emacs24/site-lisp/auctex/tex-buf hides /usr/share/emacs/site-lisp/auctex/tex-buf
/usr/share/emacs24/site-lisp/auctex/tex-jp hides /usr/share/emacs/site-lisp/auctex/tex-jp
/usr/share/emacs24/site-lisp/auctex/preview hides /usr/share/emacs/site-lisp/auctex/preview
/usr/share/emacs24/site-lisp/auctex/context hides /usr/share/emacs/site-lisp/auctex/context
/usr/share/emacs24/site-lisp/auctex/toolbar-x hides /usr/share/emacs/site-lisp/auctex/toolbar-x

Features:
(shadow sort mail-extr emacsbug message rfc822 mml mml-sec mm-decode
mm-bodies mm-encode mailabbrev gmm-utils mailheader sendmail shr debug
eieio-opt info mule-util edebug misearch multi-isearch reftei-ref
reftei-sel reftei-parse reftei-toc reftei-dcr time-stamp nxml-uchnm
rng-xsd xsd-regexp rng-cmpct paredit package epg-config slime-banner
slime-asdf slime-fancy slime-trace-dialog slime-fontifying-fu
slime-package-fu slime-references slime-compiler-notes-tree
slime-scratch slime-presentations bridge slime-mdot-fu
slime-enclosing-context slime-fuzzy slime-fancy-trace
slime-fancy-inspector slime-c-p-c slime-editing-commands slime-autodoc
eldoc slime-repl elp slime-parse slime derived gud apropos etags
arc-mode archive-mode pp hyperspec thingatpt browse-url reftei
reftei-vars elasticannoyance json request url-http tls url-auth
mail-parse rfc2231 rfc2047 rfc2045 ietf-drums url-gw mail-utils tei-edit
edmacro kmacro rx xml-to-string ind-ext ind-util speedbar sb-image
ezimage dframe url url-proxy url-privacy url-expand url-methods
url-history url-cookie url-domsuf url-util url-parse auth-source eieio
byte-opt bytecomp byte-compile cl-extra cconv eieio-core mm-util
mail-prsvr password-cache url-vars mailcap subr-x xml track-mode org-xml
rng-nxml rng-valid rng-loc rng-uri rng-parse nxml-parse rng-match rng-dt
rng-util rng-pttrn nxml-ns nxml-mode nxml-outln nxml-rap nxml-util
nxml-glyph nxml-enc xmltok noxml-fold sanskrit-diacritics quail
help-mode tei-html-docs-p5 ox-bibtex advice help-fns cl-macs cl gv
ox-latex ox-icalendar ox-html ox-ascii ox-publish ox vc-git org-element
org-rmail org-mhe org-irc org-info org-gnus gnus-util org-docview
doc-view jka-compr image-mode dired cl-loaddefs cl-lib org-bibtex bibtex
org-bbdb org-w3m org-agenda org org-macro org-footnote org-pcomplete
pcomplete org-list org-faces org-entities noutline outline easy-mmode
org-version ob-emacs-lisp ob-ditaa ob-python ob ob-tangle ob-ref ob-lob
ob-table ob-exp org-src ob-keys ob-comint ob-core ob-eval org-compat
org-macs org-loaddefs format-spec find-func appt diary-lib
diary-loaddefs cal-menu easymenu calendar cal-loaddefs grep compile
comint ansi-color ring cus-start cus-load ido server savehist
slime-autoloads org-install 50magit geiser-install geiser preview-latex
tex-site auto-loads time-date tooltip electric uniquify ediff-hook
vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image
regexp-opt fringe tabulated-list newcomment lisp-mode prog-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 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 make-network-process dbusbind
gfilenotify dynamic-setting system-font-setting font-render-setting
move-toolbar gtk x-toolkit x multi-tty emacs)

Memory information:
((conses 16 562345 40230)
 (symbols 48 43067 0)
 (miscs 40 661 3288)
 (strings 32 139842 48824)
 (string-bytes 1 4154910)
 (vectors 16 48469)
 (vector-slots 8 1918094 81982)
 (floats 8 2286 937)
 (intervals 56 9828 126)
 (buffers 960 24)
 (heap 1024 66304 15797))

-- 
patrick mc allister

long term email: pma@rdorte.org
homepage: http://rdorte.org/pma/

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

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

* bug#21293: 24.5; libxml-xml-parse-region and comments at end of file
  2015-08-19  9:29 bug#21293: 24.5; libxml-xml-parse-region and comments at end of file patrick mc allister
@ 2016-03-01  6:09 ` Lars Ingebrigtsen
  2016-03-01 17:04   ` Ulf Jasper
  0 siblings, 1 reply; 3+ messages in thread
From: Lars Ingebrigtsen @ 2016-03-01  6:09 UTC (permalink / raw)
  To: patrick mc allister; +Cc: 21293

patrick mc allister <pma@rdorte.org> writes:

> It seems something goes wrong with `libxml-parse-xml-region' when
> there are comments at the end of the file:
>
> emacs -Q
>
> then run this function to see the problem:
>
> (defun setup-problem ()
>   (let ((testBuffer (get-buffer-create "*a libxml parse problem")))
>     (with-current-buffer testBuffer
>       (erase-buffer)
>       (insert "<something />
> <!-- a comment -->
> <!-- another comment -->")
>       (goto-char (point-min))
>       (libxml-parse-xml-region (point-min) (point-max)))))
>
> (setup-problem) ;; (top nil (comment nil " a comment ") (comment nil " another comment "))

I'm unable to reproduce this problem with the current Emacs trunk.  I get:

(top nil (something nil) (comment nil " a comment ") (comment nil " another comment "))

> So it seems the "something" element does not make it into the list?
> The problem only appears if there are more than two comments at the
> end. If there's only one, the region gets parsed as expected, and the
> last comment gets lost:
>
> (defun setup-problem-b ()
>   (let ((testBuffer (get-buffer-create "*a libxml parse problem")))
>     (with-current-buffer testBuffer
>       (erase-buffer)
>       (insert "<something />
> <!-- only one comment -->")
>       (goto-char (point-min))
>       (libxml-parse-xml-region (point-min) (point-max)))))
>
> (setup-problem-b) ;; (something nil)

And this seems to work, too.

This looks like it was fixed by Ulf Jasper a while ago, according to the
git log, so I'm closing this bug report.  If you're still seeing this,
please reopen.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

* bug#21293: 24.5; libxml-xml-parse-region and comments at end of file
  2016-03-01  6:09 ` Lars Ingebrigtsen
@ 2016-03-01 17:04   ` Ulf Jasper
  0 siblings, 0 replies; 3+ messages in thread
From: Ulf Jasper @ 2016-03-01 17:04 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: patrick mc allister, 21293

Am 01.03.2016 um 17:09 (+1100) schrieb Lars Ingebrigtsen:

> This looks like it was fixed by Ulf Jasper a while ago, according to the
> git log, so I'm closing this bug report.

I just increased the score for messages with substring "xml" so that I
won't miss the next libxml-related bug report.  Hopefully.

Ulf





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

end of thread, other threads:[~2016-03-01 17:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-19  9:29 bug#21293: 24.5; libxml-xml-parse-region and comments at end of file patrick mc allister
2016-03-01  6:09 ` Lars Ingebrigtsen
2016-03-01 17:04   ` Ulf Jasper

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