From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dmitry Gutov Subject: bug#25132: 26.0.50; emacs hangs when loading org file with python source blocks Date: Mon, 23 Jan 2017 06:53:21 +0300 Message-ID: <345079d3-9578-9ab9-1444-353843a70f8b__13399.7557139539$1485143693$gmane$org@yandex.ru> References: <4aa23451-b6cd-88b0-369e-99f6fe5f2175@gmail.com> <87y3yn2x4j.fsf@users.sourceforge.net> <87eg0e36un.fsf@users.sourceforge.net> <878tq6wo1p.fsf@users.sourceforge.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33202) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cVVhn-00080y-6b for emacs-orgmode@gnu.org; Sun, 22 Jan 2017 22:54:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cVVhm-0002Oj-CX for emacs-orgmode@gnu.org; Sun, 22 Jan 2017 22:54:07 -0500 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <878tq6wo1p.fsf@users.sourceforge.net> Content-Language: en-US List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: npostavs@users.sourceforge.net Cc: David Dynerman , 25132@debbugs.gnu.org, =?UTF-8?Q?Cl=C3=A9ment?= Pit--Claudel On 20.01.2017 03:52, npostavs@users.sourceforge.net wrote: > My feeling is that inhibit-modification-hooks should usually be buffer > local anyway. Maybe you're right. inhibit-read-only, bound nearby, seems to be in the same situation. >> If we are not, why not make inhibit-modification-hooks always >> buffer-local instead? > > It would have to be in addition to, because even after doing > (make-variable-buffer-local 'var), (let ((var 'foo))...) still makes a > global binding. `make-variable-buffer-local' only has effect for > `setq', which I think will hardly ever happen for > `inhibit-modification-hooks'. You're right, and that sounds a little too complicated for my taste. So, personally, I'd try to fix the particular instance first. Switching buffers inside with-silent-modifications is not a very common usage, I think. Maybe org-src should itself let-bind the aforementioned variable(s) where it visits other buffers. Up to you, of course, since you've already been given the go-ahead for the proposed fix.