Re: A Cygwin related patch

2006-03-25 Thread Enrico Forestieri
On Fri, Mar 24, 2006 at 02:04:53PM +0100, Georg Baum wrote: No, it does not need posix style paths: It simply cannot cope with backslashes for obvious reasons. AFAIK miktex can handle paths like C:/temp/test.tex. Not a big difference, but not exactly posix either. This path style is called

Re: A Cygwin related patch

2006-03-25 Thread Enrico Forestieri
On Fri, Mar 24, 2006 at 02:04:53PM +0100, Georg Baum wrote: > No, it does not need posix style paths: It simply cannot cope with > backslashes for obvious reasons. AFAIK miktex can handle paths like > "C:/temp/test.tex". Not a big difference, but not exactly posix either. This path style is

Re: A Cygwin related patch

2006-03-24 Thread Jean-Marc Lasgouttes
Georg == Georg Baum [EMAIL PROTECTED] writes: Georg Here you basically revert external_path on non-cygwin windows. Georg This is a bit ugly, so I moved this into a new function Georg lyx::support::os::latex_path(). This is a noop except on Georg cygwin, where it is identical to external_path().

Re: A Cygwin related patch

2006-03-24 Thread Georg Baum
Jean-Marc Lasgouttes wrote: I thought the idea of cygwin_path_fix was that it is only needed for latex. I am not so sure anymore. The lines //No backslashes in LaTeX files dos_path = subst(dos_path,'\\','/'); would support the argument that external_path() is intended for

Re: A Cygwin related patch

2006-03-24 Thread Georg Baum
Jean-Marc Lasgouttes wrote: I think I agree with it. Could you repost it please? I am lost in the thread :) Sure, here it is. GeorgIndex: src/support/os_unix.C === --- src/support/os_unix.C (Revision 13467) +++

Re: A Cygwin related patch

2006-03-24 Thread Jean-Marc Lasgouttes
Georg == Georg Baum [EMAIL PROTECTED] writes: Georg Jean-Marc Lasgouttes wrote: I think I agree with it. Could you repost it please? I am lost in the thread :) Georg Sure, here it is. Yes, that's the one I saw. Apply it to trunk and branch. JMarc

Re: A Cygwin related patch

2006-03-24 Thread Enrico Forestieri
On Fri, Mar 24, 2006 at 11:09:00AM +0100, Georg Baum wrote: Jean-Marc Lasgouttes wrote: I thought the idea of cygwin_path_fix was that it is only needed for latex. I am not so sure anymore. Why do you say so? The lines //No backslashes in LaTeX files dos_path =

Re: A Cygwin related patch

2006-03-24 Thread Enrico Forestieri
On Fri, Mar 24, 2006 at 12:51:17PM +0100, Georg Baum wrote: Jean-Marc Lasgouttes wrote: I think I agree with it. Could you repost it please? I am lost in the thread :) Sure, here it is. I have a comment on this patch. I see that you get rid of the rtrim call in latex_path. This has the

Re: A Cygwin related patch

2006-03-24 Thread Georg Baum
Enrico Forestieri wrote: I have a comment on this patch. I see that you get rid of the rtrim call in latex_path. This has the following effect: in all cases the argument of [EMAIL PROTECTED] will have two '/' appended, except on cygwin when cygwin_path_fix_ is true, in which case only one '/'

Re: A Cygwin related patch

2006-03-24 Thread Georg Baum
Enrico Forestieri wrote: On Fri, Mar 24, 2006 at 11:09:00AM +0100, Georg Baum wrote: So what do you think about the patch? Should it go in, or should we first research the use cygwin_path_fix in external_path or not issue? In my experience, if a cygwin application does not try to manipulate

Re: A Cygwin related patch

2006-03-24 Thread Enrico Forestieri
On Fri, Mar 24, 2006 at 01:43:55PM +0100, Georg Baum wrote: Enrico Forestieri wrote: I have a comment on this patch. I see that you get rid of the rtrim call in latex_path. This has the following effect: in all cases the argument of [EMAIL PROTECTED] will have two '/' appended, except on

Re: A Cygwin related patch

2006-03-24 Thread Jean-Marc Lasgouttes
> "Georg" == Georg Baum <[EMAIL PROTECTED]> writes: Georg> Here you basically revert external_path on non-cygwin windows. Georg> This is a bit ugly, so I moved this into a new function Georg> lyx::support::os::latex_path(). This is a noop except on Georg> cygwin, where it is identical to

