unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Dmitry Antipov <dmantipov@yandex.ru>
To: 16449@debbugs.gnu.org
Cc: Levin Du <zslevin@gmail.com>
Subject: bug#16449: 24.3.50; emacs hangs while deleting comment in xml file with flyspell-mode on
Date: Wed, 15 Jan 2014 18:58:47 +0400	[thread overview]
Message-ID: <52D6A227.6010209@yandex.ru> (raw)
In-Reply-To: <871u0agcji.fsf@DuJingwu.i-did-not-set--mail-host-address--so-tickle-me>

On 01/15/2014 07:16 AM, Levin Du wrote:

> 1. Starting from `emacs -Q'
[...skip...]

Reproduced. Consider simpler example with the following XML:

<?xml version="1.0" encoding="UTF-8"?>
<tag0>
   <!--<tag1>Text</tag1>-->
</tag0>

Visit this file in nxml-mode and try to eval:

(goto-char (nxml-token-after))

from the beginning - you should advance token by token after
each evaluation, up to the end of buffer.

Next, remove comment, i.e. change the XML above to:

<?xml version="1.0" encoding="UTF-8"?>
<tag0>
   <tag1>Text</tag1>
</tag0>

Then try to advance from the beginning again. In my test, nxml-token-after
stops at '<' of '<tag1>' and never continues. Due to this, there is an
endless loop in  nxml-forward-single-balanced-item (lisp/nxml/nxml-mode.el):

  1627  (defun nxml-forward-single-balanced-item ()
  1628    (condition-case err
  1629        (goto-char (let ((end (nxml-token-after)))
  1630                     (save-excursion
  1631                       (while (eq xmltok-type 'space)   ; this is an
  1632                         (goto-char end)                ; endless
  1633                         (setq end (nxml-token-after))) ; loop

BTW, I have no ideas why C-g doesn't help.

Dmitry






  parent reply	other threads:[~2014-01-15 14:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-15  3:16 bug#16449: 24.3.50; emacs hangs while deleting comment in xml file with flyspell-mode on Levin Du
2014-01-15 13:48 ` Agustin Martin
2014-01-15 14:58 ` Dmitry Antipov [this message]
2014-01-16  1:45 ` Levin Du
2014-01-17  9:29   ` Levin Du

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52D6A227.6010209@yandex.ru \
    --to=dmantipov@yandex.ru \
    --cc=16449@debbugs.gnu.org \
    --cc=zslevin@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).