From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Vitalie Spinu Newsgroups: gmane.emacs.devel Subject: Re: trunk r116426: * lisp/jit-lock.el (jit-lock-mode): Keep it disabled in indirect buffers. Date: Sat, 24 May 2014 02:46:03 -0700 Organization: UCLA Anderson School of Management Message-ID: <87d2f3y0f8.fsf@gmail.com> References: <87k39ee7qm.fsf@gmail.com> <87ioowcr7l.fsf@gmail.com> <8738g0ccig.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1400924782 9188 80.91.229.3 (24 May 2014 09:46:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 24 May 2014 09:46:22 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat May 24 11:46:14 2014 Return-path: Envelope-to: ged-emacs-devel@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 1Wo8Ws-0006BW-Ef for ged-emacs-devel@m.gmane.org; Sat, 24 May 2014 11:46:14 +0200 Original-Received: from localhost ([::1]:47356 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wo8Ws-0001Fy-3t for ged-emacs-devel@m.gmane.org; Sat, 24 May 2014 05:46:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47867) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wo8Wo-0001FZ-M5 for emacs-devel@gnu.org; Sat, 24 May 2014 05:46:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wo8Wm-0004eG-H6 for emacs-devel@gnu.org; Sat, 24 May 2014 05:46:10 -0400 Original-Received: from mail-pb0-x234.google.com ([2607:f8b0:400e:c01::234]:61880) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wo8Wm-0004eC-B6 for emacs-devel@gnu.org; Sat, 24 May 2014 05:46:08 -0400 Original-Received: by mail-pb0-f52.google.com with SMTP id rr13so5270213pbb.25 for ; Sat, 24 May 2014 02:46:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:organization:references:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=7GIwX8+9eajRx8vCiSwfs5U9Eevr5u5VfeJy48mxdsg=; b=Si9WcPuaIZ43I0SnJJgZh6GfKf7ylZvHtqd47/o2BVSI1HxAX1J76qMwzOIx07TNQG sGEKQnFfAgrexso2hLWUhmjyVLqLncBXQK1D8hWS+YUfPufk8QnLqRGBNS1E38zoh9N7 g0PFhCHWe917AQpnCiRg9UwmpNbaH9rreH5NnXL81azFBEkOdNUPC/UUuvsyzejhj6be nheeTq3uuv8K9ps0gTHHymLxArvRFytEu/eFQficVm2+EvK5oa+MLYqy6h7Ftxqu3tSn cfesI98LNJBqQstflkWe8o9a9k5atSiQ8CThxARL9I/vBUFb5kpUrLdZVttMk5HJznHn r77w== X-Received: by 10.68.193.100 with SMTP id hn4mr12794033pbc.50.1400924767185; Sat, 24 May 2014 02:46:07 -0700 (PDT) Original-Received: from localhost ([2607:f010:2e9:2:7218:8bff:feae:a65e]) by mx.google.com with ESMTPSA id se3sm8506581pbb.80.2014.05.24.02.46.04 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sat, 24 May 2014 02:46:05 -0700 (PDT) In-Reply-To: (Stefan Monnier's message of "Fri, 23 May 2014 23:10:43 -0400") User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c01::234 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:172057 Archived-At: >>> Stefan Monnier on Fri, 23 May 2014 23:10:43 -0400 wrote: [...] > Why prohibit the hooks from the base buffer? If they're there it's > presumably because they're needed. I thought that foreign chunks should be completely invisible. Your example disproves the point, indeed. Thanks. [...] > OK, let's say you chunks > chunk 1 in mode A > chunk 2 in mode B > chunk 3 in mode A > And let's say that mode A does some clever caching, so it sets up an > after-change-functions hook to flush its cache. Now you go and delete > a block of text in chunk 3, mode A is not warned about it and fails to > flush its cache which now holds completely broken data about chunk 3. > Of course, running the after-change-functions only in the base buffer > won't directly help with that. If the patch that you propose is ever implemented, local hooks will still be run in current buffer, right? Coming back to the original jit-lock problem. I still have no clue how to fix it without copying the whole initialization part of jit-lock into polymode. > So when jit-lock is triggered it has to refontify in all buffers that > share the same base buffer. And if font-lock is activated in several > buffers which share the same base buffer, they'll fight over their > shared `face' text-property. I have just tried this in emacs 24.3.1 and font-lock is triggered only once in indirect buffers. So it's either some corner case that you are talking about, or font-lock was broken after 24.3.1 and then you "fixed" it in: commit 6e5d23387db48e9bdf116e59bf7ef717c61982a3 Author: Stefan Monnier Date: Wed Feb 12 22:29:47 2014 -0500 * lisp/jit-lock.el (jit-lock-mode): Keep it disabled in indirect buffers. This patch doesn't affect cloning and jit-lock is still active in cloned indirect buffers. Vitalie