Just a quick question,
Can emacsclient evaluate/run Elisp code from a given file, or even better, from stdin?
Emacs Stack Exchange is a question and answer site for those using, extending or developing Emacs. It only takes a minute to sign up.
Sign up to join this communityJust a quick question,
Can emacsclient evaluate/run Elisp code from a given file, or even better, from stdin?
Emacsclient has the --eval
(same as -e
) option, so
emacsclient --eval '(load "my-file.el")'
will read and evaluate the file "my-file.el"
.
I don't think Emacs has access to the emacsclient
's stdin, but you can do something like
cat <<EOF > my-file.el
and let user enter the lisp form terminated by EOF
on a otherwise blank like, then pass "my-file.el"
to load
and remove the file.