all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Vili Aapro <vili.aapro@iki.fi>
Cc: 75224-done@debbugs.gnu.org
Subject: bug#75224: RNG validation unnecessarily marks buffer as changed
Date: Sun, 05 Jan 2025 15:43:06 +0200	[thread overview]
Message-ID: <861pxh8jh1.fsf@gnu.org> (raw)
In-Reply-To: <20241231143127.1fd67698@vilij-LIFEBOOK-E744> (message from Vili Aapro on Tue, 31 Dec 2024 14:31:27 +0200)

> Date: Tue, 31 Dec 2024 14:31:27 +0200
> From: Vili Aapro <vili.aapro@iki.fi>
> 
> I found a bug in RNG Validation mode in the file `nxml/rng-valid.el' that unnecessarily marks buffer as changed.  The bug can be fixed with a simple application of `with-silent-modifications' in the function `rng-do-some-validation-1'.  I've attached a patch that does so.  However, in the long run, in my opinion the application of `with-silent-modifications' should be moved to `rng-clear-cached-state'; that is where it properly belongs.  Perhaps this has been left undone because of efficiency reasons; perhaps there is work to be done to make `with-silent-modifications' less expensive.
> 
> To reproduce, visit a big enough RNG-validatable XML file, such as the included `rdfxml.rng'; goto and end-tag, say on line 22; kill it; undo.
> 
> Undo runs `after-change-functions' and thus `rng-after-change-function' and thus `rng-do-some-validation-1', reproducing the bug.

Thanks, I installed this on the master branch, and I'm therefore
closing the bug.





      reply	other threads:[~2025-01-05 13:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-31 12:31 bug#75224: RNG validation unnecessarily marks buffer as changed Vili Aapro
2025-01-05 13:43 ` Eli Zaretskii [this message]

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

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

  git send-email \
    --in-reply-to=861pxh8jh1.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=75224-done@debbugs.gnu.org \
    --cc=vili.aapro@iki.fi \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.