Re: Is there any way to make JabRef push to LyX work in Windows XP?

2007-04-10 Thread James Yu

Hi, Enrico,
Great you have tried something and succeeded.
Will you share with us the utility?
Thanks,
James

On 4/10/07, Enrico Forestieri [EMAIL PROTECTED] wrote:


Yu, James writes:
 Abdelrazak Younes wrote:
  The solution is just to replace our handmade socket (or pipe) layer
  with a portable one.
 
  It should not be very hard to implement even for a newcomer in the LyX
  project. If someone's interested, comesee us at the devel list
 
  Another solution for you James is to use Enrico's mixed windows/cygwin
  version. Could you confirm that it works Enrico?

Yes, but if you want that functionality from a native Windows app you
have to use a workaround. See below.

 If I was not wrong, it did not work in cygwin!

It works if you use cygwin apps. Native windows apps know nothing about
named pipes. However, there's a workaround. Windows provides file change
notifications, so you can tell a native app to use a given file as the
lyxpipe. Then you monitor such file with a small program, and when the app
writes to the file you receive a notification. So you simply copy what was
written to the file to the real lyxpipe using a cygwin program (a bash
script, for example).

I wrote such watcher utility by modifying the example provided at
http://www.relisoft.com/win32/watcher.html
and it works very well. I can push citations from JabRef directly into LyX
without problems. You need the cygwin version of LyX, of course.
The only nuisance is that you have to remember to launch the watcher
program in addition to LyX and JabRef.

--
Enrico




Re: Is there any way to make JabRef push to LyX work in Windows XP?

2007-04-10 Thread James Yu

Hi, Enrico,
Great you have tried something and succeeded.
Will you share with us the utility?
Thanks,
James

On 4/10/07, Enrico Forestieri [EMAIL PROTECTED] wrote:


Yu, James writes:
 Abdelrazak Younes wrote:
  The solution is just to replace our handmade socket (or pipe) layer
  with a portable one.
 
  It should not be very hard to implement even for a newcomer in the LyX
  project. If someone's interested, comesee us at the devel list
 
  Another solution for you James is to use Enrico's mixed windows/cygwin
  version. Could you confirm that it works Enrico?

Yes, but if you want that functionality from a native Windows app you
have to use a workaround. See below.

 If I was not wrong, it did not work in cygwin!

It works if you use cygwin apps. Native windows apps know nothing about
named pipes. However, there's a workaround. Windows provides file change
notifications, so you can tell a native app to use a given file as the
lyxpipe. Then you monitor such file with a small program, and when the app
writes to the file you receive a notification. So you simply copy what was
written to the file to the real lyxpipe using a cygwin program (a bash
script, for example).

I wrote such watcher utility by modifying the example provided at
http://www.relisoft.com/win32/watcher.html
and it works very well. I can push citations from JabRef directly into LyX
without problems. You need the cygwin version of LyX, of course.
The only nuisance is that you have to remember to launch the watcher
program in addition to LyX and JabRef.

--
Enrico




Re: Is there any way to make "JabRef push to LyX" work in Windows XP?

2007-04-10 Thread James Yu

Hi, Enrico,
Great you have tried something and succeeded.
Will you share with us the "utility"?
Thanks,
James

On 4/10/07, Enrico Forestieri <[EMAIL PROTECTED]> wrote:


Yu, James writes:
> Abdelrazak Younes wrote:
> > The solution is "just" to replace our handmade socket (or pipe) layer
> > with a portable one.
> >
> > It should not be very hard to implement even for a newcomer in the LyX
> > project. If someone's interested, come us at the devel list
> >
> > Another solution for you James is to use Enrico's mixed windows/cygwin
> > version. Could you confirm that it works Enrico?

Yes, but if you want that functionality from a native Windows app you
have to use a workaround. See below.

> If I was not wrong, it did not work in cygwin!

It works if you use cygwin apps. Native windows apps know nothing about
named pipes. However, there's a workaround. Windows provides file change
notifications, so you can tell a native app to use a given file as the
lyxpipe. Then you monitor such file with a small program, and when the app
writes to the file you receive a notification. So you simply copy what was
written to the file to the real lyxpipe using a cygwin program (a bash
script, for example).

I wrote such "watcher" utility by modifying the example provided at
http://www.relisoft.com/win32/watcher.html
and it works very well. I can push citations from JabRef directly into LyX
without problems. You need the cygwin version of LyX, of course.
The only nuisance is that you have to remember to launch the watcher
program in addition to LyX and JabRef.

--
Enrico