emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: emacsclient proposal


From: David Kastrup
Subject: Re: emacsclient proposal
Date: Thu, 19 Jul 2007 19:58:05 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.51 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>> I think I would very much like to have an emacsclient process be
>> exposed to Emacs as an Emacsclient process.
>
> Based on my memory of the code, it shouldn't be too hard to do.
> Basically, define a new arg (not -f because that's used already)

Uh, -f was a typo.  I really meant --eval in my example.

> and a way to represent it in the text passed to Emacs, and then have
> it specify a function which will receive the process as argument, at
> which point the function can freely do I/O with that process.

Oh, actually the idea was not to have emacsclient tell Emacs that it
wants to get a process.  Rather Emacs should have a way to tell
emacsserver through the socket "here is something (including eof) for
stdout", "see if you can get anything on stdin for me and send it over
once you do", "somebody thinks you deserve the following signal"
(actually, Emacs might choose to just send the signal by itself, but
if we ever allow non-local emacsclient sessions, we'll need to have
emacsclient cater for the delivery itself)".

The creation of a pseudo-process would be initiated by the command
called with --eval.  Something like "get-emacsclient-process" or so.

> There might be a few details to get right (maybe just in the form of
> documentation) w.r.t handling of the sentinel, filter, and args
> passed to the function, but nothing too terrible.

Wouldn't it be fun to be able to put arbitrary Emacs-controlled
stages/popups into a pipe?

-- 
David Kastrup




reply via email to

[Prev in Thread] Current Thread [Next in Thread]