Hi, Jean-Marc,

thank you for the answer, and sorry for the delay.

On 19 Mar 2003, Jean-Marc Lasgouttes wrote:

> >>>>> "Joao" == Joao Luis Meloni Assirati <[EMAIL PROTECTED]> writes:
>
> Joao> Normal clients, though, will be spawned by lyx childs (eg. xdvi
> Joao> as with "inverse dvi search") so the alternative in this case
> Joao> points to set an environment variable LYXTMP with equal to
> Joao> /tmp/lyx_tmpdir8814Rhtgtj. Lyxclient reads the environment and
> Joao> then knows how to find the pipes.
>
> Or the name of the pipe could be written in .lyx/pipename

I am thinking also in the possibility of multiple lyxes running (sometimes
I like to see two or more buffers at the same time). In this case, there
must be a way to the client spawned by lyx to know which pipes to talk to.
It seems clear to me that the easy way to do this is by environment
variables. Writing pipe names in some file in .lyx/ does not help here.

> Joao> So what do you think resurrecting PutEnv()? I could then work in
> Joao> this migration of lyxpipes to tmpdir and write a compliant
> Joao> client. Further migration to local sockets could be made in a
> Joao> next step, when inverse search would be already working.
>
> I am not sure it is needed, actually. In particular, it will not help
> if the client has not been spawned by LyX itself.

Okay, but it helps if the client was spawned by lyx, which case will be
the most frequent.

If the client was not spawned by lyx and there is only one lyx running, it
can look for the /tmp/lyx_tmpdir* with the correct ownership. Sure if lyx
crashed, there will be more than one tmpdir and the client will not be
usable but this situations is no different from now. (In the future, if
pipes got substituted by local sockets, this problem would be
automatically solved.)

On the other hand, if there is more than one lyx running, current location
of pipes will permit just one lyx to communicate with the client. If the
location of pipes is tmpdir, the user can inform the client (through
environmet variables or command line options or buffer names) which tmpdir
is the right one.

> JMarc

Jo�o.

Reply via email to