I don't really understand your concern. emacsclient
's --eval/-e
always eval one expression and print the result to stdout, if you don't care about the result, simply ignore it or redirect it to /dev/null
. Anyway, it's easy to stop printing, you can use
(define-advice server-eval-and-print (:filter-args (args) no-print)
(list (car args) nil))
to advice server-eval-and-print
to just eval and bypass print. It should be easy to know how it works by taking a look at the function server-eval-and-print
in source code.
If you don't have define-advice
, which was added in Emacs 25.1, use this instead:
(defun server-eval-and-print@no-print (args)
(list (car args) nil))
(advice-add 'server-eval-and-print :filter-args
#'server-eval-and-print@no-print)
STDERR
Instead be acceptable? – Melioratus Nov 29 '16 at 5:50