From: Juanma Barranquero <lekktu@gmail.com>
To: Emacs developers <emacs-devel@gnu.org>
Subject: server-eval-and-print only returns non-nil values
Date: Sun, 3 Jul 2011 15:38:09 +0200 [thread overview]
Message-ID: <CAAeL0SS70xdZKU68cke8Mr_D5OT6p2v34E2eJXCB9Fw9k3Z-rg@mail.gmail.com> (raw)
Is there any reason why server-eval-and-print only returns non-nil values?
C:\> emacsclient -e "(file-exists-p \"C:/\")"
t
C:> emacsclient -e "(file-exists-p \"Z:/\")"
C:>
If not, I'd like to fix it with the trivial patch below.
Juanma
2011-07-03 Juanma Barranquero <lekktu@gmail.com>
* server.el (server-eval-and-print): Return any result, even nil.
=== modified file 'lisp/server.el'
--- lisp/server.el 2011-06-25 18:05:48 +0000
+++ lisp/server.el 2011-07-03 13:33:25 +0000
@@ -679,7 +679,7 @@
(defun server-eval-and-print (expr proc)
"Eval EXPR and send the result back to client PROC."
(let ((v (eval (car (read-from-string expr)))))
- (when (and v proc)
+ (when proc
(with-temp-buffer
(let ((standard-output (current-buffer)))
(pp v)
next reply other threads:[~2011-07-03 13:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-03 13:38 Juanma Barranquero [this message]
2011-07-03 13:57 ` server-eval-and-print only returns non-nil values Lars Magne Ingebrigtsen
2011-07-04 0:52 ` Juanma Barranquero
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=CAAeL0SS70xdZKU68cke8Mr_D5OT6p2v34E2eJXCB9Fw9k3Z-rg@mail.gmail.com \
--to=lekktu@gmail.com \
--cc=emacs-devel@gnu.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).