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:19:05 +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 1479410423 31506 195.159.176.226 (17 Nov 2016 19:20:23 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 17 Nov 2016 19:20:23 +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:20:14 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 1c7SEH-00069i-H2 for geb-bug-gnu-emacs@m.gmane.org; Thu, 17 Nov 2016 20:20:13 +0100 Original-Received: from localhost ([::1]:32853 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c7SEJ-0003jM-CB for geb-bug-gnu-emacs@m.gmane.org; Thu, 17 Nov 2016 14:20:15 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43683) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c7SEA-0003el-I8 for bug-gnu-emacs@gnu.org; Thu, 17 Nov 2016 14:20:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c7SE6-0003aT-5D for bug-gnu-emacs@gnu.org; Thu, 17 Nov 2016 14:20:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45591) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c7SE6-0003aP-0M for bug-gnu-emacs@gnu.org; Thu, 17 Nov 2016 14:20:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1c7SE5-0003y5-Rr for bug-gnu-emacs@gnu.org; Thu, 17 Nov 2016 14:20: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:20: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: Original-Received: via spool by 24959-submit@debbugs.gnu.org id=B24959.147941036015186 (code B ref 24959); Thu, 17 Nov 2016 19:20:01 +0000 Original-Received: (at 24959) by debbugs.gnu.org; 17 Nov 2016 19:19:20 +0000 Original-Received: from localhost ([127.0.0.1]:60990 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c7SDM-0003wo-ID for submit@debbugs.gnu.org; Thu, 17 Nov 2016 14:19:20 -0500 Original-Received: from mail-qk0-f198.google.com ([209.85.220.198]:35678) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c7SDH-0003wU-67 for 24959@debbugs.gnu.org; Thu, 17 Nov 2016 14:19:14 -0500 Original-Received: by mail-qk0-f198.google.com with SMTP id g193so195274693qke.2 for <24959@debbugs.gnu.org>; Thu, 17 Nov 2016 11:19:11 -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=+BZWD8qOSejTexItzt5oQ+a8dOnlbUBELpXJvOeaRww=; b=2OB7xSnMTKril3Jecixr487vnXb6icBGD815LiQGST1NjXtp1tIOde7zSiOOPBl5uh hPChDJZZBmT2PqAuLClhe9/ya21wY2H2ahwjP/i6j2SbE4Y3v8pMXKVRogE68GG+GmIg TEzPV5h30pf8OwWOZXj0YDwF1b2XmK7qrVfKDi7js7+AnaG20ML0QJIwGT0iN6+zzyBi O/BaeeHS8MKNMbqTcH6V2yRzkM+DpCpgt7c/5Z3SiJKMt6AfhccTuQcYIi9Ra8uWxfhc t7jaQuSNsasYSsFyr6U8XWortkzM0r/KOmj9lM3fIAIsiQQAjKA4PW46b656VHOOh6p9 mTyA== 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=+BZWD8qOSejTexItzt5oQ+a8dOnlbUBELpXJvOeaRww=; b=jYRP64RUuUw1Je+CNkFEaiyQR5JvgKRVX/1w705fLWhXktJLPWr9XZ9YLrgpw0+Jx4 oYTVDWWM1DX3elexRW2TtWkamgzhIGOfqiBLdSau71m/wQoA4KbbnVoqaHBAHhYpVhq6 k55GCoZEQO4hamj1/+EUBfITuPsdUgujOy1tSCVFmBsHW6vGJxjcKYqVPy3B2lVRLHXG NOQlRaOtP74fWTGwD+J5wmTxWL7EbKknEtHGrSgQjGn6Z0rsnmOk0g/p2Cz7w3qgdJO0 a360fJ/vqT9QSqb6jbIkM5CTiRlOX4uiA89NeyCt4QL2tIClHBMdo1+zae2QsLqmlM1f zqZA== X-Gm-Message-State: AKaTC03wz173C+KAj/xrWnJvWPwiwvBqHxRKdHTrzTGIuslm9Asl/oySIVOn0R6ifq4P7Lpa9jdhdHzsJfFpVFi5 X-Received: by 10.233.220.71 with SMTP id q68mr5358071qkf.153.1479410345798; Thu, 17 Nov 2016 11:19:05 -0800 (PST) Original-Received: by 10.237.33.34 with HTTP; Thu, 17 Nov 2016 11:19:05 -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:125804 Archived-At: But, before I find one, here's the original code that caused the problem: (defun tesla-do-containers (command &optional need-refresh output) (let (temp-buffs timer) (unwind-protect (cl-loop for container being the hash-value of tesla-makred-containers for buf = (get-buffer-create (generate-new-buffer-name "*tesla-temp*")) do (with-current-buffer buf (set (make-local-variable 'container) (format "%s:%s" (docker-container-loader container) (docker-container-names container)))) (funcall command container buf) (push buf temp-buffs)) (when output (setq timer (run-at-time 1 1 (lambda (output buffs) (condition-case err (unless (cl-loop for buf in buffs thereis (get-buffer-process buf)) (cl-loop for buf in buffs for container = (with-current-buffer buf container) for contents = (with-current-buffer buf (buffer-substring (point-min) (point-max))) do (kill-buffer buf) (with-current-buffer output (insert (format "\n\n===== %s =====\n\n" container)) (insert contents))) (cancel-timer timer)) (error (cl-loop for buf in buffs when (buffer-live-p buf) do (kill-buffer buf)) (cancel-timer timer)))) output temp-buffs))) (when need-refresh (tesla-list-containers))))) On Thu, Nov 17, 2016 at 9:14 PM, Oleg Sivokon wrote: > Lars, > I'll need to experiement with this then. My hunch is that when this > happens inside condition-case, the things don't work exactly the same. > I'll try to come up with a minimal example for the problem. > > On Thu, Nov 17, 2016 at 8:09 PM, Lars Ingebrigtsen wrote: >> Oleg Sivokon writes: >> >>> No, I don't use lexical bindings in this code. But, my point is that >>> the behavior of setq used to be to make variable special (i.e. >>> universaly accessible, like global, except it can be let-bound >>> temporarily), which it doesn't seem to do anymore. >> >> It does for me. >> >> [...] >> >>>>> (setq timer (run-at-time 1 1 (lambda () (cancel-timer timer))) >> >> You've forgotten an end parentheses there. If I add one and eval the >> form, it works fine for me. >> >> -- >> (domestic pets only, the antidote for overdose, milk.) >> bloggy blog: http://lars.ingebrigtsen.no