From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.bugs Subject: bug#27674: 26.0.50; cl-progv: strange scoping due to implementation Date: Thu, 13 Jul 2017 03:11:37 +0200 Message-ID: <87zic9dtti.fsf@drachen> References: <87lgntfhky.fsf@drachen> <87r2xldw4s.fsf@users.sourceforge.net> <874luhf9zw.fsf@drachen> <87o9spdusk.fsf@users.sourceforge.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1499908933 14411 195.159.176.226 (13 Jul 2017 01:22:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 13 Jul 2017 01:22:13 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: 27674@debbugs.gnu.org To: npostavs@users.sourceforge.net Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jul 13 03:22:04 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dVSpP-0003JM-NJ for geb-bug-gnu-emacs@m.gmane.org; Thu, 13 Jul 2017 03:22:03 +0200 Original-Received: from localhost ([::1]:56745 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVSpV-0002M5-4E for geb-bug-gnu-emacs@m.gmane.org; Wed, 12 Jul 2017 21:22:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39707) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVSfm-0001yA-MF for bug-gnu-emacs@gnu.org; Wed, 12 Jul 2017 21:12:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dVSfi-0005MI-KG for bug-gnu-emacs@gnu.org; Wed, 12 Jul 2017 21:12:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:33310) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dVSfi-0005M9-G7 for bug-gnu-emacs@gnu.org; Wed, 12 Jul 2017 21:12:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dVSfi-00048z-82 for bug-gnu-emacs@gnu.org; Wed, 12 Jul 2017 21:12:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Heerdegen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 13 Jul 2017 01:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27674 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 27674-submit@debbugs.gnu.org id=B27674.149990831915920 (code B ref 27674); Thu, 13 Jul 2017 01:12:02 +0000 Original-Received: (at 27674) by debbugs.gnu.org; 13 Jul 2017 01:11:59 +0000 Original-Received: from localhost ([127.0.0.1]:35987 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dVSff-00048i-3q for submit@debbugs.gnu.org; Wed, 12 Jul 2017 21:11:59 -0400 Original-Received: from mout.web.de ([212.227.15.4]:49523) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dVSfc-00048S-GD for 27674@debbugs.gnu.org; Wed, 12 Jul 2017 21:11:57 -0400 Original-Received: from drachen.dragon ([88.73.234.235]) by smtp.web.de (mrweb003 [213.165.67.108]) with ESMTPSA (Nemesis) id 0Lb289-1dyDun2yuv-00kgTJ; Thu, 13 Jul 2017 03:11:40 +0200 In-Reply-To: <87o9spdusk.fsf@users.sourceforge.net> (npostavs's message of "Wed, 12 Jul 2017 20:50:35 -0400") X-Provags-ID: V03:K0:QBG9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I X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:134487 Archived-At: npostavs@users.sourceforge.net writes: > Michael Heerdegen writes: > > > Sure, but that's something different. I didn't want a special variable > > in my example. The doc of `cl-progv' doesn't mention that the symbols > > must correspond to special variables. Do I miss something? > > Oh, you expect cl-progv to bind lexically? Eh - no. Maybe I have a wrong mental model. I thought that the free variable `x' in the lambda is (also) in the scope of the dynamical binding created by `progv', and because that binding is established inside the `let' establishing the lexical binding of `x', it would shadow the lexical binding. Why does the lambda still refer to the lexical binding? FWIW I see that this example shows the same behavior: #+begin_src emacs-lisp (setq x 'foo) (let ((x 0)) (cl-letf (((symbol-value 'x) 1)) (funcall (lambda () x)))) #+end_src ==> 0 Does a lexical binding always beat a dynamical one? Michael.