all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Johan Bockgård" <bojohan@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: "Clément Pit--Claudel" <clement.pit@gmail.com>, emacs-devel@gnu.org
Subject: Re: Is emacsclient --eval broken?
Date: Mon, 15 Aug 2016 21:08:50 +0200	[thread overview]
Message-ID: <87oa4t97el.fsf@gnu.org> (raw)
In-Reply-To: <83h9axkj8z.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 06 Aug 2016 18:30:20 +0300")

Eli Zaretskii <eliz@gnu.org> writes:

> There must be something that the client cannot interpret, or maybe we
> are not prepared to deal with strings that span more than one packet
> returned by recv?

The function in server.el that splits the reply has a bug:


diff --git a/lisp/server.el b/lisp/server.el
index 59fd973..650323d 100644
--- a/lisp/server.el
+++ b/lisp/server.el
@@ -782,7 +782,7 @@ (defun server-reply-print (qtext proc)
       ;; We have to split the string
       (setq part (substring qtext 0 (- server-msg-size (length prefix) 1)))
       ;; Don't split in the middle of a quote sequence
-      (if (string-match "\\(^\\|[^&]\\)\\(&&\\)+$" part)
+      (if (string-match "\\(^\\|[^&]\\)&\\(&&\\)*$" part)
 	  ;; There is an uneven number of & at the end
 	  (setq part (substring part 0 -1)))
       (setq qtext (substring qtext (length part)))




  reply	other threads:[~2016-08-15 19:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-03 15:32 Is emacsclient --eval broken? Clément Pit--Claudel
2016-08-06 10:09 ` Eli Zaretskii
2016-08-06 11:17   ` Johan Bockgård
2016-08-06 11:21     ` Eli Zaretskii
2016-08-06 15:23       ` Clément Pit--Claudel
2016-08-06 15:30         ` Eli Zaretskii
2016-08-15 19:08           ` Johan Bockgård [this message]
2016-08-18 19:39             ` Johan Bockgård
2016-08-19  7:04               ` Eli Zaretskii
2016-08-22 15:25               ` Clément Pit--Claudel

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87oa4t97el.fsf@gnu.org \
    --to=bojohan@gnu.org \
    --cc=clement.pit@gmail.com \
    --cc=eliz@gnu.org \
    --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 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.