From: Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: 45056@debbugs.gnu.org
Cc: mah@everybody.org
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 [thread overview]
Message-ID: <xjfy2ic1196.fsf@sdf.org> (raw)
In-Reply-To: <87h7p05dax.fsf@everybody.org> (Mark A. Hershberger's message of "Sat, 05 Dec 2020 13:16:06 -0500")
"Mark A. Hershberger" via "Bug reports for GNU Emacs, the Swiss army
knife of text editors" <bug-gnu-emacs@gnu.org> 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 "REMOTE_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’s function definition is void: 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
next prev parent reply other threads:[~2020-12-05 19:49 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-05 18:16 bug#45056: 28.0.50; lexical-let doesn't work with returned closures on nativecomp Mark A. Hershberger via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-12-05 19:49 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2020-12-05 21:21 ` Mark A. Hershberger
2020-12-05 21:57 ` Mark A. Hershberger
2020-12-05 22:06 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-12-06 0:26 ` Mark A. Hershberger
2020-12-06 10:33 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-12-06 19:55 ` Mark A. Hershberger
2020-12-07 15:45 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-12-08 14:59 ` Mark A. Hershberger
2020-12-08 15:18 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-12-08 20:45 ` Mark A. Hershberger
2020-12-08 21:28 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-12-08 21:42 ` Mark A. Hershberger
2020-12-08 22:21 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-12-29 22:06 ` Mark A. Hershberger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xjfy2ic1196.fsf@sdf.org \
--to=bug-gnu-emacs@gnu.org \
--cc=45056@debbugs.gnu.org \
--cc=akrl@sdf.org \
--cc=mah@everybody.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).