From unknown Tue Aug 19 14:23:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16804: 24.3.50; [PATCH] fix with-silent-modifications Resent-From: Leo Liu Original-Sender: "Debbugs-submit" Resent-CC: monnier@iro.umontreal.ca, bug-gnu-emacs@gnu.org Resent-Date: Wed, 19 Feb 2014 00:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 16804 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 16804@debbugs.gnu.org Cc: Stefan Monnier X-Debbugs-Original-To: bug-gnu-emacs@gnu.org X-Debbugs-Original-Xcc: Stefan Monnier Received: via spool by submit@debbugs.gnu.org id=B.139277009720844 (code B ref -1); Wed, 19 Feb 2014 00:35:02 +0000 Received: (at submit) by debbugs.gnu.org; 19 Feb 2014 00:34:57 +0000 Received: from localhost ([127.0.0.1]:59171 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WFv7o-0005Q6-2P for submit@debbugs.gnu.org; Tue, 18 Feb 2014 19:34:56 -0500 Received: from eggs.gnu.org ([208.118.235.92]:44936) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WFv7m-0005Pr-4a for submit@debbugs.gnu.org; Tue, 18 Feb 2014 19:34:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WFv7Y-000220-BP for submit@debbugs.gnu.org; Tue, 18 Feb 2014 19:34:48 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_40,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:36794) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WFv7Y-00021w-83 for submit@debbugs.gnu.org; Tue, 18 Feb 2014 19:34:40 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46579) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WFv7P-0005iT-QD for bug-gnu-emacs@gnu.org; Tue, 18 Feb 2014 19:34:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WFv7H-0001dc-CK for bug-gnu-emacs@gnu.org; Tue, 18 Feb 2014 19:34:31 -0500 Received: from mail-pa0-x231.google.com ([2607:f8b0:400e:c03::231]:60110) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WFv7H-0001cy-3s for bug-gnu-emacs@gnu.org; Tue, 18 Feb 2014 19:34:23 -0500 Received: by mail-pa0-f49.google.com with SMTP id hz1so17285010pad.8 for ; Tue, 18 Feb 2014 16:34:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:mime-version:content-type; bh=1WIdS9cXXLboEk20n4nGRRwx7PTLLHgeEQ8int6Hm1Y=; b=gXSEIFGFU6Ubp/EBf4vIZdT4FMxBusjzKcJ08zQ3jUac68kdMHSMuFqcSpGoPUTtM/ 53G+WjiI+ikjy/vYBTPoCHWpTWwG3lD9GG/oPeVMuikN6klgdSDidkIQqmPjJfFrov82 uRCyzvdz+Yp5R12DoBh+OAwvDSMDZYr5YjjGy9+vLLrgmFpYZF7QisMybBZfDslOrl6p N9iTYZiSgRV8f6npsDgO/lILG5OL/6a+EjxYMTAlzbpAvDIKwDl2duAb7lPxbCGDS/Dz 9CYEuTvvgE10A++pU3o+NUJH0qbUcC70swECQS8me1gutlqlu+vaXpoakJHDptxnkeN0 ZVyw== X-Received: by 10.68.112.164 with SMTP id ir4mr13172566pbb.153.1392770061751; Tue, 18 Feb 2014 16:34:21 -0800 (PST) Received: from Zeuss-MacBook.local ([221.217.231.61]) by mx.google.com with ESMTPSA id tu3sm60022684pbc.40.2014.02.18.16.34.19 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 18 Feb 2014 16:34:20 -0800 (PST) From: Leo Liu Date: Wed, 19 Feb 2014 08:34:15 +0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) I was confused by why an eldoc-documentation-function always gets a nil buffer-file-name in a js file in js2-mode. It turns out js2 wraps its parsing routine in with-silent-modifications, thus all timers triggered while parsing gets the nil value for buffer-file-name. Any comments on the following fix? Thanks. === modified file 'lisp/subr.el' --- lisp/subr.el 2014-02-12 19:40:35 +0000 +++ lisp/subr.el 2014-02-19 00:18:31 +0000 @@ -3172,21 +3172,24 @@ Typically used around modifications of text-properties which do not really affect the buffer's content." (declare (debug t) (indent 0)) - (let ((modified (make-symbol "modified"))) + (let ((modified (make-symbol "modified")) + (mtime (make-symbol "mtime"))) `(let* ((,modified (buffer-modified-p)) (buffer-undo-list t) (inhibit-read-only t) (inhibit-modification-hooks t) deactivate-mark - ;; Avoid setting and removing file locks and checking - ;; buffer's uptodate-ness w.r.t the underlying file. - buffer-file-name - buffer-file-truename) + ;; Avoid checking buffer's uptodate-ness w.r.t the + ;; underlying file. + (,mtime (visited-file-modtime)) + ;; Avoid setting and removing file locks + (create-lockfiles nil)) (unwind-protect - (progn - ,@body) + (progn ,@body) (unless ,modified - (restore-buffer-modified-p nil)))))) + (restore-buffer-modified-p nil)) + (when (consp ,mtime) + (set-visited-file-modtime ,mtime)))))) (defmacro with-output-to-string (&rest body) "Execute BODY, return the text it sent to `standard-output', as a string." From unknown Tue Aug 19 14:23:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16804: 24.3.50; [PATCH] fix with-silent-modifications Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 19 Feb 2014 04:40:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16804 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Leo Liu Cc: 16804@debbugs.gnu.org Received: via spool by 16804-submit@debbugs.gnu.org id=B16804.139278477916008 (code B ref 16804); Wed, 19 Feb 2014 04:40:01 +0000 Received: (at 16804) by debbugs.gnu.org; 19 Feb 2014 04:39:39 +0000 Received: from localhost ([127.0.0.1]:59312 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WFywc-0004A7-Th for submit@debbugs.gnu.org; Tue, 18 Feb 2014 23:39:39 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:24378) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WFywZ-00049q-Ei for 16804@debbugs.gnu.org; Tue, 18 Feb 2014 23:39:36 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EABK/CFFLd/8D/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCwsOJhIUGA0kiB4GsR+QDpEKA4hhnBmBXoMV X-IPAS-Result: Av8EABK/CFFLd/8D/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCwsOJhIUGA0kiB4GsR+QDpEKA4hhnBmBXoMV X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="48098622" Received: from 75-119-255-3.dsl.teksavvy.com (HELO ceviche.home) ([75.119.255.3]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 18 Feb 2014 23:39:29 -0500 Received: by ceviche.home (Postfix, from userid 20848) id 3EA896608C; Tue, 18 Feb 2014 23:39:29 -0500 (EST) From: Stefan Monnier Message-ID: References: Date: Tue, 18 Feb 2014 23:39:29 -0500 In-Reply-To: (Leo Liu's message of "Wed, 19 Feb 2014 08:34:15 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > I was confused by why an eldoc-documentation-function always gets a nil > buffer-file-name in a js file in js2-mode. It turns out js2 wraps its > parsing routine in with-silent-modifications, thus all timers triggered > while parsing gets the nil value for buffer-file-name. I vaguely understand what kind of problem you're talking about, but not precisely enough to guess what kinds of fixes might make sense. > Any comments on the following fix? Thanks. I think I'd rather add a new inhibit-, but it's hard to tell without knowing more of the problem at hand. Stefan From unknown Tue Aug 19 14:23:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16804: 24.3.50; [PATCH] fix with-silent-modifications Resent-From: Leo Liu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 19 Feb 2014 06:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16804 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Stefan Monnier Cc: 16804@debbugs.gnu.org Received: via spool by 16804-submit@debbugs.gnu.org id=B16804.139279026626222 (code B ref 16804); Wed, 19 Feb 2014 06:12:01 +0000 Received: (at 16804) by debbugs.gnu.org; 19 Feb 2014 06:11:06 +0000 Received: from localhost ([127.0.0.1]:59371 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WG0N7-0006or-VW for submit@debbugs.gnu.org; Wed, 19 Feb 2014 01:11:06 -0500 Received: from mail-pb0-f49.google.com ([209.85.160.49]:35325) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WG0N6-0006o9-Gj for 16804@debbugs.gnu.org; Wed, 19 Feb 2014 01:11:05 -0500 Received: by mail-pb0-f49.google.com with SMTP id up15so17761954pbc.36 for <16804@debbugs.gnu.org>; Tue, 18 Feb 2014 22:10:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:face:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=PORQ0ejnvMh/bahhGlYQP3rBOUFvGoec7p1pB6/Nt70=; b=ihtfaFKDKOEbg0nj+OQ4Ynn2nt8M3OiG30SAiNGpfwPQSmYNzcYL9zSm83kAYi8/p+ qW7WXU6RqOsiqyei1rkEojJlvoYmGShhnr2fflqvLHLitP1c3FQfml3UuIuWmEOi3tjo Yqq+uRAu9Bsy8vS+3hnRUO5DGk2URA3kJnHvhTp7eMHrhGbHwM9+CSJKqYxN5t8c/8Wb 8jcsvYexLEOHnoYw6Wm7yFALnZ3BfouCEcAaWEoare/Itis26e5/lOibQuRFv8hj5vFI enPxWRu12EE5RrzxSwLj42y9/IPs1Dh2dXImC8Kwn6JOppe3/HDwJEVzoPm32QKWAcoo /b7w== X-Received: by 10.66.155.133 with SMTP id vw5mr95766pab.124.1392790257898; Tue, 18 Feb 2014 22:10:57 -0800 (PST) Received: from Zeuss-MacBook.local ([221.217.231.61]) by mx.google.com with ESMTPSA id lh13sm158281841pab.4.2014.02.18.22.10.55 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 18 Feb 2014 22:10:57 -0800 (PST) From: Leo Liu References: Face: iVBORw0KGgoAAAANSUhEUgAAACgAAAAoBAMAAAB+0KVeAAAAGFBMVEUzRVhbQj4eZqO6SjnT eWpxnMetm5b6/PmidmqrAAAAAWJLR0QAiAUdSAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1F B9cBBwMLBfKABCMAAAFoSURBVCjPtZI9a8MwEIaFoc7aYDdelQMna0Em3tsSr0XUeE2Q6a22a+v+ fk8fSSBkbDUI6dHpfe9OEvRgiD+ApqKPJgJeB6iUUXWESjUe/ig38AJrhqqvaU2nTIXbNvOQ40fe qdry4kyGoVWsfCQalXpHnJGM01wjWdYbMlXNFdsZDO69m9aqNqxEJqTEgbM5OF7wlEfIoll1Ked4 LbM5X2EdILLokEdmI8z7g5cKED0cuTC930TYhy7ZDekkXVGw/L60TguJePPxcJF48lpsSUWEA/Ju jGFNgJOXc4Hz7TmAdBeu5Ve4AEjOi2/2jfd3cAJZ+IbNrvdjgBZY01b+HTuG3cLws6BJZqVOj/pp T0OqVwx3rFq+QmJwx3loK5JSLEhDIt62+mtC2C+SrAUxEbV6C6v2BRbd6pILBKFpepKZJHgGgrKF sptSUUoczpwg2pQ7ZH1tgs0ou/917mzz6Cs2//C978cv5l07L02orIEAAAAASUVORK5CYII= Date: Wed, 19 Feb 2014 14:10:45 +0800 In-Reply-To: (Stefan Monnier's message of "Tue, 18 Feb 2014 23:39:29 -0500") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (OS X 10.9.1) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 2014-02-19 12:39 +0800, Stefan Monnier wrote: > I vaguely understand what kind of problem you're talking about, but not > precisely enough to guess what kinds of fixes might make sense. I think the problem is let-binding buffer-file-name and buffer-file-truename to nil is a really bad idea. I did a grep on buffer-file-name in lisp/ directory and got about 2000 entries. Code at distance may run while eval'ing the body of with-silent-modifications and affected by the nil value of buffer-file-name etc. >> Any comments on the following fix? Thanks. > > I think I'd rather add a new inhibit-, but it's hard to tell > without knowing more of the problem at hand. So with-silent-modifications needs another way to achieve its goal. From reading its in-code comments, it seems it wants to prevent: 1. create and delete file locks. 2. change file modtime which could have effect beyond the scope of the macro Leo From unknown Tue Aug 19 14:23:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16804: 24.3.50; [PATCH] fix with-silent-modifications Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 19 Feb 2014 14:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16804 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Leo Liu Cc: 16804@debbugs.gnu.org Received: via spool by 16804-submit@debbugs.gnu.org id=B16804.139282012723807 (code B ref 16804); Wed, 19 Feb 2014 14:29:02 +0000 Received: (at 16804) by debbugs.gnu.org; 19 Feb 2014 14:28:47 +0000 Received: from localhost ([127.0.0.1]:59697 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WG88k-0006Bu-RB for submit@debbugs.gnu.org; Wed, 19 Feb 2014 09:28:47 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:33797) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WG88h-0006BO-7v for 16804@debbugs.gnu.org; Wed, 19 Feb 2014 09:28:43 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EABK/CFFLd/8D/2dsb2JhbABEuzWDWRdzgh4BAQQBViMQCw4mEhQYDSSIHgbBLZEKA4hhnBmBXoMV X-IPAS-Result: Av8EABK/CFFLd/8D/2dsb2JhbABEuzWDWRdzgh4BAQQBViMQCw4mEhQYDSSIHgbBLZEKA4hhnBmBXoMV X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="48133870" Received: from 75-119-255-3.dsl.teksavvy.com (HELO pastel.home) ([75.119.255.3]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 19 Feb 2014 09:28:37 -0500 Received: by pastel.home (Postfix, from userid 20848) id 82E856138C; Wed, 19 Feb 2014 09:28:37 -0500 (EST) From: Stefan Monnier Message-ID: References: Date: Wed, 19 Feb 2014 09:28:37 -0500 In-Reply-To: (Leo Liu's message of "Wed, 19 Feb 2014 14:10:45 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) >> I vaguely understand what kind of problem you're talking about, but not >> precisely enough to guess what kinds of fixes might make sense. > I think the problem is let-binding buffer-file-name and > buffer-file-truename to nil is a really bad idea. I did a grep on > buffer-file-name in lisp/ directory and got about 2000 entries. Code at > distance may run while eval'ing the body of with-silent-modifications > and affected by the nil value of buffer-file-name etc. Yes, that's the general understanding I already had, but the particulars are important as well. Could you give details of the problem you bump into? Maybe a backtrace showing the sequence of calls that leads to using buffer-file-name while it's rebound? Stefan From unknown Tue Aug 19 14:23:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16804: 24.3.50; [PATCH] fix with-silent-modifications Resent-From: Leo Liu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 19 Feb 2014 15:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16804 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Stefan Monnier Cc: 16804@debbugs.gnu.org Received: via spool by 16804-submit@debbugs.gnu.org id=B16804.139282412931776 (code B ref 16804); Wed, 19 Feb 2014 15:36:02 +0000 Received: (at 16804) by debbugs.gnu.org; 19 Feb 2014 15:35:29 +0000 Received: from localhost ([127.0.0.1]:60389 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WG9BI-0008GR-VY for submit@debbugs.gnu.org; Wed, 19 Feb 2014 10:35:29 -0500 Received: from mail-pb0-f46.google.com ([209.85.160.46]:53514) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WG9BF-0008GB-Rf for 16804@debbugs.gnu.org; Wed, 19 Feb 2014 10:35:26 -0500 Received: by mail-pb0-f46.google.com with SMTP id um1so537900pbc.19 for <16804@debbugs.gnu.org>; Wed, 19 Feb 2014 07:35:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:face:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=pwqQcdb7coqSzCIcMPV9ME0q6s5iBipFk8g7gNBHbpE=; b=vHopHj0uqd7CgjRJRU4llhKbnIiCjIFzg2S0+68yBejuAkwRSTL89GRvH3EVAIVuZk q3h15Gh8bGBJ9Kjjwv1TL9GpMrCwxxl+2RNWwG2GmRr7Vs4t5Bfyze3/6OEk27scDf0H /atXJK0/3v47V2rHAnhJdnAr1x7m8ALQIryTtYBGoTaXipcF6wzj0bC/T1gzvpDHzDif kWqy4xq3dzB/pjughaLIwp24Wfuhj6coEMqFEtek8nbrTBJfRAAKxp6dxdoAonf6PTXP pz8mTYy1+2EYQDFWo7i5bGeM85Gll4IL7AxRt2ov4ezLeMI+7MiPnEGaKUhNN+hQ1+8u 03vA== X-Received: by 10.68.234.230 with SMTP id uh6mr3005639pbc.161.1392824119831; Wed, 19 Feb 2014 07:35:19 -0800 (PST) Received: from Zeuss-MacBook.local ([123.122.50.191]) by mx.google.com with ESMTPSA id un5sm3808346pab.3.2014.02.19.07.35.14 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Feb 2014 07:35:18 -0800 (PST) From: Leo Liu References: Face: iVBORw0KGgoAAAANSUhEUgAAACgAAAAoBAMAAAB+0KVeAAAAElBMVEUAAAAAAP+LRRP0pGC+ vr7///+7mT1iAAAAAWJLR0QAiAUdSAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9cBBwMO DhglKe4AAAEsSURBVCjPbZNBboQwDEV/Cd4X9QJRThApmn0XYW+Jyf2v0m+HhqDBgiAe9rcTG7QH w/1Vn2Ar8gBb/ocywSN3qK9T3z4eFDB4eApocBpeBs1RSykoJd8gQcm8pGmHXFso3ajnmsqV0TnY DQkOfXUfN5NwaI7AWTVOyEhcu1aHmdWItHddUVUcUgUBCkitu8V6ditHVOVdqzl2EQ1ZVGTbdK0V 7cqn8vWzoU5Q/bF9Y/Y0cRU1xwkys5dJ+Dt6pBDWifcNQml8Gh2JVmPSoQzo7en0grswkxrUGYJ7 0hSxxAGr7ZMwYcHIzprpi7TENEE1xtiYxixRlCfPBsUUrwHD7uGIwATrbnODJcVrPpVn3hxiGloe m/S+z3CtuzUSMo83N4DPH+F0evwR3P4A2k+75838OKQAAAAASUVORK5CYII= Date: Wed, 19 Feb 2014 23:35:07 +0800 In-Reply-To: (Stefan Monnier's message of "Wed, 19 Feb 2014 09:28:37 -0500") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (OS X 10.9.1) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 2014-02-19 22:28 +0800, Stefan Monnier wrote: > Yes, that's the general understanding I already had, but the particulars > are important as well. Could you give details of the problem you > bump into? Maybe a backtrace showing the sequence of calls that leads > to using buffer-file-name while it's rebound? 1. Emacs -q and eval the following code ;;;-------------------------------- (setq eldoc-idle-delay 0.2) (add-hook 'js2-mode-hook #'bug) (defun bug () (setq-local eldoc-documentation-function #'bug-1) (setq js2-idle-timer-delay 0.2) (when buffer-file-name (eldoc-mode 1))) (defun bug-1 () (message "::%S::" buffer-file-name)) ;;;-------------------------------- 2. open a large javascript file (a few hundred lines) and switch its mode to js2-mode. For example backbone.js from git@github.com:jashkenas/backbone.git will do (sorry github is blocked today by my country so I cannot access it myself) 3. edit the file and see ::nil:: echoed This means if function bug-1 needs buffer-file-name, directly or indirectly, it won't work. Leo From unknown Tue Aug 19 14:23:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16804: 24.3.50; [PATCH] fix with-silent-modifications Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 19 Feb 2014 18:31:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16804 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Leo Liu Cc: 16804@debbugs.gnu.org Received: via spool by 16804-submit@debbugs.gnu.org id=B16804.139283463417800 (code B ref 16804); Wed, 19 Feb 2014 18:31:03 +0000 Received: (at 16804) by debbugs.gnu.org; 19 Feb 2014 18:30:34 +0000 Received: from localhost ([127.0.0.1]:60533 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WGBuj-0004d2-SI for submit@debbugs.gnu.org; Wed, 19 Feb 2014 13:30:34 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:58446) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WGBuh-0004cm-QK for 16804@debbugs.gnu.org; Wed, 19 Feb 2014 13:30:32 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EABK/CFFLd/8D/2dsb2JhbABEuzWDWRdzgh8BBVYjEAsOJhIUGA0kiCTBLZEKA4hhnBmBXoMV X-IPAS-Result: Av8EABK/CFFLd/8D/2dsb2JhbABEuzWDWRdzgh8BBVYjEAsOJhIUGA0kiCTBLZEKA4hhnBmBXoMV X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="48158153" Received: from 75-119-255-3.dsl.teksavvy.com (HELO pastel.home) ([75.119.255.3]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 19 Feb 2014 13:30:25 -0500 Received: by pastel.home (Postfix, from userid 20848) id B606860C96; Wed, 19 Feb 2014 13:30:25 -0500 (EST) From: Stefan Monnier Message-ID: References: Date: Wed, 19 Feb 2014 13:30:25 -0500 In-Reply-To: (Leo Liu's message of "Wed, 19 Feb 2014 23:35:07 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > (defun bug () > (setq-local eldoc-documentation-function #'bug-1) > (setq js2-idle-timer-delay 0.2) > (when buffer-file-name > (eldoc-mode 1))) > (defun bug-1 () > (message "::%S::" buffer-file-name)) Sounds like there's a bug in js2-mode which causes it to run eldoc-documentation-function from within a with-silent-modifications (maybe because of a sit-for within a with-silent-modifications?). This would be a bug regardless of whether we change with-silent-modifications. Again, a backtrace would be much more useful. Stefan From unknown Tue Aug 19 14:23:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16804: 24.3.50; [PATCH] fix with-silent-modifications Resent-From: Leo Liu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 20 Feb 2014 00:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16804 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Stefan Monnier Cc: 16804@debbugs.gnu.org Received: via spool by 16804-submit@debbugs.gnu.org id=B16804.139285645424347 (code B ref 16804); Thu, 20 Feb 2014 00:35:02 +0000 Received: (at 16804) by debbugs.gnu.org; 20 Feb 2014 00:34:14 +0000 Received: from localhost ([127.0.0.1]:60865 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WGHaf-0006Kb-JJ for submit@debbugs.gnu.org; Wed, 19 Feb 2014 19:34:13 -0500 Received: from mail-pd0-f182.google.com ([209.85.192.182]:48154) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WGHab-0006KL-Uh for 16804@debbugs.gnu.org; Wed, 19 Feb 2014 19:34:10 -0500 Received: by mail-pd0-f182.google.com with SMTP id v10so1074229pde.13 for <16804@debbugs.gnu.org>; Wed, 19 Feb 2014 16:34:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:face:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=2U823eHjF182t1w/F+XuuT4c0OzALsJ4BAhQQ9g61wM=; b=qrt+zV8Xju9HjNxUnF302Ys+69jgKixBH8wHN4VE/o4tO41IktrXx6ajCH/ZdQ7VCb A1vA20pKyQ0vL4IQLSZ0RD9CGLQmFmAePDk1nUFg4ppx16WBvJ3NTsKc/rt3v053wgQq /X/dn9Sv2gufbNHNxAkL9Sfl2uUtR43eCT6GGp6yN2PU8N8AH+8wlBxVhtU3voRJZ+rW 33+GVscVFB0ZAdS6glAmRNNBg5rV4fmm4UbwJnXVl/XUNu4Xb+YCGyKBRkatknmcTN+n G2HBWydkqvxnw2cy1PlhMCM6vz+ql7hy4PlWUO67Jd253Vr0v3J/qji3LcOT0/vE7T+l PwOw== X-Received: by 10.68.229.106 with SMTP id sp10mr43215488pbc.23.1392856443824; Wed, 19 Feb 2014 16:34:03 -0800 (PST) Received: from Zeuss-MacBook.local ([123.122.50.191]) by mx.google.com with ESMTPSA id nm5sm4636630pbc.29.2014.02.19.16.34.00 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Feb 2014 16:34:02 -0800 (PST) From: Leo Liu References: Face: iVBORw0KGgoAAAANSUhEUgAAACgAAAAoBAMAAAB+0KVeAAAAGFBMVEUzRVhbQj4eZqO6SjnT eWpxnMetm5b6/PmidmqrAAAAAWJLR0QAiAUdSAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1F B9cBBwMLBfKABCMAAAFoSURBVCjPtZI9a8MwEIaFoc7aYDdelQMna0Em3tsSr0XUeE2Q6a22a+v+ fk8fSSBkbDUI6dHpfe9OEvRgiD+ApqKPJgJeB6iUUXWESjUe/ig38AJrhqqvaU2nTIXbNvOQ40fe qdry4kyGoVWsfCQalXpHnJGM01wjWdYbMlXNFdsZDO69m9aqNqxEJqTEgbM5OF7wlEfIoll1Ked4 LbM5X2EdILLokEdmI8z7g5cKED0cuTC930TYhy7ZDekkXVGw/L60TguJePPxcJF48lpsSUWEA/Ju jGFNgJOXc4Hz7TmAdBeu5Ve4AEjOi2/2jfd3cAJZ+IbNrvdjgBZY01b+HTuG3cLws6BJZqVOj/pp T0OqVwx3rFq+QmJwx3loK5JSLEhDIt62+mtC2C+SrAUxEbV6C6v2BRbd6pILBKFpepKZJHgGgrKF sptSUUoczpwg2pQ7ZH1tgs0ou/917mzz6Cs2//C978cv5l07L02orIEAAAAASUVORK5CYII= Date: Thu, 20 Feb 2014 08:33:54 +0800 In-Reply-To: (Stefan Monnier's message of "Wed, 19 Feb 2014 13:30:25 -0500") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (OS X 10.9.1) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) On 2014-02-20 02:30 +0800, Stefan Monnier wrote: > Sounds like there's a bug in js2-mode which causes it to run > eldoc-documentation-function from within a with-silent-modifications > (maybe because of a sit-for within a with-silent-modifications?). > This would be a bug regardless of whether we change > with-silent-modifications. Steve Yegge tried very hard to keep js2-mode performant. It seems his strategy is to pause every few statements. (see js2-parse-statement). If js2 find a way to disable all timers while parsing, it might for example, cause dropping connections in rcirc. We already have Gnus doing that. > Again, a backtrace would be much more useful. There is no backtrace. In my case the type inference engine for javascript is implemented in js and the only efficient way to communicate with it is to tell it the file and ask for information. you could send the whole buffer over and give it a fake filename, but then it will have to do a re-parse in full every time i.e. inefficient for large buffers. So when buffer-file-name is nil the engine gives you no information and thus eldoc prints nothing. This is what I meant by `not working' without the true value of buffer-file-name. All the above information is only remotely related because I think the real bug is in with-silent-modifications and nxml will have similar issues. So to sum up: 1. buffer-file-name has many uses and disable it makes other uses impossible 2. what if the body in with-silent-modifications change buffers Sorry if I fail to articulate the case. For now I have worked around it by saving buffer-file-name to another variable. Leo From unknown Tue Aug 19 14:23:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16804: 24.3.50; [PATCH] fix with-silent-modifications Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 20 Feb 2014 04:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16804 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Leo Liu Cc: 16804@debbugs.gnu.org Received: via spool by 16804-submit@debbugs.gnu.org id=B16804.139287228421137 (code B ref 16804); Thu, 20 Feb 2014 04:59:01 +0000 Received: (at 16804) by debbugs.gnu.org; 20 Feb 2014 04:58:04 +0000 Received: from localhost ([127.0.0.1]:32862 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WGLhz-0005Un-Df for submit@debbugs.gnu.org; Wed, 19 Feb 2014 23:58:03 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:17488) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WGLhw-0005UH-Jd for 16804@debbugs.gnu.org; Wed, 19 Feb 2014 23:58:01 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EABK/CFFLd/o4/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCwsOJhIUGA0kiB4GwS2RCgOIYZwZgV6DFQ X-IPAS-Result: Av8EABK/CFFLd/o4/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCwsOJhIUGA0kiB4GwS2RCgOIYZwZgV6DFQ X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="48208398" Received: from 75-119-250-56.dsl.teksavvy.com (HELO pastel.home) ([75.119.250.56]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 19 Feb 2014 23:57:54 -0500 Received: by pastel.home (Postfix, from userid 20848) id D0DEB6336B; Wed, 19 Feb 2014 23:57:54 -0500 (EST) From: Stefan Monnier Message-ID: References: Date: Wed, 19 Feb 2014 23:57:54 -0500 In-Reply-To: (Leo Liu's message of "Thu, 20 Feb 2014 08:33:54 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > Steve Yegge tried very hard to keep js2-mode performant. It seems his > strategy is to pause every few statements. (see js2-parse-statement). > If js2 find a way to disable all timers while parsing, it might for > example, cause dropping connections in rcirc. We already have Gnus > doing that. That doesn't change anything to the fact that calling something like sit-for from within a with-silent-modifications is a problem, regardless of buffer-file-name. E.g. it will cause the process filter not to mark the new text for highlighting, so it can screw up *compilation*. >> Again, a backtrace would be much more useful. > There is no backtrace. Of course there is. I know there is no error signaled, but you can still get a backtrace by calling (backtrace), or (debug). Stefan From unknown Tue Aug 19 14:23:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16804: 24.3.50; [PATCH] fix with-silent-modifications Resent-From: Leo Liu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 20 Feb 2014 05:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16804 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Stefan Monnier Cc: 16804@debbugs.gnu.org Received: via spool by 16804-submit@debbugs.gnu.org id=B16804.139287589928122 (code B ref 16804); Thu, 20 Feb 2014 05:59:02 +0000 Received: (at 16804) by debbugs.gnu.org; 20 Feb 2014 05:58:19 +0000 Received: from localhost ([127.0.0.1]:32893 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WGMeH-0007JU-J5 for submit@debbugs.gnu.org; Thu, 20 Feb 2014 00:58:18 -0500 Received: from mail-pa0-f41.google.com ([209.85.220.41]:33006) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WGMeE-0007JE-JV for 16804@debbugs.gnu.org; Thu, 20 Feb 2014 00:58:15 -0500 Received: by mail-pa0-f41.google.com with SMTP id fa1so1460339pad.14 for <16804@debbugs.gnu.org>; Wed, 19 Feb 2014 21:58:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:face:date:in-reply-to:message-id :user-agent:mime-version:content-type:content-transfer-encoding; bh=MxhRKsYVEAuov14QNnumxnLRLL4H7fMduMRFL86Uj9Q=; b=HL3Y9pnewKLJ3Rp5vq42/wy+HOdMcXfOz/JbDtTJUCMQdCaF02zi9RpMM8AIaApPUb dv3dyspGGgEIlAFRvm9HyKhb9JSLmu126jpjMDY7KrBjidWP9rBY8S+abKgEGZQazt5p B2o8ittKdgB4QiSBccJx6hEpGBAOyh4/gc3SsNhk4Q+wo0F65rk5bO5nHYGNa+Ni6hSt SB10SUb3/tFrF4Tx0zw3uV5lpfPbO957+NbFpXP/tsxSEsZFcRXp/p0z7n1Kw6phCkaI fWfYj6pWXwQfbGcuv66LbCjnx2m0VZoPcycM0nJ0bFfKo28xhQ1MnjB/Xf2/ELaRSaiQ GtEA== X-Received: by 10.66.145.166 with SMTP id sv6mr45028689pab.31.1392875888032; Wed, 19 Feb 2014 21:58:08 -0800 (PST) Received: from Zeuss-MacBook.local ([123.122.50.191]) by mx.google.com with ESMTPSA id hr2sm6957710pbb.8.2014.02.19.21.58.04 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Feb 2014 21:58:07 -0800 (PST) From: Leo Liu References: Face: iVBORw0KGgoAAAANSUhEUgAAACkAAAApAQAAAACAGz1bAAABKElEQVQYlWNg3NIt5FDPUPt7 4+X79Qyucz5/ugik+L2PBgKpyphaIK921q23QDnG0NBQoMr/vaWl9f8ZLL78uPv5PwN7RETfzXoG jhmFz27XM0RXmpuY/WfY+fv0Mc56BvFybfXA/wwL5t/wF61n2PU59axXPcOVzbmSW/8zrNt1benC /ww70hqUU/4zKCtrT9jwn8FhwynbufUMendE2aLqGRpdX9al1zM8eh17lKeeQcTMrdD5P8P3j/YT Q/8zXHSb7p1Qz/C4OM2JuZ7hgtI7K6AjqsMnf8j4z8C6xG1tw3+GqpqvsVn/GTzmpD9j/8/wP/oZ S/l/Bka+QO/g/wy15ueeFQL9N1O8mPU/g+umV3t1gdT0/1bTgHLqYVeXAlWKpMWt+w8Az82C9nHf X0cAAAAASUVORK5CYII= Date: Thu, 20 Feb 2014 13:57:59 +0800 In-Reply-To: (Stefan Monnier's message of "Wed, 19 Feb 2014 23:57:54 -0500") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (OS X 10.9.1) MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 2014-02-20 12:57 +0800, Stefan Monnier wrote: > That doesn't change anything to the fact that calling something like > sit-for from within a with-silent-modifications is a problem, regardless > of buffer-file-name. E.g. it will cause the process filter not to mark > the new text for highlighting, so it can screw up *compilation*. I see. Could you help document the delicacy of with-silent-modifications, or people will not correctly use it? >>> Again, a backtrace would be much more useful. >> There is no backtrace. > > Of course there is. I know there is no error signaled, but you can > still get a backtrace by calling (backtrace), or (debug). I see and sorry I misunderstood. Since input-pending-p is changed in 24.4 not to run timers by default, the backtrace is obtained in 24.3 and as expected: ...... timer-event-handler([t 0 0 200000 t #[...] nil idle 0]) input-pending-p() js2-parse-statement() js2-parse-function-body([cl-struct-js2-function-node 108 3537 1 nil nil n= il ((once . [cl-struct-js2-symbol 121 "once" [cl-struct-js2-name-node 39 0 = 4 nil [cl-struct-js2-var-init-node 121 4 106 nil [cl-struct-js2-var-decl-no= de 121 0 110 nil [cl-struct-js2-expr-stmt-node 132 120 111 nil [cl-struct-j= s2-block-node 128 3571 1 nil nil ...] #6] (#5) 121] #4 [cl-struct-js2-call-= node 38 7 99 nil #5 [cl-struct-js2-prop-get-node 33 0 6 nil #6 3703 [cl-str= uct-js2-name-node 39 0 1 nil #7 "_" nil] [cl-struct-js2-name-node 39 2 4 ni= l #7 "once" nil]] ([cl-struct-js2-function-node 108 7 91 nil #6 nil nil #0 = nil nil nil nil 0 nil nil 0 FUNCTION FUNCTION_EXPRESSION nil nil nil [cl-st= ruct-js2-block-node 128 11 80 nil #8 ...] 8 9 t t nil nil]) 6 98]] "once" n= il]]) (self . [cl-struct-js2-symbol 121 "self" [cl-struct-js2-name-node 39 = 0 4 nil [cl-struct-js2-var-init-node 121 4 11 nil [cl-struct-js2-var-decl-n= ode 121 0 15 nil [cl-struct-js2-expr-stmt-node 132 97 16 nil [cl-struct-js2= -block-node 128 3571 1 nil nil ...] #6] (#5) 121] #4 [cl-struct-js2-keyword= -node 43 7 4 nil #5]] "self" nil]]) (context . [cl-struct-js2-symbol 86 "co= ntext" [cl-struct-js2-name-node 39 25 7 nil #0 "context" nil]]) (callback .= [cl-struct-js2-symbol 86 "callback" [cl-struct-js2-name-node 39 15 8 nil #= 0 "callback" nil]]) (name . [cl-struct-js2-symbol 86 "name" [cl-struct-js2-= name-node 39 9 4 nil #0 "name" nil]])) nil nil nil nil nil 0 nil nil 0 FUNC= TION FUNCTION_EXPRESSION nil ([cl-struct-js2-name-node 39 9 4 nil #0 "name"= nil] [cl-struct-js2-name-node 39 15 8 nil #0 "callback" nil] [cl-struct-js= 2-name-node 39 25 7 nil #0 "context" nil]) nil nil 8 32 t nil nil nil]) js2-parse-function(FUNCTION_EXPRESSION 3537 nil nil) js2-parse-function-expr() js2-parse-primary-expr() js2-parse-member-expr(t) js2-parse-unary-expr() js2-parse-mul-expr() js2-parse-add-expr() js2-parse-shift-expr() js2-parse-rel-expr() js2-parse-eq-expr() js2-parse-bit-and-expr() ...... nxml has both input-pending-p and sit-for, see rng-validate-while-idle-continue-p in rng-valid.el > Stefan Is there something better than let-binding buffer-file-name and buffer-file-truename? Leo From unknown Tue Aug 19 14:23:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16804: 24.3.50; [PATCH] fix with-silent-modifications Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 20 Feb 2014 14:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16804 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Leo Liu Cc: 16804@debbugs.gnu.org Received: via spool by 16804-submit@debbugs.gnu.org id=B16804.139290488718084 (code B ref 16804); Thu, 20 Feb 2014 14:02:01 +0000 Received: (at 16804) by debbugs.gnu.org; 20 Feb 2014 14:01:27 +0000 Received: from localhost ([127.0.0.1]:33180 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WGUBq-0004hZ-0Y for submit@debbugs.gnu.org; Thu, 20 Feb 2014 09:01:26 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:27007) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WGUBe-0004h9-Dy for 16804@debbugs.gnu.org; Thu, 20 Feb 2014 09:01:24 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EABK/CFFLd/o4/2dsb2JhbABEuzWDWRdzgh4BAQQBJy8jBQsLDiYSFBgNJIgeBsEtkQoDiGGcGYFegxWBSAIeBAI X-IPAS-Result: Av8EABK/CFFLd/o4/2dsb2JhbABEuzWDWRdzgh4BAQQBJy8jBQsLDiYSFBgNJIgeBsEtkQoDiGGcGYFegxWBSAIeBAI X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="48226638" Received: from 75-119-250-56.dsl.teksavvy.com (HELO pastel.home) ([75.119.250.56]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 20 Feb 2014 09:01:08 -0500 Received: by pastel.home (Postfix, from userid 20848) id 51D64600EB; Thu, 20 Feb 2014 09:01:08 -0500 (EST) From: Stefan Monnier Message-ID: References: Date: Thu, 20 Feb 2014 09:01:08 -0500 In-Reply-To: (Leo Liu's message of "Thu, 20 Feb 2014 13:57:59 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) >> That doesn't change anything to the fact that calling something like >> sit-for from within a with-silent-modifications is a problem, regardless >> of buffer-file-name. E.g. it will cause the process filter not to mark >> the new text for highlighting, so it can screw up *compilation*. > I see. Could you help document the delicacy of > with-silent-modifications, or people will not correctly use it? Actually, the issue is not with with-silent-modifications but with sit-for and other yielding functions: you should be careful to call them from within the "plainest" context possible, since any dynamic-binding (or other temporary global change, such as moving point) currently active will then leak to any timer/filter/sentinel/redisplay that might be run at that point. >>>> Again, a backtrace would be much more useful. >>> There is no backtrace. >> Of course there is. I know there is no error signaled, but you can >> still get a backtrace by calling (backtrace), or (debug). > Since input-pending-p is changed in 24.4 not to run timers by default, > the backtrace is obtained in 24.3 and as expected: Ah, right, input-pending-p shouldn't be a yield point, which we recently fixed, so it should be OK to call input-pending-p from "anywhere". Can you reproduce the problem in 24.4 (and show the backtrace)? > nxml has both input-pending-p and sit-for, see > rng-validate-while-idle-continue-p in rng-valid.el Indeed, I see (with-silent-modifications (rng-do-some-validation-1 continue-p-function)))) where continue-p-function can be rng-validate-while-idle-continue-p which calls sit-for (to cause a redisplay). So we have a similar bug there. > Is there something better than let-binding buffer-file-name and > buffer-file-truename? I have the patch below for 24.5 which makes it unnecessary for with-silent-modifications to bind buffer-file-name and buffer-file-truename (by strengthening the meaning of inhibit-modification-hooks), but that doesn't magically fix the above problems :-( Stefan === modified file 'lisp/subr.el' --- lisp/subr.el 2014-02-12 19:40:35 +0000 +++ lisp/subr.el 2014-02-19 15:04:50 +0000 @@ -3176,12 +3176,7 @@ `(let* ((,modified (buffer-modified-p)) (buffer-undo-list t) (inhibit-read-only t) - (inhibit-modification-hooks t) - deactivate-mark - ;; Avoid setting and removing file locks and checking - ;; buffer's uptodate-ness w.r.t the underlying file. - buffer-file-name - buffer-file-truename) + (inhibit-modification-hooks t)) (unwind-protect (progn ,@body) === modified file 'src/insdel.c' --- src/insdel.c 2014-01-01 17:44:48 +0000 +++ src/insdel.c 2014-02-19 15:03:17 +0000 @@ -1829,6 +1829,9 @@ else base_buffer = current_buffer; + if (inhibit_modification_hooks) + return; + #ifdef CLASH_DETECTION if (!NILP (BVAR (base_buffer, file_truename)) /* Make binding buffer-file-name to nil effective. */ @@ -1848,7 +1851,6 @@ /* If `select-active-regions' is non-nil, save the region text. */ /* FIXME: Move this to Elisp (via before-change-functions). */ if (!NILP (BVAR (current_buffer, mark_active)) - && !inhibit_modification_hooks && XMARKER (BVAR (current_buffer, mark))->buffer && NILP (Vsaved_region_selection) && (EQ (Vselect_active_regions, Qonly) @@ -1959,9 +1961,6 @@ ptrdiff_t count = SPECPDL_INDEX (); struct rvoe_arg rvoe_arg; - if (inhibit_modification_hooks) - return; - start = make_number (start_int); end = make_number (end_int); preserve_marker = Qnil; From unknown Tue Aug 19 14:23:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16804: 24.3.50; [PATCH] fix with-silent-modifications Resent-From: Leo Liu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 20 Feb 2014 14:40:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16804 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Stefan Monnier Cc: 16804@debbugs.gnu.org Received: via spool by 16804-submit@debbugs.gnu.org id=B16804.139290716321952 (code B ref 16804); Thu, 20 Feb 2014 14:40:06 +0000 Received: (at 16804) by debbugs.gnu.org; 20 Feb 2014 14:39:23 +0000 Received: from localhost ([127.0.0.1]:33211 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WGUmZ-0005hy-3x for submit@debbugs.gnu.org; Thu, 20 Feb 2014 09:39:23 -0500 Received: from mail-pa0-f43.google.com ([209.85.220.43]:49152) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WGUmX-0005hk-Vv for 16804@debbugs.gnu.org; Thu, 20 Feb 2014 09:39:22 -0500 Received: by mail-pa0-f43.google.com with SMTP id rd3so1980902pab.16 for <16804@debbugs.gnu.org>; Thu, 20 Feb 2014 06:39:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:face:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=mnih+0DdLFbdJ+JkCPNP6m8SjuiY60hJKxJ8thZTeKM=; b=tv1AhyMUKGPBKlLvdGD4EzLUVt4Xy8VBLjhUUzt/B1sm4t1VT39MBiIZUNz5OsM21y Bj/OEgJxJ4viGF7qrCh85tBX4LcsAH7A3WJu5bubc2VT6vMj3Yak4bz6BWElq9EYpzOG 1lZdtZkfv2sss3DisGb5fxIoeSzMjRRZ5zM5uui6AUSJC5XQQMfpGrHMOYFpiYUOHrdm p+l+BGUyDzI2Z8vSYbtBZD/EJwOlcNJfgbmphvLGuGPo44H7BTg2S0XlzfRMzF6daPQ0 QnivZDx/Cri/dcQ8hFRUKqXM8twccLpwrTAapb7l/5hyRG3vg/pe1Oku+LFsm/hkI/hz /uWw== X-Received: by 10.66.122.36 with SMTP id lp4mr2541226pab.82.1392907154507; Thu, 20 Feb 2014 06:39:14 -0800 (PST) Received: from Zeuss-MacBook.local ([123.122.50.191]) by mx.google.com with ESMTPSA id yo9sm27127299pab.16.2014.02.20.06.39.07 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Feb 2014 06:39:13 -0800 (PST) From: Leo Liu References: Face: iVBORw0KGgoAAAANSUhEUgAAACkAAAApAQAAAACAGz1bAAABKElEQVQYlWNg3NIt5FDPUPt7 4+X79Qyucz5/ugik+L2PBgKpyphaIK921q23QDnG0NBQoMr/vaWl9f8ZLL78uPv5PwN7RETfzXoG jhmFz27XM0RXmpuY/WfY+fv0Mc56BvFybfXA/wwL5t/wF61n2PU59axXPcOVzbmSW/8zrNt1benC /ww70hqUU/4zKCtrT9jwn8FhwynbufUMendE2aLqGRpdX9al1zM8eh17lKeeQcTMrdD5P8P3j/YT Q/8zXHSb7p1Qz/C4OM2JuZ7hgtI7K6AjqsMnf8j4z8C6xG1tw3+GqpqvsVn/GTzmpD9j/8/wP/oZ S/l/Bka+QO/g/wy15ueeFQL9N1O8mPU/g+umV3t1gdT0/1bTgHLqYVeXAlWKpMWt+w8Az82C9nHf X0cAAAAASUVORK5CYII= Date: Thu, 20 Feb 2014 22:38:52 +0800 In-Reply-To: (Stefan Monnier's message of "Thu, 20 Feb 2014 09:01:08 -0500") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (OS X 10.9.1) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 2014-02-20 22:01 +0800, Stefan Monnier wrote: > Actually, the issue is not with with-silent-modifications but with > sit-for and other yielding functions: you should be careful to call them > from within the "plainest" context possible, since any dynamic-binding > (or other temporary global change, such as moving point) currently active > will then leak to any timer/filter/sentinel/redisplay that might be run > at that point. OK for now. >> Since input-pending-p is changed in 24.4 not to run timers by default, >> the backtrace is obtained in 24.3 and as expected: > > Ah, right, input-pending-p shouldn't be a yield point, which we recently > fixed, so it should be OK to call input-pending-p from "anywhere". > > Can you reproduce the problem in 24.4 (and show the backtrace)? No. I tried but cannot get any backtrace in 24.4 so input-pending-p is behaving. >> nxml has both input-pending-p and sit-for, see >> rng-validate-while-idle-continue-p in rng-valid.el > > Indeed, I see > (with-silent-modifications > (rng-do-some-validation-1 continue-p-function)))) > > where continue-p-function can be rng-validate-while-idle-continue-p > which calls sit-for (to cause a redisplay). So we have a similar bug there. How about replace (sit-for 0) with (not (input-pending-p)) in rng-validate-while-idle-continue-p? >> Is there something better than let-binding buffer-file-name and >> buffer-file-truename? > > I have the patch below for 24.5 which makes it unnecessary for > with-silent-modifications to bind buffer-file-name and > buffer-file-truename (by strengthening the meaning of > inhibit-modification-hooks), but that doesn't magically fix the above > problems :-( > > > Stefan Thanks for the fix. Leo From unknown Tue Aug 19 14:23:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16804: 24.3.50; [PATCH] fix with-silent-modifications Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 20 Feb 2014 17:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16804 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Leo Liu Cc: 16804@debbugs.gnu.org Received: via spool by 16804-submit@debbugs.gnu.org id=B16804.13929165387855 (code B ref 16804); Thu, 20 Feb 2014 17:16:02 +0000 Received: (at 16804) by debbugs.gnu.org; 20 Feb 2014 17:15:38 +0000 Received: from localhost ([127.0.0.1]:33853 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WGXDk-00022c-Kv for submit@debbugs.gnu.org; Thu, 20 Feb 2014 12:15:37 -0500 Received: from mercure.iro.umontreal.ca ([132.204.24.67]:40046) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WGXDX-000224-76 for 16804@debbugs.gnu.org; Thu, 20 Feb 2014 12:15:23 -0500 Received: from hidalgo.iro.umontreal.ca (hidalgo.iro.umontreal.ca [132.204.27.50]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id 4A23084B2C; Thu, 20 Feb 2014 12:15:22 -0500 (EST) Received: from lechon.iro.umontreal.ca (lechon.iro.umontreal.ca [132.204.27.242]) by hidalgo.iro.umontreal.ca (Postfix) with ESMTP id 802C41E5913; Thu, 20 Feb 2014 12:14:46 -0500 (EST) Received: by lechon.iro.umontreal.ca (Postfix, from userid 20848) id 5E761B431A; Thu, 20 Feb 2014 12:14:46 -0500 (EST) From: Stefan Monnier Message-ID: References: Date: Thu, 20 Feb 2014 12:14:46 -0500 In-Reply-To: (Leo Liu's message of "Thu, 20 Feb 2014 22:38:52 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-DIRO-MailScanner-Information: Please contact the ISP for more information X-DIRO-MailScanner: Found to be clean X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (score=-2.82, requis 5, autolearn=not spam, ALL_TRUSTED -2.82, MC_TSTLAST 0.00) X-DIRO-MailScanner-From: monnier@iro.umontreal.ca X-Spam-Status: No X-Spam-Score: -2.9 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.9 (--) >> Can you reproduce the problem in 24.4 (and show the backtrace)? > No. I tried but cannot get any backtrace in 24.4 so input-pending-p is > behaving. Does that mean that the original problem (interaction with js2-mode) you reported is only present in 24.3 and not in 24.4 (your original email says "24.3.50", which makes me believe the problem also applies to 24.4)? > How about replace (sit-for 0) with (not (input-pending-p)) in > rng-validate-while-idle-continue-p? No, this call to sit-for is performed specifically to refresh the display, so input-pending-p is not an alternative. Stefan From unknown Tue Aug 19 14:23:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16804: 24.3.50; [PATCH] fix with-silent-modifications Resent-From: Leo Liu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 21 Feb 2014 00:30:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16804 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Stefan Monnier Cc: 16804@debbugs.gnu.org Received: via spool by 16804-submit@debbugs.gnu.org id=B16804.139294256423343 (code B ref 16804); Fri, 21 Feb 2014 00:30:04 +0000 Received: (at 16804) by debbugs.gnu.org; 21 Feb 2014 00:29:24 +0000 Received: from localhost ([127.0.0.1]:34089 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WGdzX-00064P-Un for submit@debbugs.gnu.org; Thu, 20 Feb 2014 19:29:24 -0500 Received: from mail-pd0-f181.google.com ([209.85.192.181]:51868) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WGdzV-00064A-Pf for 16804@debbugs.gnu.org; Thu, 20 Feb 2014 19:29:22 -0500 Received: by mail-pd0-f181.google.com with SMTP id y13so18345pdi.40 for <16804@debbugs.gnu.org>; Thu, 20 Feb 2014 16:29:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:face:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=zTczxdf6sjCs/6OjTJ+9wO0Yst/qvqz9VL5AcWXmP04=; b=PFABYviaWZE5WpX7Wbu7Jt47kLktPRrfzTnPVxuYI0BsbxOW5s3P5ZxfkPT9nOaJSo 0JzeY6atKsCoaAqtKR1owqlgt4mKG+H7fxJm9M3oOiyI665Y9msPWcJblKVeL4lh7uS5 GbRjwKEE4Z0hM76dusaL/KZdb536r6OZZM81qOhPCXulNUOAt6hYMRga9jjdfXVmLAY+ f3Sg6IAK+87v9Ajv0sqt3hSaBBdswlVF5I/Due9oSneDOuNmC1mxBmJZXkS+RwRfHson hACzaxDY/M8FDm0ArxfNyJFztqAN1opdnlOHmdASqStzDGXKaxS+HNiSYPKGLXw9xwY5 +k2Q== X-Received: by 10.66.163.164 with SMTP id yj4mr5371554pab.91.1392942555661; Thu, 20 Feb 2014 16:29:15 -0800 (PST) Received: from Zeuss-MacBook.local ([123.122.50.191]) by mx.google.com with ESMTPSA id e3sm15261697pbc.17.2014.02.20.16.29.13 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Feb 2014 16:29:14 -0800 (PST) From: Leo Liu References: Face: iVBORw0KGgoAAAANSUhEUgAAACgAAAAoBAMAAAB+0KVeAAAAGFBMVEUKDAg1NjRWV1V9fnyg op/DxcLk5uP8/voi63ReAAAACXBIWXMAAAWJAAAFiQFtaJ36AAAAB3RJTUUH1goZAgAz00bgXgAA AeVJREFUKM9lk0Fz2jAQhQXJD3CCO70CmcC1YMtcWyTZ14Bl69xats4N9r6/3zWQBlodNKNPu/s0 b1cCQFuZGpfVVh3vAvBJolIXRkapSuoRUtIdFyo1Y5xSdlAj7OtvD1XnXxmWRi+eWgcxyCed1lVV B1CrKyujMoi+eLA5kU1SsjoHlW+nQjTtFxk4MXgrOxvIqzoTZR8XgPaLl419zgsMaSGFPiUOZCIh thsx5Xy9NsK8Kwf/JoQgMxcVJ301HKkcSWaT0O7FY056J4U9xcYfnmVXG4801lW6lqwu2nKFZoHC HuzvaTVndZ+LaRQgZdthXw1cpynEkLEwyFHXk/aIxNQ6QeooJuzPMB+wn+D7JJNsiCcVA13/A3h/ xE9J+WidpAwoYNmRFwyvSRhNVtsdaAewzZZP5uw82QL9+tyNfocyP0McAzICUr5Mk9RdIjWasUNx aIIt6NK4ZtXIMdfMQt3nuMAyWbLI4DqZ4xPq/ag8jPond4XU/cLuOgw6XCFX/YCUfcDAMMH58fD4 G9kDchwfqVefkBwup2uZM+Q4WhJt5jN3AxXCsaS2yXEDuWgS8VOzW0gFjhEPmLyFMKBFaLb1HRwc DiaKwx0EeTMRYnYPQRW3PP4HApvlMv0PttX5v/D6Aws3IOSEwzmLAAAAAElFTkSuQmCC Date: Fri, 21 Feb 2014 08:29:11 +0800 In-Reply-To: (Stefan Monnier's message of "Thu, 20 Feb 2014 12:14:46 -0500") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (OS X 10.9.1) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) On 2014-02-21 01:14 +0800, Stefan Monnier wrote: > Does that mean that the original problem (interaction with js2-mode) you > reported is only present in 24.3 and not in 24.4 (your original email > says "24.3.50", which makes me believe the problem also applies to > 24.4)? I believed it too but I was too focused on the issues of with-silent-modifications and thus the 24.3.50 tag. Now I cannot reproduce the problem on 24.3.50 any more. I might have some missteps in the initial report. I discovered the problem while running 24.3 on my laptop then ssh'd to a centos 6 server where there is daily build of emacs and "saw" the same issue there. >> How about replace (sit-for 0) with (not (input-pending-p)) in >> rng-validate-while-idle-continue-p? > > No, this call to sit-for is performed specifically to refresh the > display, so input-pending-p is not an alternative. OK. Leo From unknown Tue Aug 19 14:23:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16804: 24.3.50; [PATCH] fix with-silent-modifications Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 24 Feb 2016 03:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16804 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Leo Liu Cc: 16804@debbugs.gnu.org, Stefan Monnier Received: via spool by 16804-submit@debbugs.gnu.org id=B16804.145628346415746 (code B ref 16804); Wed, 24 Feb 2016 03:12:01 +0000 Received: (at 16804) by debbugs.gnu.org; 24 Feb 2016 03:11:04 +0000 Received: from localhost ([127.0.0.1]:41988 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aYPqy-00045u-GW for submit@debbugs.gnu.org; Tue, 23 Feb 2016 22:11:04 -0500 Received: from hermes.netfonds.no ([80.91.224.195]:48697) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aYPqx-00045n-Ny for 16804@debbugs.gnu.org; Tue, 23 Feb 2016 22:11:04 -0500 Received: from cpe-60-225-211-161.nsw.bigpond.net.au ([60.225.211.161] helo=mouse) by hermes.netfonds.no with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1aYPqZ-0006gh-KA; Wed, 24 Feb 2016 04:10:40 +0100 From: Lars Ingebrigtsen References: Date: Wed, 24 Feb 2016 14:10:35 +1100 In-Reply-To: (Leo Liu's message of "Fri, 21 Feb 2014 08:29:11 +0800") Message-ID: <87fuwin6qc.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-MailScanner-ID: 1aYPqZ-0006gh-KA X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1456888240.73143@WY0G71zz8jPKuY0oJYn/0A X-Spam-Status: No X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Leo Liu writes: > On 2014-02-21 01:14 +0800, Stefan Monnier wrote: >> Does that mean that the original problem (interaction with js2-mode) you >> reported is only present in 24.3 and not in 24.4 (your original email >> says "24.3.50", which makes me believe the problem also applies to >> 24.4)? > > I believed it too but I was too focused on the issues of > with-silent-modifications and thus the 24.3.50 tag. Now I cannot > reproduce the problem on 24.3.50 any more. It sounds like this problem has gone away? So I'm closing this bug report. If it still persists, please reopen. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 23 22:11:11 2016 Received: (at control) by debbugs.gnu.org; 24 Feb 2016 03:11:11 +0000 Received: from localhost ([127.0.0.1]:41991 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aYPr5-00046F-Mq for submit@debbugs.gnu.org; Tue, 23 Feb 2016 22:11:11 -0500 Received: from hermes.netfonds.no ([80.91.224.195]:48704) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aYPr4-000467-Cx for control@debbugs.gnu.org; Tue, 23 Feb 2016 22:11:10 -0500 Received: from cpe-60-225-211-161.nsw.bigpond.net.au ([60.225.211.161] helo=mouse) by hermes.netfonds.no with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1aYPqh-0006gq-7E for control@debbugs.gnu.org; Wed, 24 Feb 2016 04:10:47 +0100 Date: Wed, 24 Feb 2016 14:10:43 +1100 Message-Id: <87egc2n6q4.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #16804 X-MailScanner-ID: 1aYPqh-0006gq-7E X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1456888248.23465@iv83MjncbhgHRcqLdnhgDA X-Spam-Status: No X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) tags 16804 fixed close 16804