From: npostavs@users.sourceforge.net
To: "Clément Pit--Claudel" <clement.pit@gmail.com>
Cc: David Dynerman <emperordali@block-party.net>,
25132@debbugs.gnu.org, Dmitry Gutov <dgutov@yandex.ru>
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 [thread overview]
Message-ID: <8737gewh9l.fsf@users.sourceforge.net> (raw)
In-Reply-To: <4674bf9b-38f0-8839-fadb-e9a719faf163@gmail.com> ("Clément Pit--Claudel"'s message of "Thu, 19 Jan 2017 21:22:34 -0500")
Clément Pit--Claudel <clement.pit@gmail.com> 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))))))
next prev parent reply other threads:[~2017-01-20 3:18 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <m2fulz4mjc.fsf@CIVIC-TV.local>
2016-12-08 2:08 ` bug#25132: 26.0.50; emacs hangs when loading org file with python source blocks Glenn Morris
[not found] ` <qwa8c75g0r.fsf@fencepost.gnu.org>
2016-12-08 2:40 ` Clément Pit--Claudel
[not found] ` <4aa23451-b6cd-88b0-369e-99f6fe5f2175@gmail.com>
2016-12-08 7:17 ` David Dynerman
[not found] ` <m260murisv.fsf@block-party.net>
2017-01-07 6:38 ` npostavs
[not found] ` <87y3yn2x4j.fsf@users.sourceforge.net>
2017-01-07 21:20 ` npostavs
2017-01-19 16:25 ` Dmitry Gutov
2017-01-20 0:52 ` npostavs
[not found] ` <878tq6wo1p.fsf@users.sourceforge.net>
2017-01-20 2:22 ` Clément Pit--Claudel
[not found] ` <4674bf9b-38f0-8839-fadb-e9a719faf163@gmail.com>
2017-01-20 3:18 ` npostavs [this message]
2017-01-23 3:53 ` Dmitry Gutov
[not found] ` <345079d3-9578-9ab9-1444-353843a70f8b@yandex.ru>
2017-01-24 3:36 ` npostavs
[not found] ` <874m0puo2a.fsf@users.sourceforge.net>
2017-01-29 16:05 ` npostavs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8737gewh9l.fsf@users.sourceforge.net \
--to=npostavs@users.sourceforge.net \
--cc=25132@debbugs.gnu.org \
--cc=clement.pit@gmail.com \
--cc=dgutov@yandex.ru \
--cc=emperordali@block-party.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).