From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: "Roland Winkler" Newsgroups: gmane.emacs.help Subject: Re: let-bind a varlist only known at run time Date: Thu, 13 Jul 2017 01:09:38 +0200 Message-ID: <44082.5173.272199.22886@gargle.gargle.HOWL> References: <28921.59572.342625.22836@gargle.gargle.HOWL> <87efuzup10.fsf@drachen> <52038.28949.342810.22836@gargle.gargle.HOWL> <87h8yhfh9t.fsf@drachen> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1499901035 17956 195.159.176.226 (12 Jul 2017 23:10:35 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 12 Jul 2017 23:10:35 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Michael Heerdegen Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jul 13 01:10:28 2017 Return-path: Envelope-to: geh-help-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 1dVQlz-0003sU-Gj for geh-help-gnu-emacs@m.gmane.org; Thu, 13 Jul 2017 01:10:23 +0200 Original-Received: from localhost ([::1]:56303 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVQm0-0006fx-7X for geh-help-gnu-emacs@m.gmane.org; Wed, 12 Jul 2017 19:10:24 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42089) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVQlL-0006eL-FX for help-gnu-emacs@gnu.org; Wed, 12 Jul 2017 19:09:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dVQlK-0001Kj-HD for help-gnu-emacs@gnu.org; Wed, 12 Jul 2017 19:09:43 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:58916) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVQlK-0001KS-DH; Wed, 12 Jul 2017 19:09:42 -0400 Original-Received: from [2602:30a:2e52:d720:65b7:1416:12e7:8bfb] (port=48390 helo=regnitz) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1dVQlJ-0006zm-Tp; Wed, 12 Jul 2017 19:09:42 -0400 In-Reply-To: <87h8yhfh9t.fsf@drachen> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:113761 Archived-At: On Wed Jul 12 2017 Michael Heerdegen wrote: > > If var-list is the VARLIST for the let form, you should also use > > var-list to construct the alist that becomes the 2nd arg LEXICAL of > > eval. I believe, then it should not matter whether you have lexical > > binding on or off (untested!) > > I don't think it's that simple: BINDS is unevaluated: it's a list of the > form ((SYMBOL EXPRESSION) ...). We would need to evaluate the bindings > twice (once to calculate the environment for `eval', and the second time > when evaluating the constructed form), which is unacceptable. I agree that the expressions need to be evaluated only once. Currently cl-progv uses the quoted values of the expresssions for the let binding. I expect that instead, these quoted values should be used twice, for the let binding and for `eval'. I played with this idea, but I couldn't find a solution within the finite amount of time I spent with this problem. > > So is this a bug in cl-progv? (I checked: this macro ignores the > > 2nd arg LEXICAL of eval.) > > I think it's a bug, it's now filed as #27674. Thanks, I'll watch it.