Re: Improving SumatraPDF support

2009-12-22 Thread Enrico Forestieri
On Sun, Dec 20, 2009 at 03:02:30AM +0100, Enrico Forestieri wrote: > The script works on both Windows and Linux but doesn't work > on Cygwin :( I don't know why. For some reason, COMMAND has to be quoted on cygwin. The attached now works on everything I have access to. Bennet, does it work for yo

Re: Improving SumatraPDF support

2009-12-22 Thread Enrico Forestieri
On Fri, Dec 18, 2009 at 06:14:52AM -0500, Ben M. wrote: > I'm now on a different computer, and because of spaces in the > temporary directory path, reverse search completely fails for both > lyxeditor.bat and the aforementioned viewer command. I fixed this in trunk. Unfortunately, the background

Re: Improving SumatraPDF support

2009-12-19 Thread Enrico Forestieri
On Sat, Dec 19, 2009 at 09:33:15PM -0500, Ben M. wrote: > On Sat, Dec 19, 2009 at 9:14 PM, Enrico Forestieri wrote: > > On Sat, Dec 19, 2009 at 07:04:09PM -0500, Ben M. wrote: > >> Yes, there must be a better way.  For instance, I noticed that an > >> executed command inherits its environment from

Re: Improving SumatraPDF support

2009-12-19 Thread Ben M.
On Sat, Dec 19, 2009 at 9:14 PM, Enrico Forestieri wrote: > On Sat, Dec 19, 2009 at 07:04:09PM -0500, Ben M. wrote: >> Yes, there must be a better way.  For instance, I noticed that an >> executed command inherits its environment from LyX, e.g. "PATH >> prefix."  Why not create environment variable

Re: Improving SumatraPDF support

2009-12-19 Thread Enrico Forestieri
On Sat, Dec 19, 2009 at 09:18:23PM -0500, Ben M. wrote: > Thanks so much to both of you for all the feedback! > > On Sat, Dec 19, 2009 at 9:05 PM, Enrico Forestieri wrote: > > On Sat, Dec 19, 2009 at 10:23:17AM -0500, rgheck wrote: > >> This will be hard to get right, since you can install LyX a

Re: Improving SumatraPDF support

2009-12-19 Thread Ben M.
Thanks so much to both of you for all the feedback! On Sat, Dec 19, 2009 at 9:05 PM, Enrico Forestieri wrote: > On Sat, Dec 19, 2009 at 10:23:17AM -0500, rgheck wrote: >> This will be hard to get right, since you can install LyX anywhere. > > True, but those will surely catch 99% of cases. Won't

Re: Improving SumatraPDF support

2009-12-19 Thread Enrico Forestieri
On Sat, Dec 19, 2009 at 07:04:09PM -0500, Ben M. wrote: > On Sat, Dec 19, 2009 at 10:23 AM, rgheck wrote: > >>    LYXSYSDIRS = ["/usr/share/lyx", "/usr/local/share/lyx", > >> "/opt/share/lyx"] > >> > > This will be hard to get right, since you can install LyX anywhere. > > > >>    LYXBASEDIR = ["

Re: Improving SumatraPDF support

2009-12-19 Thread Enrico Forestieri
On Sat, Dec 19, 2009 at 10:23:17AM -0500, rgheck wrote: > >if OSTYPE == "macos": > >LYXSYSDIRS = ["/Applications/LyX.app/Contents/Resources"] > >LYXBASEDIR = ["LyX" + version_suffix] > >old_dir = os.getcwd() > >os.chdir(HOME + "/Library/Application Support") > >elif OSTYPE == "win3

Re: Improving SumatraPDF support

2009-12-19 Thread Enrico Forestieri
On Sat, Dec 19, 2009 at 06:58:29AM -0500, Ben M. wrote: > Okay, here's a very rough draft. This is the first thing I've written > in Python, so some things are very ugly. It works for me under Win32, > but I haven't tested under anything else. I also tested it on Linux and Cygwin. See comments

Re: Improving SumatraPDF support

2009-12-19 Thread Ben M.
On Sat, Dec 19, 2009 at 10:23 AM, rgheck wrote: >>    LYXSYSDIRS = ["/usr/share/lyx", "/usr/local/share/lyx", >> "/opt/share/lyx"] >> > This will be hard to get right, since you can install LyX anywhere. > >>    LYXBASEDIR = [".lyx" + version_suffix] >> > This again will be hard to get right. (For

Re: Improving SumatraPDF support

2009-12-19 Thread rgheck
On 12/19/2009 06:58 AM, Ben M. wrote: On Fri, Dec 18, 2009 at 5:42 PM, Enrico Forestieri wrote: Yep, as I said, in development/tools there is a shell script (lyxeditor) that parses the preferences file and lyxrc.dist for the lyxpipe definition. It works on Linux, MacOS, and Cygwin. It would

Re: Improving SumatraPDF support

2009-12-19 Thread Ben M.
On Fri, Dec 18, 2009 at 5:42 PM, Enrico Forestieri wrote: > Yep, as I said, in development/tools there is a shell script (lyxeditor) > that parses the preferences file and lyxrc.dist for the lyxpipe definition. > It works on Linux, MacOS, and Cygwin. It would be easy to extend it to > also work on

Re: Improving SumatraPDF support

2009-12-18 Thread Enrico Forestieri
On Fri, Dec 18, 2009 at 02:52:36PM -0500, Ben M. wrote: > On Fri, Dec 18, 2009 at 12:00 PM, Enrico Forestieri wrote: > > On Fri, Dec 18, 2009 at 04:47:59AM -0500, Ben M. wrote: > >> � � SumatraPDF $$i -inverse-search "cmd /C echo > >> LYXCMD:revdvi:server-goto-file-row:%f %l> \\.\pipe\lyxpipe.in

Re: Improving SumatraPDF support

2009-12-18 Thread Ben M.
On Fri, Dec 18, 2009 at 12:00 PM, Enrico Forestieri wrote: > On Fri, Dec 18, 2009 at 04:47:59AM -0500, Ben M. wrote: >>     SumatraPDF $$i -inverse-search "cmd /C echo >> LYXCMD:revdvi:server-goto-file-row:%f %l> \\.\pipe\lyxpipe.in & type >> \\.\pipe\lyxpipe.out" > > This way, you have still to k

Re: Improving SumatraPDF support

2009-12-18 Thread Enrico Forestieri
On Fri, Dec 18, 2009 at 06:14:52AM -0500, Ben M. wrote: > I'm now on a different computer, and because of spaces in the > temporary directory path, reverse search completely fails for both > lyxeditor.bat and the aforementioned viewer command. This is documented in the Additional Features manual.

Re: Improving SumatraPDF support

2009-12-18 Thread Enrico Forestieri
On Fri, Dec 18, 2009 at 04:47:59AM -0500, Ben M. wrote: > 3) Don't use lyxeditor.bat. Many steps are necessary to create this > file and ensure that it's discovered by SumatraPDF. Instead, we can > recommend setting the pdflatex viewer to > SumatraPDF $$i -inverse-search "cmd /C echo > LYXC

Re: Improving SumatraPDF support

2009-12-18 Thread Ben M.
I'm now on a different computer, and because of spaces in the temporary directory path, reverse search completely fails for both lyxeditor.bat and the aforementioned viewer command. The LyX status bar reads: File does not exist: C:\Documents Even when I add quotes, it says File does not exi