>>>>> "Asger" == Asger Alstrup Nielsen <[EMAIL PROTECTED]> writes:
>> Otherwise, I could simply conform to what the lyxserver does now,
>> i.e. not writing anything in the out pipe if a command that returns
>> no data succeeds. In this case, I do not fully understand how to
>> check wheter a command returning no data has succeeded or not. The
>> only way I know of is using select(2) to watch status changes in
>> .lyxpipe.out, is that right? If the status has not changed, than
>> lyx hasn't written anything, therefore no error occurred.
Asger> You could do a hack: Send a command to LyX that has no ill
Asger> side-effects, but returns something (like where the cursor is),
Asger> and if you get the result immediately, you know that the
Asger> previous command succeeded. Actually, this trick could spare
Asger> us from modifying the protocol.
It is a bit stupid IMO that no info is returned after a successful
command... I'd rather see a command to enable feedback.
BTW, I did a change yesterday so that changes
"LYXSRV:" + client + ":hello";
as answer to a connection to
"LYXSRV:" + client + ":hello\n";
I hope that nobody considers that to be a change of protocol.
Concerning the return of function values, nothing in the protocal
states that a message is returned only if the function has a
result. Even an error will be unnoticed if there is not error message
(which is not possible now).
I propose that we change the protocol now. I suspect that few
applications listen to the pipe anyway. A possibility would be to send
a LYXSRV:client:verbose to set the right flag on. It seems to me to be
the simplest way of doing it. The client could listen to the pipe to
see whether this command is implemented by the protocol (whether it
receives the same string).
What do you think?
JMarc