From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nathan Weizenbaum Newsgroups: gmane.emacs.bugs Subject: bug#6203: Frame-local variables break let-binding Date: Mon, 17 May 2010 10:12:47 -0700 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001636284ca277c1e50486cd55df X-Trace: dough.gmane.org 1274119024 26884 80.91.229.12 (17 May 2010 17:57:04 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 17 May 2010 17:57:04 +0000 (UTC) Cc: 6203@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon May 17 19:57:02 2010 connect(): No such file or directory Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OE4Ym-0004Aj-Jm for geb-bug-gnu-emacs@m.gmane.org; Mon, 17 May 2010 19:57:01 +0200 Original-Received: from localhost ([127.0.0.1]:45053 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OE4Ym-00045T-2x for geb-bug-gnu-emacs@m.gmane.org; Mon, 17 May 2010 13:57:00 -0400 Original-Received: from [140.186.70.92] (port=44836 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OE4Yd-00045C-Bw for bug-gnu-emacs@gnu.org; Mon, 17 May 2010 13:56:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OE4Yb-00039I-P9 for bug-gnu-emacs@gnu.org; Mon, 17 May 2010 13:56:51 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:46705) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OE4Yb-00039E-NF for bug-gnu-emacs@gnu.org; Mon, 17 May 2010 13:56:49 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OE48h-0005jg-IU; Mon, 17 May 2010 13:30:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Nathan Weizenbaum Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 17 May 2010 17:30:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6203 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 6203-submit@debbugs.gnu.org id=B6203.127411737922015 (code B ref 6203); Mon, 17 May 2010 17:30:03 +0000 Original-Received: (at 6203) by debbugs.gnu.org; 17 May 2010 17:29:39 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OE48I-0005j1-Nx for submit@debbugs.gnu.org; Mon, 17 May 2010 13:29:39 -0400 Original-Received: from mail-gy0-f172.google.com ([209.85.160.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OE3s4-0005b3-5a for 6203@debbugs.gnu.org; Mon, 17 May 2010 13:12:52 -0400 Original-Received: by gyh4 with SMTP id 4so2231256gyh.3 for <6203@debbugs.gnu.org>; Mon, 17 May 2010 10:12:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=KEL6gpkIxgqqC/8gFyOn6XJoq9bgPXm50Qr07UW33T0=; b=FniMxxR5QXWGVVI/fV1gvA7YPP/U6ZLf8KhZtcuCaLA/39kZsA/QRugPPkTjD6XOZ4 Idusr6oIhIH+hJNZ3dogtGowSO70yQOfVuljKPdJ5K7kePHYxtjfjaXHbiR6KuXuZHsB iWHZAa5xGkVY5oRitmmVPVW3sJ8d/jwWwadJc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=diPTBp2UVUOh4FgUVErCKQuUGaU3QF/X/xthtnrg1iyuA9pNi3LpEgZIsIH2R0j50l 3AT+FrGRQ9K5Q265RXzSZmyoL8eh9Z4PDxEgu1k+W1T3UGnJpsBzA3C5tPCWxVun6tkY p6kbu5bIcj3D8sMLk01n5pvwim5CzNXrmwYXQ= Original-Received: by 10.90.2.4 with SMTP id 4mr2203732agb.42.1274116367170; Mon, 17 May 2010 10:12:47 -0700 (PDT) Original-Received: by 10.90.25.9 with HTTP; Mon, 17 May 2010 10:12:47 -0700 (PDT) In-Reply-To: X-Mailman-Approved-At: Mon, 17 May 2010 13:29:37 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 17 May 2010 13:30:03 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:36995 Archived-At: --001636284ca277c1e50486cd55df Content-Type: text/plain; charset=ISO-8859-1 Sorry, the "%d" thing was a bug. It looks like the let-binding error was introduced after my last checkout, though, so I guess that's deal with. This all raises the issue, though: what's the accepted replacement for frame-local variables, and why are they deprecated in the first place? My package has rather a few of them, and it's very useful to be able to use them like variables. I want to make them available for user customization, let-bind them, and use them without having to go through lots of manual frame-parameter rigamarole each time. I would rather not break any user customizations using these variables. So what should I do? On Mon, May 17, 2010 at 6:45 AM, Stefan Monnier wrote: > > I've run into a bug with GNU Emacs 24.0.50.1 (i686-pc-linux-gnu, GTK+ > > Version 2.16.1, checked out from the repo a week or so ago). Let-binding > > frame-local variables doesn't work: although the let-bound value is > correct > > within the `let', it doesn't get reset after the `let'. To reproduce, > just > > run http://gist.github.com/403208. > > I definitely cannot reproduce the behavior you show on that page: > The code stops at "(message "Before: %d" foo)" because foo has > value nil at that point which is incompatible with the %d format. > If I get rid of this bug, then I bump into the next error which is that > `let' raises "Frame-local vars cannot be let-bound". > > Note that frame-local variables have been deprecated since Emacs-22.2, > and I definitely intend to remove support for them (tho for Emacs-24.1, > the plan is currently only to remove support for let-binding them). > > > Stefan > --001636284ca277c1e50486cd55df Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Sorry, the "%d" thing was a bug. It looks like the let-binding er= ror was introduced after my last checkout, though, so I guess that's de= al with.

This all raises the issue, though: what's the accepted = replacement for frame-local variables, and why are they deprecated in the f= irst place? My package has rather a few of them, and it's very useful t= o be able to use them like variables. I want to make them available for use= r customization, let-bind them, and use them without having to go through l= ots of manual frame-parameter rigamarole each time. I would rather not brea= k any user customizations using these variables. So what should I do?

On Mon, May 17, 2010 at 6:45 AM, Stefan Monn= ier <monni= er@iro.umontreal.ca> wrote:
> I've run into a bug with GNU Emacs 24.0.50.1 (i686-pc-linux-gnu, G= TK+
> Version 2.16.1, checked out from the repo a week or so ago). Let-bindi= ng
> frame-local variables doesn't work: although the let-bound value i= s correct
> within the `let', it doesn't get reset after the `let'. To= reproduce, just
> run http:/= /gist.github.com/403208.

I definitely cannot reproduce the behavior you show on that page:
The code stops at "(message "Before: %d" foo)" because = foo has
value nil at that point which is incompatible with the %d format.
If I get rid of this bug, then I bump into the next error which is that
`let' raises "Frame-local vars cannot be let-bound".

Note that frame-local variables have been deprecated since Emacs-22.2,
and I definitely intend to remove support for them (tho for Emacs-24.1,
the plan is currently only to remove support for let-binding them).


=A0 =A0 =A0 =A0Stefan

--001636284ca277c1e50486cd55df--