From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.devel Subject: Re: Small patch for rng-valid.el Date: Wed, 13 May 2009 22:55:48 +0200 Message-ID: References: <4A0ADA5D.4050308@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1242248217 4004 80.91.229.12 (13 May 2009 20:56:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 13 May 2009 20:56:57 +0000 (UTC) Cc: Emacs-Devel devel To: Jason Rumney Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 13 22:56:47 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1M4LVO-0002zk-2Y for ged-emacs-devel@m.gmane.org; Wed, 13 May 2009 22:56:46 +0200 Original-Received: from localhost ([127.0.0.1]:43716 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M4LVN-00016v-FA for ged-emacs-devel@m.gmane.org; Wed, 13 May 2009 16:56:45 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M4LUd-0000rc-FU for emacs-devel@gnu.org; Wed, 13 May 2009 16:55:59 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M4LUY-0000n8-RO for emacs-devel@gnu.org; Wed, 13 May 2009 16:55:59 -0400 Original-Received: from [199.232.76.173] (port=48769 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M4LUY-0000n1-ES for emacs-devel@gnu.org; Wed, 13 May 2009 16:55:54 -0400 Original-Received: from mx20.gnu.org ([199.232.41.8]:12702) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1M4LUV-00005i-O7; Wed, 13 May 2009 16:55:51 -0400 Original-Received: from mail-fx0-f169.google.com ([209.85.220.169]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1M4LUU-0003ci-4p; Wed, 13 May 2009 16:55:50 -0400 Original-Received: by fxm17 with SMTP id 17so959134fxm.42 for ; Wed, 13 May 2009 13:55:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=XmEGa3wMp+0hdPuZ7YjR7XQUCGt/nRYxf9oztUvGmrE=; b=SUUTns3kAkorjthMs5o3MrpBqtccEsbq9s1xRRRb17CMtq0tgct25DaWdGBqibQt8D TrB7t5Z8Y90c7V6Y3cA7p9eO4eks29UQrCHzastnmixaKC2zaCGSXNQ3vvKnrxTzQAQW gwTMHwqAVb3CyHCvmRAh1hqexzLSP0EB7QDJ0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=UvnYiac+y6ED0LVA73V6A4/YoIGYYum6p0TVgVbG2/O3XnVZepZSVqWcxHRseo+G0n Lk9nRqAiNze9bARw/o+Lq5ELCUFRW6000waSMXPLpTcQWLpO2fMRX2ZssbrLkJcLEAwj hgvPtStts6D2ngmzrwCfeQEbKOghlDfgrZqQA= Original-Received: by 10.223.107.135 with SMTP id b7mr1321728fap.30.1242248148042; Wed, 13 May 2009 13:55:48 -0700 (PDT) In-Reply-To: <4A0ADA5D.4050308@gnu.org> X-Detected-Operating-System: by mx20.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:110857 Archived-At: On Wed, May 13, 2009 at 4:34 PM, Jason Rumney wrote: > Lennart Borgman wrote: >> >> It seems like I just sent the wrong patch for rng-valid.el on 2 May. >> Here is the patch I thought I sent. It contains only some error >> checking and is very simple (the errors actually happens sometimes). > > Under what circumstances does the error happen? There is no bug report as > far as I can see that mentions this problem, and a quick look at the code > suggests that if rng-validate-up-to-date-end were ever to become nil, there > would be errors happening throughout the code, so fixing this one place > would not be sufficient. There were two different situations that I tried to catch in this patch. One was were the buffer is gone when a timer is about to run. I guess there is no problem with that part of the patch. The other situation is when rng-validate-upto-date-end is nil. And yes, that is more problematic. I have seen it happen in rng-after-change-function, but nowhere else. I believe it only has happened to me when nxml-mode (or rather nxhtml-mode) is used together with mumamo.el (but I am not sure of that). This might of course depend on the way I handle this in mumamo. It takes me some time to investigate this and I would prefer not to do it now since the handling of parsing functions within a multi mode framework like mumamo probably require some more general thoughts. (I believe that it can has something to do with that I do not restart the parser correctly when creating new chunks. The rng-after-change-function seems to be set up to early, but fixing this can perhaps be complicated.) However the check for a non-nil rng-validate-up-to-date-end in rng-after-change-function is very cheap so I see no good reason not to add it there now. I have not looked at the other places where this variable is used though.