Re: A Cygwin related patch

2006-03-24 Thread Georg Baum
Jean-Marc Lasgouttes wrote: > I thought the idea of cygwin_path_fix was that it is only needed for > latex. I am not so sure anymore. The lines //No backslashes in LaTeX files dos_path = subst(dos_path,'\\','/'); would support the argument that external_path() is intended for

Re: A Cygwin related patch

2006-03-24 Thread Georg Baum
Jean-Marc Lasgouttes wrote: > I think I agree with it. Could you repost it please? I am lost in the > thread :) Sure, here it is. GeorgIndex: src/support/os_unix.C === --- src/support/os_unix.C (Revision 13467) +++

Re: A Cygwin related patch

2006-03-24 Thread Jean-Marc Lasgouttes
> "Georg" == Georg Baum <[EMAIL PROTECTED]> writes: Georg> Jean-Marc Lasgouttes wrote: >> I think I agree with it. Could you repost it please? I am lost in >> the thread :) Georg> Sure, here it is. Yes, that's the one I saw. Apply it to trunk and branch. JMarc

Re: A Cygwin related patch

2006-03-24 Thread Enrico Forestieri
On Fri, Mar 24, 2006 at 11:09:00AM +0100, Georg Baum wrote: > Jean-Marc Lasgouttes wrote: > > > I thought the idea of cygwin_path_fix was that it is only needed for > > latex. I am not so sure anymore. Why do you say so? > The lines > > //No backslashes in LaTeX files >

Re: A Cygwin related patch

2006-03-24 Thread Enrico Forestieri
On Fri, Mar 24, 2006 at 12:51:17PM +0100, Georg Baum wrote: > Jean-Marc Lasgouttes wrote: > > > I think I agree with it. Could you repost it please? I am lost in the > > thread :) > > Sure, here it is. I have a comment on this patch. I see that you get rid of the rtrim call in latex_path. This

Re: A Cygwin related patch

2006-03-24 Thread Georg Baum
Enrico Forestieri wrote: > I have a comment on this patch. I see that you get rid of the rtrim call > in latex_path. This has the following effect: in all cases the argument > of [EMAIL PROTECTED] will have two '/' appended, except on cygwin when > cygwin_path_fix_ is true, in which case only one

Re: A Cygwin related patch

2006-03-24 Thread Georg Baum
Enrico Forestieri wrote: > On Fri, Mar 24, 2006 at 11:09:00AM +0100, Georg Baum wrote: >> So what do you think about the patch? Should it go in, or should we first >> research the "use cygwin_path_fix in external_path or not" issue? > > In my experience, if a cygwin application does not try to

Re: A Cygwin related patch

2006-03-24 Thread Enrico Forestieri
On Fri, Mar 24, 2006 at 01:43:55PM +0100, Georg Baum wrote: > Enrico Forestieri wrote: > > > I have a comment on this patch. I see that you get rid of the rtrim call > > in latex_path. This has the following effect: in all cases the argument > > of [EMAIL PROTECTED] will have two '/' appended,

Re: A Cygwin related patch

2006-03-23 Thread Georg Baum
Enrico Forestieri wrote: The attached patch fixes the bug reported here: http://thread.gmane.org/gmane.editors.lyx.general/29227 In my intention this is the first of a series of patches aimed at polishing the Cygwin target, which I think is lagging behind. Please, tell me if this ok with

Re: A Cygwin related patch

2006-03-23 Thread Enrico Forestieri
Martin Vermeer [EMAIL PROTECTED] writes: On Wed, Mar 22, 2006 at 09:29:35PM +, Enrico Forestieri wrote: The attached patch fixes the bug reported here: http://thread.gmane.org/gmane.editors.lyx.general/29227 In my intention this is the first of a series of patches aimed at

Re: A Cygwin related patch

2006-03-23 Thread Enrico Forestieri
Georg Baum [EMAIL PROTECTED] writes: Enrico Forestieri wrote: The attached patch fixes the bug reported here: http://thread.gmane.org/gmane.editors.lyx.general/29227 In my intention this is the first of a series of patches aimed at polishing the Cygwin target, which I think is

Re: A Cygwin related patch

