From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Jean-Christophe Helary Newsgroups: gmane.emacs.help Subject: Re: local binding, too local... Date: Sat, 8 Dec 2018 23:45:32 +0900 Message-ID: <5DC58693-6BE0-48E9-AC20-9C6D99E069E7@gmail.com> References: <0583DE39-42E2-4D05-97F6-3D709DBC73FE@gmail.com> <30D13139-2EAB-4195-9DFD-4832C092B5A1@gmail.com> <20181208080217.GA4367@tuxteam.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 (Mac OS X Mail 12.1 \(3445.101.1\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1544280253 9203 195.159.176.226 (8 Dec 2018 14:44:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 8 Dec 2018 14:44:13 +0000 (UTC) To: help-gnu-emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Dec 08 15:44:08 2018 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 1gVdps-0002Ao-3x for geh-help-gnu-emacs@m.gmane.org; Sat, 08 Dec 2018 15:44:04 +0100 Original-Received: from localhost ([::1]:51117 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gVdry-00051E-SP for geh-help-gnu-emacs@m.gmane.org; Sat, 08 Dec 2018 09:46:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52155) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gVdrT-00050t-JS for help-gnu-emacs@gnu.org; Sat, 08 Dec 2018 09:45:44 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gVdrN-0003rg-KA for help-gnu-emacs@gnu.org; Sat, 08 Dec 2018 09:45:43 -0500 Original-Received: from mail-pg1-x531.google.com ([2607:f8b0:4864:20::531]:42886) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gVdrN-0003rX-DB for help-gnu-emacs@gnu.org; Sat, 08 Dec 2018 09:45:37 -0500 Original-Received: by mail-pg1-x531.google.com with SMTP id d72so2977855pga.9 for ; Sat, 08 Dec 2018 06:45:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:mime-version:subject:date:references:to:in-reply-to:message-id; bh=Wfq/BcknfHSCVmSgXTM/NQrLGOxCYtmpZNSXMOavBDo=; b=bdG7cl2w1JufRtWCEneM6qlJq2HN/fqWtQFGOc99mNy34uX888tmF44hED2DaRNAOQ 1Kor4KLqFQFoMHyfNi4/CsKQUwMbkCF6LZ0Kb1R8j+fLZIwCSw3dKHnm/9IRuQwO/ime YQUtLDnlLnzKvK8H9ncAjMpltl7qdAhblh+44QpwBjf/nMpo51B9MjKs9vAUhj26lI7R kPTqCUn1lDhHU8CqEd6Np8I0994pgwF9YS6CRUvZbmhhIzwWOpfDjhc8ia7odP6SqX06 zWzqD6SF4iIH8c/TIRiFYE+zLqu9DcM2Jf8DsFVl0sN3G9I5sTCID4+lF7JBk9mfG6IC XRBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:mime-version:subject:date:references:to :in-reply-to:message-id; bh=Wfq/BcknfHSCVmSgXTM/NQrLGOxCYtmpZNSXMOavBDo=; b=YLBtb/JkIWDpn+EGIPA5JdydBtOuOvl9TagaoCgm1fPcaV/DLG2yNNsPySj9wjlJHx ezaLYmm1OSSV8KaGg4gSUJd0n5Z9VDxSPfbIrrL9/DCps1/tvytHZErvk4M0A1Vw81Jn 4IdXjPlgOGYzrON21xY3SFFSnYyi4GdrFl/2B9UL8OXReQ6cpfbiUNm4Kk/fWH/uL/To OriVlmAvmSMBMa1xAkoZ5UpcLhzJkMu63bwUWXOxHhtYCWobQe1dBtVOilkuvxho9tfX XXAiBOZhLy5TXsKCK5QZBP+m4+CiXLNSw2H17PN8U+b4PRvNMqLw6hszQ9S1d4XCcXhE Y5VA== X-Gm-Message-State: AA+aEWavusGZgxez2PqCwWn+4dWNCsAMiyoBugmcWRclbhroeu9n6t2t CTCyhCbrdTIgwHBgs7WHst0ujPbT X-Google-Smtp-Source: AFSGD/XgTylW2EFE2n+u2g/sCkaurcLiUIAh55P+DPgQf9JK47oWhY277JKiByVa6PiOxiiEvZXe3w== X-Received: by 2002:a63:9b11:: with SMTP id r17mr5391342pgd.416.1544280335722; Sat, 08 Dec 2018 06:45:35 -0800 (PST) Original-Received: from [192.168.1.11] (pl16832.ag0304.nttpc.ne.jp. [128.53.251.192]) by smtp.gmail.com with ESMTPSA id w128sm9623494pfw.79.2018.12.08.06.45.34 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 08 Dec 2018 06:45:34 -0800 (PST) In-Reply-To: <20181208080217.GA4367@tuxteam.de> X-Mailer: Apple Mail (2.3445.101.1) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::531 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 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:118917 Archived-At: Thank you Tomas. So can you say that "binding" is like "creating" a variable ? While assigning is just putting a value in that variable ? I remember in my math classes, when we were using x and y, etc. we were = binding x and y, right ? And then when we had values for x and y we were = assigning values. Is that correct ? Jean-Christophe=20 > On Dec 8, 2018, at 17:02, wrote: >=20 > On Sat, Dec 08, 2018 at 04:37:59PM +0900, Jean-Christophe Helary = wrote: >=20 > [...] >=20 >> I'm not sure I understand the difference yet between binding and = assigning yet. >=20 > Binding: you associate a name (strictly: a symbol) to a place where to > store something (a "variable"). >=20 > Assigning: you change the content (the thing stored in) an existing = variable. >=20 > Often you get those two steps in one package, and that's why the = difference > isn't so clear. >=20 > Consider: >=20 >=20 > (let ((foo 12)) ; bind a variable to the symbol foo > ... > (... ; some sub-scope, e.g. another let > ; let's assume it does *not* bind foo > (setq foo 13) ; Now the foo is bound to the same variable, > ; but that contains now 13 > )) >=20 > Things are a bit confusing, because (let ((foo 12)) ...) binds foo = *and* > assigns 12. But you could just use (let (foo) ...) in its pure form >=20 > Cheers > -- t Jean-Christophe Helary ----------------------------------------------- http://mac4translators.blogspot.com @brandelune