Skip to content

End Emacs server requests with a space like emacsclient - #98

Open
conornash wants to merge 1 commit into
lambda-symbolics:masterfrom
conornash:emacs-server-request-space
Open

conornash wants to merge 1 commit into
lambda-symbolics:masterfrom
conornash:emacs-server-request-space

Conversation

@conornash

Copy link
Copy Markdown

I'm running a development build of Emacs (32.0.50), and the new emacs: tools couldn't talk to it: its server insists that each request ends with a space, the way emacsclient sends them. I haven't checked whether released versions of Emacs are this strict, so this may only matter to people on recent builds. The change just makes Autolith's requests match what emacsclient itself sends.

The below is the agent explanation of what this PR does:

emacs-server-evaluate wrote -eval QUOTED followed directly by a newline. emacsclient ends every argument with a space, and Emacs 32.0.50's server-process-filter asserts it (server.el line 1263: "emacsclient request did not end in SPC"), so every emacs: resource read and emacs.* tool call failed against that Emacs, as did test-emacs-tools-real-daemon.

The request now ends with a space before the newline, and test-emacs-server-fake-replies expects that exact line.

Verified against a live Emacs 32.0.50 server: (+ 1 2) returns 3 and (concat "λ " emacs-version) returns "λ 32.0.50"; before the change the real-daemon test failed with the SPC assertion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant