From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Leo Liu Newsgroups: gmane.emacs.bugs Subject: bug#16804: 24.3.50; [PATCH] fix with-silent-modifications Date: Thu, 20 Feb 2014 08:33:54 +0800 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1392856517 5270 80.91.229.3 (20 Feb 2014 00:35:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 20 Feb 2014 00:35:17 +0000 (UTC) Cc: 16804@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Feb 20 01:35:24 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WGHbn-00067T-An for geb-bug-gnu-emacs@m.gmane.org; Thu, 20 Feb 2014 01:35:23 +0100 Original-Received: from localhost ([::1]:34725 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGHbm-000269-IX for geb-bug-gnu-emacs@m.gmane.org; Wed, 19 Feb 2014 19:35:22 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45484) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGHbc-00024t-MN for bug-gnu-emacs@gnu.org; Wed, 19 Feb 2014 19:35:19 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WGHbT-0006VW-U2 for bug-gnu-emacs@gnu.org; Wed, 19 Feb 2014 19:35:12 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:59683) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGHbT-0006UF-Rl for bug-gnu-emacs@gnu.org; Wed, 19 Feb 2014 19:35:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WGHbS-0006Lw-Rg for bug-gnu-emacs@gnu.org; Wed, 19 Feb 2014 19:35:03 -0500 X-Loop: help-debbugs@gnu.org 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 Original-Received: via spool by 16804-submit@debbugs.gnu.org id=B16804.139285645424347 (code B ref 16804); Thu, 20 Feb 2014 00:35:02 +0000 Original-Received: (at 16804) by debbugs.gnu.org; 20 Feb 2014 00:34:14 +0000 Original-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 Original-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 Original-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) Original-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) 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= In-Reply-To: (Stefan Monnier's message of "Wed, 19 Feb 2014 13:30:25 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (OS X 10.9.1) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:85918 Archived-At: 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