all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* server-eval-and-print only returns non-nil values
@ 2011-07-03 13:38 Juanma Barranquero
  2011-07-03 13:57 ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 3+ messages in thread
From: Juanma Barranquero @ 2011-07-03 13:38 UTC (permalink / raw)
  To: Emacs developers

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)



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-07-04  0:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-03 13:38 server-eval-and-print only returns non-nil values Juanma Barranquero
2011-07-03 13:57 ` Lars Magne Ingebrigtsen
2011-07-04  0:52   ` Juanma Barranquero

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.