From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Manuel Giraud via Users list for the GNU Emacs text editor Newsgroups: gmane.emacs.help Subject: Thread and closure Date: Thu, 04 May 2023 14:02:40 +0200 Message-ID: <87sfcc9ue7.fsf@ledu-giraud.fr> Reply-To: Manuel Giraud Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2192"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) To: gnu-emacs-help@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu May 04 14:04:12 2023 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 1puXgx-0000Lp-GH for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 04 May 2023 14:04:11 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1puXfk-00084K-7C; Thu, 04 May 2023 08:02:56 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1puXfb-0007u8-04 for help-gnu-emacs@gnu.org; Thu, 04 May 2023 08:02:50 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1puXfa-0000Bh-N1 for help-gnu-emacs@gnu.org; Thu, 04 May 2023 08:02:46 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by fencepost.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1puXfa-0006L1-9w for gnu-emacs-help@gnu.org; Thu, 04 May 2023 08:02:46 -0400 Original-Received: from ledu-giraud.fr ([51.159.28.247]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1puXfY-0000AE-0D for gnu-emacs-help@gnu.org; Thu, 04 May 2023 08:02:46 -0400 DKIM-Signature: v=1; a=ed25519-sha256; c=simple/simple; s=ed25519; bh=01CKqkMf kdM+m7dGQTxre3gLtTEQUwsuim5r7fcAjDE=; h=date:subject:to:from; d=ledu-giraud.fr; b=E7Q2GJT3diW5inm6T3f6FWig2edDL/mG0tyL+MulbTQZ3Or+hK iHmtR6vnz5l80gf3J3QoLR9IagovhDztefAQ== DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=rsa; bh=01CKqkMfkdM+m7dG QTxre3gLtTEQUwsuim5r7fcAjDE=; h=date:subject:to:from; d=ledu-giraud.fr; b=e5DQGrP1AQXoezgk8j7YDkpryM2knUla3crQmhYRiBL3FuuqQ/ cW0R0NKaTJvPI/aJppw6+BH0V2N2H/BSAXjH6CNxdPRR6IWNCclK4l8HDZgrIh9KvUtpqN W8Yb+LCoMsHchz4r8eN89VBF/Sx+c17+Uc6A/TlBpFzhWnHZNbDk3Z5lwvXf8F4wAYST9G f6VB91rsAvcj5V9Ij88J1YHOPGxbuD0cnBfB7AcCNSURhhQL7eR8uCfyQ7Jwz6R9bJQ3Mq x9lzhn6FOjftPNrPoxbcBcidPhpbGv3YHYLoynTY9AXc4OsDNRar4eNy9fyBjl4Y0VjJau fXrB0Ma15Q+w== Original-Received: from computer ( [10.1.1.1]) by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id 5e52bfe2 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Thu, 4 May 2023 14:02:40 +0200 (CEST) Received-SPF: pass client-ip=51.159.28.247; envelope-from=manuel@ledu-giraud.fr; helo=ledu-giraud.fr 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, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 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-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:143504 Archived-At: Hi, Is it possible in Emacs to have lisp threads to works with closures? With the following example, 'M-x closure' displays a message but 'M-x threaded-closure' does not: --8<---------------cut here---------------start------------->8--- (defun closure () (interactive) (let ((my-message "Hello world")) (funcall #'(lambda () (message "%s" my-message))))) (defun threaded-closure () (interactive) (let ((my-message "Hello world")) (make-thread #'(lambda () (message "%s" my-message))))) --8<---------------cut here---------------end--------------->8--- Best regards, -- Manuel Giraud