From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Emanuel Berg Newsgroups: gmane.emacs.help Subject: Re: run-with-timer does not display message Date: Sun, 20 Jul 2014 21:37:35 +0200 Organization: Aioe.org NNTP Server Message-ID: <87mwc3stxc.fsf@debian.uxu> References: <878unputvv.fsf@debian.uxu> 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 1405885227 15373 80.91.229.3 (20 Jul 2014 19:40:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 20 Jul 2014 19:40:27 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jul 20 21:40:21 2014 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 1X8wy4-0007yX-CW for geh-help-gnu-emacs@m.gmane.org; Sun, 20 Jul 2014 21:40:20 +0200 Original-Received: from localhost ([::1]:58903 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X8wy3-0004P6-Re for geh-help-gnu-emacs@m.gmane.org; Sun, 20 Jul 2014 15:40:19 -0400 Original-Path: usenet.stanford.edu!news.kjsl.com!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 36 Original-NNTP-Posting-Host: SIvZRMPqRkkTHAHL6NkRuw.user.speranza.aioe.org Original-X-Complaints-To: abuse@aioe.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-Notice: Filtered by postfilter v. 0.8.2 Cancel-Lock: sha1:ehD3jLuxje3yNK6Vsz2FLVJ/tiE= Mail-Copies-To: never Original-Xref: usenet.stanford.edu gnu.emacs.help:206564 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:98836 Archived-At: Sebastian Wiesner writes: >> 2. Interestingly, what I can see, my method, with >> backticks and commas, isn't that "lexical" - because >> then, there, the actual values are inserted? > > Note quite. The backquote is “static” in that it > captures the *value* of the variable at the time the > backquote is evaluated. “Lexical” binding captures > the *variable itself*. Yes, the backtick-comma is to downright hard-code it, although it is code, and not a human, who do the hard-coding... > This makes a difference if the variable is changed > after capturing. Considering the following example > ... > > As you can see, changing "i" *after* creating the > functions only affects the closure created by lexical > binding. The function created by the backquote is > left untouched. Yes, that is clear, but this example shows (to me) the difference between using hard-coded values and using variables (in general). That example looks all-fine to me. Are you saying, with dynamic scope, the `i' in the lambda wouldn't have been affected by the `setq'? But to me, your example is the way it should be, natural... Why then, would you want to use dynamic scope, and why is it the default? -- underground experts united