From mboxrd@z Thu Jan 1 00:00:00 1970 From: npostavs@users.sourceforge.net Subject: bug#25132: 26.0.50; emacs hangs when loading org file with python source blocks Date: Thu, 19 Jan 2017 22:18:46 -0500 Message-ID: <8737gewh9l.fsf@users.sourceforge.net> References: <4aa23451-b6cd-88b0-369e-99f6fe5f2175@gmail.com> <87y3yn2x4j.fsf@users.sourceforge.net> <87eg0e36un.fsf@users.sourceforge.net> <878tq6wo1p.fsf@users.sourceforge.net> <4674bf9b-38f0-8839-fadb-e9a719faf163@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41448) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cUPiI-0007XP-1U for emacs-orgmode@gnu.org; Thu, 19 Jan 2017 22:18:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cUPiE-00084m-TK for emacs-orgmode@gnu.org; Thu, 19 Jan 2017 22:18:06 -0500 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <4674bf9b-38f0-8839-fadb-e9a719faf163@gmail.com> ("=?UTF-8?Q?Cl=C3=A9ment?= Pit--Claudel"'s message of "Thu, 19 Jan 2017 21:22:34 -0500") 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: =?UTF-8?Q?Cl=C3=A9ment?= Pit--Claudel Cc: David Dynerman , 25132@debbugs.gnu.org, Dmitry Gutov Cl=C3=A9ment Pit--Claudel writes: > On 2017-01-19 19:52, npostavs@users.sourceforge.net wrote: >> 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'. > > On 2017-01-19 19:52, npostavs@users.sourceforge.net wrote: >> 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'. > > Hi Noam, > > Can you explain a bit more? I'm not sure what you meant. > > I tried the following to illustrate your point: > > (defvar aa 0) > > (with-temp-buffer > (setq-local aa 1) > (let ((b1 (current-buffer))) > (with-temp-buffer > (let ((aa 2)) > (message "In b2: %S" aa) > (with-current-buffer b1 > (message "In b1: %S" aa)))))) My point was that the setq-local (or make-local-variable) is required and that defvar-local (or make-variable-buffer-local) is not enough. Compare: (defvar-local bb 0) (with-temp-buffer (let ((b1 (current-buffer))) (with-temp-buffer (let ((bb 2)) (message "In b2: %S" bb) (with-current-buffer b1 (message "In b1: %S" bb))))))