From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Oleg Sivokon Newsgroups: gmane.emacs.bugs Subject: bug#24959: 26.0.50; cancel-timer: void-variable timer Date: Thu, 17 Nov 2016 21:24:49 +0200 Message-ID: References: <874m36sahw.fsf@localhost.localdomain> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: blaine.gmane.org 1479410777 12836 195.159.176.226 (17 Nov 2016 19:26:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 17 Nov 2016 19:26:17 +0000 (UTC) Cc: 24959@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Nov 17 20:26:12 2016 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 1c7SK4-0001ms-1J for geb-bug-gnu-emacs@m.gmane.org; Thu, 17 Nov 2016 20:26:12 +0100 Original-Received: from localhost ([::1]:32866 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c7SK7-0004VN-DG for geb-bug-gnu-emacs@m.gmane.org; Thu, 17 Nov 2016 14:26:15 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45207) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c7SJy-0004VH-6z for bug-gnu-emacs@gnu.org; Thu, 17 Nov 2016 14:26:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c7SJt-00050L-Ra for bug-gnu-emacs@gnu.org; Thu, 17 Nov 2016 14:26:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45606) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c7SJt-00050H-OQ for bug-gnu-emacs@gnu.org; Thu, 17 Nov 2016 14:26:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1c7SJt-00049I-JK for bug-gnu-emacs@gnu.org; Thu, 17 Nov 2016 14:26:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Oleg Sivokon Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 17 Nov 2016 19:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24959 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug Original-Received: via spool by 24959-submit@debbugs.gnu.org id=B24959.147941070415863 (code B ref 24959); Thu, 17 Nov 2016 19:26:01 +0000 Original-Received: (at 24959) by debbugs.gnu.org; 17 Nov 2016 19:25:04 +0000 Original-Received: from localhost ([127.0.0.1]:32771 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c7SIu-00047Q-Rw for submit@debbugs.gnu.org; Thu, 17 Nov 2016 14:25:04 -0500 Original-Received: from mail-qk0-f200.google.com ([209.85.220.200]:36252) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c7SIp-000479-Pp for 24959@debbugs.gnu.org; Thu, 17 Nov 2016 14:24:59 -0500 Original-Received: by mail-qk0-f200.google.com with SMTP id q128so196000811qkd.3 for <24959@debbugs.gnu.org>; Thu, 17 Nov 2016 11:24:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elastifile-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=CK9EBXVM3fnbxBk/JblN4v2UfMOhEyRO04FC/sUfyvY=; b=csjX24hjlKazrbhixsTlvL4O9XppLY0xO7YAlWl/jCIPP/j0RUepta4AF0gNZE2+Cv q/HxhZBcfKQzMeGOUWJObDu9RHuxr83WJUH/T9VWoMdySusWnEmiAYAfVmzZGLhyqx0g /5B2dcPEXmLSD4La/9DSx2X+e809VYL+f69bkD3Hq5VafRqtTG/Ox14Qk+R9ZBc5Iigy oozaM10aGezDY2NLOMiGPWVgYIXvesNgrjTaZTYTQ2yFl3SCVwEz0Ej3iw6rHvrXrjWV wxXlQCgV+yWuz5fBGO+KW2yZWFqKHiFcTBdd7NvjJVNYQ4aBtWewvVchPPrkdFTQIutb Mv0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=CK9EBXVM3fnbxBk/JblN4v2UfMOhEyRO04FC/sUfyvY=; b=ckCzML/9eRC3LA7ktndhy75h+lZfvKpvAP++0122GqPK9ctQp8JQHR2iOKCigiPolo 5RZbtTbTF1yiW1K0OsOC7L538kSIFV0JiEZ5E+zt45nje275W4n4fI8lOKEuYr01WGKF H802l2FAmQlX4JuUYsyb1rBfzclBaowwets9vkSg98xaiz4i0KctIfmgYIJNgD1NRXqq /Km+tZIfYlYJi2EXDAJHzTR4DkmtCjbH0BpKSgHIZ66b+cQKbdNlje8OY27H8xA/MIDd aB3a2V7XFw1bdE0U+FViHYZptCrvPYaZtIN+VPZVCPnVZZOhJcQZGex/vPRzKZvJXvmW 1vTw== X-Gm-Message-State: AKaTC03RUJ1bdLg7pD/0HdQ10+duLl3COkamqE8KxawkJ9FjABL84RbwoZe582mV7Dv6Ew9OGx7JBXBAO/RMJwH1 X-Received: by 10.200.46.112 with SMTP id s45mr3750725qta.244.1479410690387; Thu, 17 Nov 2016 11:24:50 -0800 (PST) Original-Received: by 10.237.33.34 with HTTP; Thu, 17 Nov 2016 11:24:49 -0800 (PST) In-Reply-To: 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:125806 Archived-At: Oh, I missed it was declared locally, my bad. Sure, I wonder how did it work earlier. Thanks for responses! On Thu, Nov 17, 2016 at 9:22 PM, Lars Ingebrigtsen wrote: > Oleg Sivokon writes: > >> (defun tesla-do-containers (command &optional need-refresh output) >> (let (temp-buffs timer) > > [...] > >> (setq timer >> (run-at-time >> 1 1 >> (lambda (output buffs) > > [...] > >> (cancel-timer timer)) > > This can't work. You're setting a locally bound variable, and then > you're running the lambda in a different context afterwards. > > Start using lexical bindings, and it'll work. > > In any case, this doesn't look like an Emacs bug, and I'm closing this > bug report. > > -- > (domestic pets only, the antidote for overdose, milk.) > bloggy blog: http://lars.ingebrigtsen.no