[referencer] lyx plugin

Aurélien Naldi aurelien.naldi at gmail.com
Wed Jan 9 04:56:56 EST 2008


On Jan 6, 2008 10:54 AM, Aurélien Naldi <aurelien.naldi at gmail.com> wrote:
>
> Le dimanche 06 janvier 2008 à 09:27 +0000, John Spray a écrit :
> > I've found that I can use the lyxclient tool that comes with lyx to
> > insert citations without altering my lyx configuration.  I believe it
> > uses sockets rather than pipes.  I've hacked the lyx plugin to use
> > lyxclient instead of pipes (sorry for demolishing your code).  Using an
> > external tool is not ideal, but I think it's important to "Just work"
> > rather than needing to provide instructions on altering lyx config.  I
> > believe lyxclient is part of a default lyx install, at least on linux
> > (which is currently the only place referencer runs).
>
> As I mentioned, kile does support quoting through the lyxpipe as well,
> getting a working citation to kile with the same code would be nice :)
> I have just looked at it, it looks like kile uses ~/.lyxpipe.in/out by
> default. So the quotation plugin could check lyx config file. If
> something is found here, test if the file exists. If they do, use it. If
> they don't test if ~/lyxpipe.in exist and use it if it does. If all of
> the above fail, then it can use lyxclient.
> I don't have time right now to do this (I'm supposed to have left
> already) but I'm willing to do it tonight or early next week, if you
> agree.
>

Here is a patch to the lyx plugin putting back the lyxpipe code.
I also moved the lyxClientBinary detection to the initialisation part
of the plugin, It is not going to slow down things too much but do we
really want to try to detect it at every run ? If you want referencer
to find a lyxclient installed after its startup, I can add a function
for the detection and run it whenever we are trying to use lyxclient
and we don't have a path to the file.

Back to the actual patch: as I said it adds a default path to the
lyxpipe, which is the one used by kile. This will first try to use a
lyx-configured pipe. If it is not configured or not present, it will
try the default one, and then fallback to lyxclient. It does quote
properly in kile and in lyx using either the pipe or lyxclient.

-- 
Aurélien Naldi


More information about the referencer mailing list