From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eduardo Ochs Newsgroups: gmane.emacs.help Subject: Re: Closures in Emacs and their usage scenarios. Date: Tue, 28 Sep 2021 04:11:44 -0300 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10705"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs To: Hongyi Zhao Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Sep 28 09:12:45 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mV7ID-0002Y3-9G for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 28 Sep 2021 09:12:45 +0200 Original-Received: from localhost ([::1]:56092 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mV7IC-0002Ta-8j for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 28 Sep 2021 03:12:44 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44936) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mV7HT-0002TI-V5 for help-gnu-emacs@gnu.org; Tue, 28 Sep 2021 03:11:59 -0400 Original-Received: from mail-pf1-x436.google.com ([2607:f8b0:4864:20::436]:44835) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mV7HS-0003yC-Cx for help-gnu-emacs@gnu.org; Tue, 28 Sep 2021 03:11:59 -0400 Original-Received: by mail-pf1-x436.google.com with SMTP id 145so18115442pfz.11 for ; Tue, 28 Sep 2021 00:11:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=3eA4UYwTR/dkdkju6f+JB8wJxmQUh2xsiQJ5PhJ40lA=; b=fVZEVxRKpxtzTT/SkvwwkBtTh+fJBfxL6jGprvjh/dFxRjv8em43HknMFDIhxgn74J Lxahy0StH219QL1KgkjTmAh4MhP6F0tAZAz4Ymfxlerbl1DphN6VrsSaVQqSp6m4PzT+ CeODB2PtQMSOpfSuL/21kJJ7WOD+ex5SNMb50BSUN/6nzdWoQjz9+wpOJCbE1AnUcU+3 y8/5fFbDqhwtT4s12JCI6gHNsSBN5OMmDKCrfXgUloeFdyNsd41o22rjTqq8s6Wh2UHQ 3Ez689CEKYd/LcVy+rccx3rIRrSs3HKrJZTCspUZG5zppny7OxZbkKeGxgVmdroTkAhi MBHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=3eA4UYwTR/dkdkju6f+JB8wJxmQUh2xsiQJ5PhJ40lA=; b=BXFBpSnzIIHAJfnavqF/oCV1J5gWfmKJhGKP+hvQj9ftKUWeJHC0zJOrrYEYv6ws5L v7TsUOIjDZs041QBjJCcGTOMKOiwhvZPeEuewgWYFc0b33GMKbw6vXeSzPx8uEcQP712 KZBgJEkJpY095snAvbYzlAmhrbAXhFogX5n+Tms6+5NyGh9hSrm3r9olwXlg4OiOAswl iCFold5K+nJt0giB3JFRShVQpEdZhlik2bDRSCrQO2zAXNUqNuxZcrmbYo61MgTIaWlP rtibzpkD2Q+I0c6Zkx0/9LauikWuGrWRpn44OObJTljeNHrJGDoS/gsX7PJuxYjhbmrb inRg== X-Gm-Message-State: AOAM532IJmWaCVWKKlhFjKQOfmxkra9CfJCXmQOCwFJ1e7pKVgELt7XI thftHN3fTk6jIZ3jidW+tRw8D8zF0CSZP7eVjd8= X-Google-Smtp-Source: ABdhPJySv/63n0Q+EzQqcobTEkCvoNKC2kiQBoYu9fHbWFTfX7+aagPoBhqOh9ERgIRZXM1PiCc7J5OnTUKI9vx3vfs= X-Received: by 2002:a63:b349:: with SMTP id x9mr3246484pgt.139.1632813116272; Tue, 28 Sep 2021 00:11:56 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::436; envelope-from=eduardoochs@gmail.com; helo=mail-pf1-x436.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:133327 Archived-At: Hi Hongyi, There are some snippets and links here: http://angg.twu.net/eev-intros/find-lexical-intro.html If your brain is wired like mine is then you will find the examples there - especially the ones in section 3 - great for getting a clear mental image of what closures are and how they are implemented in Emacs. You will need eev to run the examples. Cheers, Eduardo Ochs http://angg.twu.net/#eev On Mon, 27 Sept 2021 at 06:43, Hongyi Zhao wrote: > > I noticed the document on closure here [1] implemented in Emacs/Elisp currently. > But it's only a very concise and short introduction, and I want to > know more about the closures in Emacs and their usage scenarios. Any > helpful tips are welcome. > > [1] https://www.gnu.org/software/emacs/manual/html_node/elisp/Closures.html > > Regards > -- > Assoc. Prof. Hongyi Zhao > Theory and Simulation of Materials > Hebei Vocational University of Technology and Engineering > No. 473, Quannan West Street, Xindu District, Xingtai, Hebei province >