Anyway does changing the line
read < "${LYXPIPE}".out || exit
into
read TMP < "${LYXPIPE}".out || exit

work for you?
Pavel

Yes this works. Thanks.
But is there any difference with regards to simply comment it?


To answer your previous question:

yes, there is a reason for I want to use named pipe. The reason is that I often edit tex files via vim and so my Xresource for xdvi.editor is setted to vim: using pipe I thought I could be able to use reverse search regardless of the way xdvi is invoked and indeed that seems the case to me, by the tests I did.

Finally, I will collect all the necessary commands which work in my case for inverse/direct search, for reference just in case somebody else will need them since they are a little bit different from the ones listed in the documentation:

xdvi:
        inverse search:
                Tools->Preferences->File Handling->File formats
                 xdvi -editor "lyxeditor.sh %f %l"
        direct search:
                Tools->Preferences->Output->General
                 xdvi -nofork -sourceposition "$$n $$t" $$o -editor "lyxeditor.sh %f 
%l"

okular:
        inverse search:
                Tools->Preferences->File Handling->File formats
                 okular --unique
        direct search:
                Tools->Preferences->Output->General
                 okular --unique "$$o#src:$$n $$f"

The executable lyxeditor.sh should contain

#!/bin/sh
LYXPIPE="$HOME/.lyx/lyxpipe"
COMMAND="LYXCMD:revdvi:server-goto-file-row:$1 $2"
echo "$COMMAND" > "${LYXPIPE}".in || exit
read TMP < "${LYXPIPE}".out || exit



F.

Reply via email to