From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?utf-8?Q?I=C3=B1igo?= Serna Newsgroups: gmane.emacs.help Subject: Re: How to use a variable from outer scope in the success function of a request call? Date: Sat, 29 Aug 2015 10:34:26 +0200 Message-ID: <87pp26ebn1.fsf@inigo.katxi.org> References: <877foezg4h.fsf@kuiper.lan.informatimago.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1440837291 5971 80.91.229.3 (29 Aug 2015 08:34:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 29 Aug 2015 08:34:51 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Aug 29 10:34:47 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZVbb2-0004SQ-MY for geh-help-gnu-emacs@m.gmane.org; Sat, 29 Aug 2015 10:34:44 +0200 Original-Received: from localhost ([::1]:51561 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZVbb1-0008SN-5Z for geh-help-gnu-emacs@m.gmane.org; Sat, 29 Aug 2015 04:34:43 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33557) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZVbaq-0008SH-Mp for help-gnu-emacs@gnu.org; Sat, 29 Aug 2015 04:34:33 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZVban-0001Dw-Gb for help-gnu-emacs@gnu.org; Sat, 29 Aug 2015 04:34:32 -0400 Original-Received: from mail-wi0-x232.google.com ([2a00:1450:400c:c05::232]:38721) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZVban-0001Dp-9E for help-gnu-emacs@gnu.org; Sat, 29 Aug 2015 04:34:29 -0400 Original-Received: by wifs6 with SMTP id s6so3049728wif.1 for ; Sat, 29 Aug 2015 01:34:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:from:to:subject:in-reply-to:date:message-id:mime-version :content-type:content-transfer-encoding; bh=VO+CIMJUei9sDApZmVryytc0204KbqKuZoq67LjDc1I=; b=LIUBUuCdwl3bLCX3cgEcJh77NzpChawxYVeZ4+g9r1bvOdT7Ow6nANWeYaPiqVyI+d kdjlqFTAqGVavVBf5JjBHkTgGOTRe3xOYKhSVAaotOfkTvxasY/bTCUwBIWpag5PjgTR niEFc875cKt9f7/yZOPLXQVJCi/cN6+PmISW3AHJZ6frmMGc/2trWBzNflx8F+NDIP50 liwKhor0l1eXOtrBMRHQsnI6Yi5U+KEWh3G+hf2GB+qt2hvLARxizm83yob/cuod1uHy YzfQA6/kh0SAhZCnoWANfvGJyEJ5U62yUMU10XPFuUf6hKS2JAw1UGD8Tw0OaZ5uI60N FbHA== X-Received: by 10.194.87.4 with SMTP id t4mr17141267wjz.84.1440837268713; Sat, 29 Aug 2015 01:34:28 -0700 (PDT) Original-Received: from inigo.katxi.org (62.57.74.108.dyn.user.ono.com. [62.57.74.108]) by smtp.gmail.com with ESMTPSA id gt10sm7511889wib.20.2015.08.29.01.34.27 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 29 Aug 2015 01:34:27 -0700 (PDT) In-reply-to: <877foezg4h.fsf@kuiper.lan.informatimago.com> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c05::232 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 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-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:106917 Archived-At: Hi, Pascal J. Bourguignon writes: >> ; I can't use a variable inside the success lambda function of a web request call. >> ; As this is difficult to explain I'll show some things I've tried. > > Add: > (setf lexical-binding t) > before fn1, and: > ;; -*- mode:emacs-lis;lexical-binding:t -*- > as the first line of all your .el files. Thanks a lot Pascal, that makes fn1 `work'! And to learn more myself, do you have any hint why `fn3' or `fn4' don't work and how to make it work? Thanks, IƱigo Serna