2006-03-23 Thread Jean-Marc Lasgouttes
Enrico == Enrico Forestieri [EMAIL PROTECTED] writes: Enrico Really? I had thought the second one was more cleaner. Enrico Actually I had to figure out that when latex_path() is called Enrico for generating the argument of [EMAIL PROTECTED] it is assumed that Enrico a trailing / is present, and

Re: A Cygwin related patch

2006-03-23 Thread Georg Baum
Enrico Forestieri wrote: Really? I had thought the second one was more cleaner. Actually I had to figure out that when latex_path() is called for generating the argument of [EMAIL PROTECTED] it is assumed that a trailing / is present, and the second patch makes this clear not only for

Re: A Cygwin related patch

2006-03-23 Thread Enrico Forestieri
Jean-Marc Lasgouttes [EMAIL PROTECTED] writes: Enrico == Enrico Forestieri [EMAIL PROTECTED] writes: Enrico Really? I had thought the second one was more cleaner. Enrico Actually I had to figure out that when latex_path() is called Enrico for generating the argument of \input at path it

Re: A Cygwin related patch

2006-03-23 Thread Enrico Forestieri
Georg Baum [EMAIL PROTECTED] writes: Enrico Forestieri wrote: Really? I had thought the second one was more cleaner. Actually I had to figure out that when latex_path() is called for generating the argument of \input at path it is assumed that a trailing / is present, and the second

Re: A Cygwin related patch

