From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#45056: 28.0.50; lexical-let doesn't work with returned closures on nativecomp Date: Sat, 05 Dec 2020 19:49:57 +0000 Message-ID: References: <87h7p05dax.fsf@everybody.org> Reply-To: Andrea Corallo Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1968"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: mah@everybody.org To: 45056@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 05 20:51:29 2020 Return-path: Envelope-to: geb-bug-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 1kldab-0000Oe-Do for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 05 Dec 2020 20:51:29 +0100 Original-Received: from localhost ([::1]:46448 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kldaa-0003N1-Fr for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 05 Dec 2020 14:51:28 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57898) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kldaA-0003MD-K4 for bug-gnu-emacs@gnu.org; Sat, 05 Dec 2020 14:51:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36727) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kldaA-0005D3-3E for bug-gnu-emacs@gnu.org; Sat, 05 Dec 2020 14:51:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kldaA-0002mC-37 for bug-gnu-emacs@gnu.org; Sat, 05 Dec 2020 14:51:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 05 Dec 2020 19:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45056 X-GNU-PR-Package: emacs X-Debbugs-Original-To: "Mark A. Hershberger" via "Bug reports for GNU Emacs, the Swiss army knife of text editors" X-Debbugs-Original-Cc: "Mark A. Hershberger" , 45056@debbugs.gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.160719781510610 (code B ref -1); Sat, 05 Dec 2020 19:51:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 5 Dec 2020 19:50:15 +0000 Original-Received: from localhost ([127.0.0.1]:48273 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kldZP-0002l4-IP for submit@debbugs.gnu.org; Sat, 05 Dec 2020 14:50:15 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:39902) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kldZO-0002kw-27 for submit@debbugs.gnu.org; Sat, 05 Dec 2020 14:50:14 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57582) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kldZN-0002wc-NV for bug-gnu-emacs@gnu.org; Sat, 05 Dec 2020 14:50:13 -0500 Original-Received: from mx.sdf.org ([205.166.94.24]:62484) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kldZL-0004jx-Kx for bug-gnu-emacs@gnu.org; Sat, 05 Dec 2020 14:50:13 -0500 Original-Received: from mab (ma.sdf.org [205.166.94.33]) by mx.sdf.org (8.15.2/8.14.5) with ESMTP id 0B5Jnvb4011330; Sat, 5 Dec 2020 19:49:57 GMT In-Reply-To: <87h7p05dax.fsf@everybody.org> (Mark A. Hershberger's message of "Sat, 05 Dec 2020 13:16:06 -0500") Received-SPF: pass client-ip=205.166.94.24; envelope-from=akrl@sdf.org; helo=mx.sdf.org X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:195049 Archived-At: "Mark A. Hershberger" via "Bug reports for GNU Emacs, the Swiss army knife of text editors" writes: > I have a function (mah/firestarter-sentinel) that is called from > make-process. The make-process call looks like this: > > (make-process :name "rsync" > :buffer rsync-buff > :stderr rsync-buff > :command (apply 'list "rsync" args) > :sentinel (mah/firestarter-sentinel (getenv "RE= MOTE_HOST") post-cmd)) > > mah/firestarter-sentinal creates a lambda function and uses lexical-let > to make its parameters (host and post-cmd) available to the lambda > function that it returns to act as a sentinal. > > Using eval-last-sexp on mah/firestarter-sentinal works, but loading the > function from a compiled file does not and results in the message: > > mah/firestarter-sentinel: Symbol=E2=80=99s function definition is voi= d: host > > Here is the function: > > (defun mah/firestarter-sentinel (host post-cmd) > "Sentinel function that will run the POST-CMD on HOST." > (lexical-let ((post-cmd post-cmd) > (host host) > (rsync-buff (get-buffer-create mah/rsync-buff-name))) > (lambda (proc event-type) > (message (concat "post cmd: " post-cmd "\nevent: " event-type)) > (cond ((string-equal event-type "finished\n") > (if post-cmd > (progn (message (concat "rsync finished, running " > post-cmd)) > (mah/firestarter-do-post host post-cmd rsync-buff= )) > (message "rsync finshed"))) > (t (if post-cmd > (progn (message (concat "rsync didn't finish normally, " > "running anyway. Check " > mah/rsync-buff-name)) > (mah/firestarter-do-post host post-cmd rsync-buff)) > (message "rsync finshed with errors"))))))) Hi Mark, have you checked if this behavior is common to the non native build? Andrea