all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "T.V Raman" <raman@google.com>
To: Daniel Mendler <mail@daniel-mendler.de>
Cc: Stefan Monnier <monnier@iro.umontreal.ca>,
	 "emacs-devel@gnu.org" <emacs-devel@gnu.org>
Subject: Re: emacsclient in elisp
Date: Wed, 19 May 2021 07:55:34 -0700	[thread overview]
Message-ID: <p91cztm4vtl.fsf@google.com> (raw)
In-Reply-To: <6fed43bb-d880-bcd5-6f6f-004b6182e539@daniel-mendler.de> (Daniel Mendler's message of "Wed, 19 May 2021 16:13:11 +0200")

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=gb18030, Size: 1997 bytes --]

Daniel Mendler <mail@daniel-mendler.de> writes:


take a look at epc --- > On 5/19/21 3:41 PM, Stefan Monnier wrote:
>> No.  I think the reason goes as follows: for the intended purpose of
>> `emacsclient`, the time needed to start Emacs itself makes an ELisp
>> implementation useless...
>
> Of course.
>
>> and for other purposes you can generally have
>> a separate server process per client process and it's just as easy if
>> not easier to then use `start-process` and a ad-hoc communication
>> protocol...
>
> When I a start an Emacs process in the background, which IPC protocol do
> you recommend to communicate with it? Should I start a separate custom
> TCP server on the daemon and then communicate with it using a TCP client
> (inventing my own protocol and with the implied security issues)?
>
> I cannot start the Emacs in the background and communicate with it by
> sending/receiving data via stdin/stdout, since Emacs does not offer an
> asynchronous facility to read from stdin. Asynchronous reading would be
> needed on the daemon. If I am calling `read-from-minibuffer` there it
> reads from stdin but blocks the process. Is this correct?
>
> For my use case it is necessary that I start an Emacs process in the
> background, which stays alive for some time, maintaining some state.
> Then this process should be controlled asynchronously.
>
> There exists the async package, which starts a new Emacs process per
> future if I understood correctly. This is not sufficient for what I am
> trying.
>
>> rather than having to reuse the protocol used for `emacsclient`
>> (which is neither very convenient nor very extensible).
>
> I am not sure I agree. I can send sexps and return sexps which I
> consider a sufficiently extensible protocol. But from what I've seen the
> client is buggy - it is for example not possible to send strings
> containing \0 bytes.
>
> Daniel
>

-- 

Thanks,

--Raman
7©4 Id: kg:/m/0285kf1  •0Ü8



  reply	other threads:[~2021-05-19 14:55 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-19 12:50 emacsclient in elisp Daniel Mendler
2021-05-19 13:41 ` Stefan Monnier
2021-05-19 14:13   ` Daniel Mendler
2021-05-19 14:55     ` T.V Raman [this message]
2021-05-20 14:31     ` Jean Louis
2021-05-20 15:10       ` Eli Zaretskii
2021-05-20 15:52         ` Daniel Mendler
2021-05-20 16:00           ` Eli Zaretskii
2021-05-20 16:40             ` Stefan Monnier
2021-05-20 17:49               ` Daniel Mendler
2021-05-20 18:59                 ` Eli Zaretskii
2021-05-20 19:10                   ` Daniel Mendler
2021-05-20 19:45                     ` Eli Zaretskii
2021-05-20 20:54                       ` Daniel Mendler
2021-05-21  6:16                         ` Eli Zaretskii
2021-05-21 10:33                           ` Daniel Mendler
2021-05-21 10:44                             ` Eli Zaretskii
2021-05-21 16:25                             ` Jean Louis
2021-05-21  6:38                         ` Jean Louis
2021-05-21  6:36                       ` Jean Louis
2021-05-21  7:10                         ` Eli Zaretskii
2021-05-20 21:21                   ` Stefan Monnier
2021-05-21  6:18                     ` Eli Zaretskii
2021-05-21 10:34                       ` Eli Zaretskii
2021-05-21 14:55                         ` Stefan Monnier
2021-05-21 15:08                           ` Eli Zaretskii
2021-05-21 15:33                             ` Stefan Monnier
2021-05-21 14:51                       ` Stefan Monnier
2021-05-21 15:06                         ` Eli Zaretskii
2021-05-21 15:29                           ` Stefan Monnier
2021-05-21 18:36                             ` Eli Zaretskii
2021-05-21 21:51                               ` Stefan Monnier
2021-05-22  6:11                                 ` Eli Zaretskii
2021-05-22 10:09                                   ` Daniel Mendler
2021-05-22 10:19                                     ` Eli Zaretskii
2021-05-22 10:29                                       ` Eli Zaretskii
2021-05-22 11:49                                         ` Daniel Mendler
2021-05-22 12:26                                           ` Eli Zaretskii
2021-05-22 13:55                                             ` Stefan Monnier
2021-05-22 14:08                                               ` Eli Zaretskii
2021-05-22 14:31                                                 ` Stefan Monnier
2021-05-21 16:10                         ` Daniel Mendler
2021-05-21 16:36                         ` Jean Louis
2021-05-21  6:27               ` Jean Louis
2021-05-21  7:07                 ` Eli Zaretskii
2021-05-21  7:25                   ` Jean Louis
2021-05-21  6:21         ` Jean Louis
2021-05-21  7:08           ` Eli Zaretskii
2021-05-21  7:26             ` Jean Louis
2021-05-21 10:31               ` Eli Zaretskii
2021-05-21 16:07                 ` Jean Louis
2021-05-21 17:41                   ` Eli Zaretskii
2021-05-21 17:43                   ` Eli Zaretskii
2021-05-21 22:05                     ` Jean Louis
2021-05-22  6:12                       ` Eli Zaretskii
2021-05-19 21:56 ` Daniel Mendler
2021-05-19 22:43   ` chad
2021-05-20  8:42     ` Daniel Mendler
2021-05-20 15:59   ` Arthur Miller
2021-05-20 17:45     ` Daniel Mendler
2021-05-21 19:52       ` Arthur Miller

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=p91cztm4vtl.fsf@google.com \
    --to=raman@google.com \
    --cc=emacs-devel@gnu.org \
    --cc=mail@daniel-mendler.de \
    --cc=monnier@iro.umontreal.ca \
    /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.