2006-03-23 Thread Georg Baum
Enrico Forestieri wrote: Trailing, not heading /. But it seems I was misunderstanding the code. And I was misunderstanding your post :-( I am not really sure how things work on cygwin. Can we always assume that all external paths are either windows or posix style? Or do we need posix paths

Re: A Cygwin related patch

2006-03-23 Thread Lars Gullik Bjønnes
Georg Baum [EMAIL PROTECTED] writes: | Enrico Forestieri wrote: | | The attached patch fixes the bug reported here: | http://thread.gmane.org/gmane.editors.lyx.general/29227 | | In my intention this is the first of a series of patches aimed at | polishing the Cygwin target, which I think

Re: A Cygwin related patch

2006-03-23 Thread Georg Baum
Lars Gullik Bjønnes wrote: I feel the exact opposite. the cygwin_path_fix pollutes the portable code, pollutes the not cygwin files But it makes it explicit why external_path() is needed. The second patch is the nice one IMO. Now I don't like either anymore. The problem of both fixes is

Re: A Cygwin related patch

2006-03-23 Thread Jean-Marc Lasgouttes
Georg == Georg Baum [EMAIL PROTECTED] writes: Georg Now I don't like either anymore. The problem of both fixes is Georg that they use a trailing '/' as flag whether external_path() is Georg needed or not. This will strike back sooner or later. Sure, this is not good. Is the problem that

Re: A Cygwin related patch

2006-03-23 Thread Enrico Forestieri
Georg Baum [EMAIL PROTECTED] writes: What I meant was: Do we need for one setting of cygwin_path_fix_needed both windos/posix styles, or does cygwin_path_fix_needed simply switch external_path() between the windows and posix version? As it is now, cygwin_path_fix_needed simply switch

Re: A Cygwin related patch

2006-03-23 Thread Enrico Forestieri
Jean-Marc Lasgouttes [EMAIL PROTECTED] writes: Georg == Georg Baum [EMAIL PROTECTED] writes: Georg Now I don't like either anymore. The problem of both fixes is Georg that they use a trailing '/' as flag whether external_path() is Georg needed or not. This will strike back sooner or

Re: A Cygwin related patch

2006-03-23 Thread Georg Baum
Enrico Forestieri wrote: The problem is that I have not a full grasp of the overall code and don't want introduce changes without fully knowing the consequences. I repeat, my idea is of only fixing what is broken, making changes that I fully understand. As a problem arised with [EMAIL

Re: A Cygwin related patch

2006-03-23 Thread Enrico Forestieri
Georg Baum [EMAIL PROTECTED] writes: I think that you can safely call it unconditionally. I looked it up, and latex_path() is only called on filenames that are written to .tex files. I would be very surprised if a TeX compiler exists on windows that needs win style paths in \inputa at path

Re: A Cygwin related patch

2006-03-23 Thread Georg Baum
Am Donnerstag, 23. März 2006 21:26 schrieb Enrico Forestieri: Your theory is right and I wasn't fearless enough, not having the time to study the code. So, the attached is apparently the right fix. While testing this patch I run up against another bug. 1) File-New 2) Insert-File-Child

Re: A Cygwin related patch

2006-03-23 Thread Enrico Forestieri
Georg Baum [EMAIL PROTECTED] writes: Many thanks for your helpful and appreciated comments. I hope they are not too disappointing Oh, not at all... Here you basically revert external_path on non-cygwin windows. This is a bit ugly, so I moved this into a new function

Re: A Cygwin related patch

2006-03-23 Thread Georg Baum
Enrico Forestieri wrote: > The attached patch fixes the bug reported here: > http://thread.gmane.org/gmane.editors.lyx.general/29227 > > In my intention this is the first of a series of patches aimed at > polishing the Cygwin target, which I think is lagging behind. Please, tell > me if this ok

Re: A Cygwin related patch

2006-03-23 Thread Enrico Forestieri
Martin Vermeer <[EMAIL PROTECTED]> writes: > > On Wed, Mar 22, 2006 at 09:29:35PM +, Enrico Forestieri wrote: > > The attached patch fixes the bug reported here: > > http://thread.gmane.org/gmane.editors.lyx.general/29227 > > > > In my intention this is the first of a series of patches aimed

Re: A Cygwin related patch

2006-03-23 Thread Enrico Forestieri
Georg Baum <[EMAIL PROTECTED]> writes: > > Enrico Forestieri wrote: > > > The attached patch fixes the bug reported here: > > http://thread.gmane.org/gmane.editors.lyx.general/29227 > > > > In my intention this is the first of a series of patches aimed at > > polishing the Cygwin target, which

Re: A Cygwin related patch

2006-03-23 Thread Jean-Marc Lasgouttes
> "Enrico" == Enrico Forestieri <[EMAIL PROTECTED]> writes: Enrico> Really? I had thought the second one was more cleaner. Enrico> Actually I had to figure out that when latex_path() is called Enrico> for generating the argument of [EMAIL PROTECTED] it is assumed that Enrico> a trailing / is

Re: A Cygwin related patch

2006-03-23 Thread Georg Baum
Enrico Forestieri wrote: > Really? I had thought the second one was more cleaner. Actually I had to > figure out that when latex_path() is called for generating the argument > of [EMAIL PROTECTED] it is assumed that a trailing / is present, and the > second > patch makes this clear not only for

Re: A Cygwin related patch

2006-03-23 Thread Enrico Forestieri
Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes: > > > "Enrico" == Enrico Forestieri <[EMAIL PROTECTED]> writes: > > Enrico> Really? I had thought the second one was more cleaner. > Enrico> Actually I had to figure out that when latex_path() is called > Enrico> for generating the argument of

Re: A Cygwin related patch

2006-03-23 Thread Enrico Forestieri
Georg Baum <[EMAIL PROTECTED]> writes: > > Enrico Forestieri wrote: > > > Really? I had thought the second one was more cleaner. Actually I had to > > figure out that when latex_path() is called for generating the argument > > of \input path it is assumed that a trailing / is present, and the >

Re: A Cygwin related patch

2006-03-23 Thread Georg Baum
Enrico Forestieri wrote: > Trailing, not heading /. But it seems I was misunderstanding the code. And I was misunderstanding your post :-( >> I am not really sure how things work on cygwin. Can we always assume that >> all external paths are either windows or posix style? Or do we need posix >>

Re: A Cygwin related patch

2006-03-23 Thread Lars Gullik Bjønnes
Georg Baum <[EMAIL PROTECTED]> writes: | Enrico Forestieri wrote: | | > The attached patch fixes the bug reported here: | > http://thread.gmane.org/gmane.editors.lyx.general/29227 | > | > In my intention this is the first of a series of patches aimed at | > polishing the Cygwin target, which I

Re: A Cygwin related patch

2006-03-23 Thread Georg Baum
Lars Gullik Bjønnes wrote: > I feel the exact opposite. the cygwin_path_fix pollutes the "portable" > code, pollutes the "not cygwin files" But it makes it explicit why external_path() is needed. > The second patch is the nice one IMO. Now I don't like either anymore. The problem of both

Re: A Cygwin related patch

2006-03-23 Thread Jean-Marc Lasgouttes
> "Georg" == Georg Baum <[EMAIL PROTECTED]> writes: Georg> Now I don't like either anymore. The problem of both fixes is Georg> that they use a trailing '/' as flag whether external_path() is Georg> needed or not. This will strike back sooner or later. Sure, this is not good. Is the problem

Re: A Cygwin related patch

2006-03-23 Thread Enrico Forestieri
Georg Baum <[EMAIL PROTECTED]> writes: > What I meant was: Do we need for one setting of cygwin_path_fix_needed both > windos/posix styles, or does cygwin_path_fix_needed simply switch > external_path() between the windows and posix version? As it is now, cygwin_path_fix_needed simply switch

Re: A Cygwin related patch

2006-03-23 Thread Enrico Forestieri
Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes: > > > "Georg" == Georg Baum <[EMAIL PROTECTED]> writes: > > Georg> Now I don't like either anymore. The problem of both fixes is > Georg> that they use a trailing '/' as flag whether external_path() is > Georg> needed or not. This will strike

Re: A Cygwin related patch

2006-03-23 Thread Georg Baum
Enrico Forestieri wrote: > The problem is that I have not a full grasp of the overall code and don't > want introduce changes without fully knowing the consequences. I repeat, > my idea is of only fixing what is broken, making changes that I fully > understand. As a problem arised with [EMAIL

Re: A Cygwin related patch

2006-03-23 Thread Enrico Forestieri
Georg Baum <[EMAIL PROTECTED]> writes: > I think that you can safely call it unconditionally. I looked it up, and > latex_path() is only called on filenames that are written to .tex files. I > would be very surprised if a TeX compiler exists on windows that needs win > style paths in \inputa

Re: A Cygwin related patch

2006-03-23 Thread Georg Baum
Am Donnerstag, 23. März 2006 21:26 schrieb Enrico Forestieri: > Your theory is right and I wasn't fearless enough, not having the time > to study the code. So, the attached is apparently the right fix. While > testing this patch I run up against another bug. > > 1) File->New > 2)

Re: A Cygwin related patch

2006-03-23 Thread Enrico Forestieri
Georg Baum <[EMAIL PROTECTED]> writes: > > Many thanks for your helpful and appreciated comments. > > I hope they are not too disappointing Oh, not at all... > Here you basically revert external_path on non-cygwin windows. This is a > bit ugly, so I moved this into a new function >

A Cygwin related patch

2006-03-22 Thread Enrico Forestieri
The attached patch fixes the bug reported here: http://thread.gmane.org/gmane.editors.lyx.general/29227 In my intention this is the first of a series of patches aimed at polishing the Cygwin target, which I think is lagging behind. Please, tell me if this ok with you. I have no problem in

Re: A Cygwin related patch

2006-03-22 Thread Enrico Forestieri
Enrico Forestieri [EMAIL PROTECTED] writes: The attached patch fixes the bug reported here: http://thread.gmane.org/gmane.editors.lyx.general/29227 In my intention this is the first of a series of patches aimed at polishing the Cygwin target, which I think is lagging behind. Please, tell

Re: A Cygwin related patch

2006-03-22 Thread Martin Vermeer
On Wed, Mar 22, 2006 at 09:29:35PM +, Enrico Forestieri wrote: The attached patch fixes the bug reported here: http://thread.gmane.org/gmane.editors.lyx.general/29227 In my intention this is the first of a series of patches aimed at polishing the Cygwin target, which I think is lagging

A Cygwin related patch

2006-03-22 Thread Enrico Forestieri
The attached patch fixes the bug reported here: http://thread.gmane.org/gmane.editors.lyx.general/29227 In my intention this is the first of a series of patches aimed at polishing the Cygwin target, which I think is lagging behind. Please, tell me if this ok with you. I have no problem in

Re: A Cygwin related patch

2006-03-22 Thread Enrico Forestieri
Enrico Forestieri <[EMAIL PROTECTED]> writes: > > The attached patch fixes the bug reported here: > http://thread.gmane.org/gmane.editors.lyx.general/29227 > > In my intention this is the first of a series of patches aimed at polishing > the Cygwin target, which I think is lagging behind.

Re: A Cygwin related patch

2006-03-22 Thread Martin Vermeer
On Wed, Mar 22, 2006 at 09:29:35PM +, Enrico Forestieri wrote: > The attached patch fixes the bug reported here: > http://thread.gmane.org/gmane.editors.lyx.general/29227 > > In my intention this is the first of a series of patches aimed at polishing > the Cygwin target, which I think is