.lst-files creation of configure.py Was: Approaching LyX 1.5.2 [status update #1]

2007-08-29 Thread Uwe Stöhr
> Are you this only happens when there is an error? Yes, when an error occurs while configuring, no matter for what reason, configure.py quits and creates empty textclass.lst and packages.lst. The files are empty because at the beginning of configure.py they are created when they don't already

Re: .lst-files creation of configure.py Was: Approaching LyX 1.5.2 [status update #1]

2007-08-29 Thread Bo Peng
> configure.py would then look like this (in pseudo code): > > begin script > do something > try >if textclasss.lst not exists > create textclass.lst >else > clear textclass.lst >create package list and write it to textclass.lst >do something > finally >check i

Re: .lst-files creation of configure.py Was: Approaching LyX 1.5.2 [status update #1]

2007-08-29 Thread Uwe Stöhr
Bo Peng schrieb: But what if configure.py is killed?? This is what the try finally block is for: even when the program is killed, the finally routine is run in any way. OK, this is how it is done in Delphi and I don't know if there exists a try finally routine block in Python. But neverthel

Re: .lst-files creation of configure.py Was: Approaching LyX 1.5.2 [status update #1]

2007-08-29 Thread Bo Peng
> > But what if configure.py is killed?? > > This is what the try finally block is for: even when the program is killed, > the finally routine is > run in any way. OK, this is how it is done in Delphi and I don't know if > there exists a try finally > routine block in Python. > But nevertheless I

Re: .lst-files creation of configure.py Was: Approaching LyX 1.5.2 [status update #1]

2007-08-29 Thread Bo Peng
On 8/29/07, Uwe Stöhr <[EMAIL PROTECTED]> wrote: > > Are you this only happens when there is an error? > BTW, how can I trigger this bug under linux? If I remove ~/.lyx/packages.lst and textclass.lst, lyx will reconfigure and start. Thanks. Bo

Re: .lst-files creation of configure.py Was: Approaching LyX 1.5.2 [status update #1]

2007-08-29 Thread Uwe Stöhr
> BTW, how can I trigger this bug under linux? If I remove > ~/.lyx/packages.lst and textclass.lst, lyx will reconfigure and start. Don't delete the files, but clear them (so that they are empty). --- I agree that LyX should start, no matter if the .lst-files are empty and then take care of the

Re: .lst-files creation of configure.py Was: Approaching LyX 1.5.2 [status update #1]

2007-08-29 Thread Bo Peng
> I agree that LyX should start, no matter if the .lst-files are empty and then > take care of them, Jose and Jurgen, I propose that we apply the attached patch to partially solve this problem. It allows lyx to start even when textclasslist is empty. If lyx is started like this, only reconfigure

Re: .lst-files creation of configure.py Was: Approaching LyX 1.5.2 [status update #1]

2007-08-29 Thread Enrico Forestieri
On Wed, Aug 29, 2007 at 09:23:46PM -0500, Bo Peng wrote: > > I agree that LyX should start, no matter if the .lst-files are empty and > > then take care of them, > > Jose and Jurgen, > > I propose that we apply the attached patch to partially solve this > problem. It allows lyx to start even wh

Re: .lst-files creation of configure.py Was: Approaching LyX 1.5.2 [status update #1]

2007-08-30 Thread Abdelrazak Younes
Bo Peng wrote: I agree that LyX should start, no matter if the .lst-files are empty and then take care of them, Jose and Jurgen, I propose that we apply the attached patch to partially solve this problem. It allows lyx to start even when textclasslist is empty. If lyx is started like this, on

Re: .lst-files creation of configure.py Was: Approaching LyX 1.5.2 [status update #1]

2007-08-30 Thread José Matos
On Thursday 30 August 2007 03:23:46 Bo Peng wrote: > OK to apply? I would like to hear from Jean-Marc here, this is a battle that he fought so many times that I think is output is important. Not only that but I am not convinced that this is the right solution. My objections go along the rea

Re: .lst-files creation of configure.py Was: Approaching LyX 1.5.2 [status update #1]

2007-08-30 Thread Uwe Stöhr
> I don't think that this is the right fix. If configure failed previously, > most probably it will fail again, so what is fixed here? No, on Windows 90% of the failiures are like this: configure.py fails for a reason I still couldn't find out (even after one year of investigation - it never occ

Re: .lst-files creation of configure.py Was: Approaching LyX 1.5.2 [status update #1]

2007-08-30 Thread Bo Peng
> > I propose that we apply the attached patch to partially solve this > > problem. It allows lyx to start even when textclasslist is empty. If > > lyx is started like this, only reconfigure (and quit) is allowed. This > > gives users a second chance to configure lyx if initial configuration > > fa

Re: .lst-files creation of configure.py Was: Approaching LyX 1.5.2 [status update #1]

2007-08-30 Thread Enrico Forestieri
On Thu, Aug 30, 2007 at 01:48:00PM +0200, Uwe Stöhr wrote: > > I don't think that this is the right fix. If configure failed previously, > > most probably it will fail again, so what is fixed here? > > No, on Windows 90% of the failiures are like this: > configure.py fails for a reason I still

Re: .lst-files creation of configure.py Was: Approaching LyX 1.5.2 [status update #1]

2007-08-30 Thread Bo Peng
> Note that configure.py already has an option (--without-latex-config) > to create a default textclass.lst file, so maybe a new option could be > added to lyx such that on startup a reconfigure is forced by passing > that option to configure.py. Once lyx is started, a normal reconfiguration > coul

Re: .lst-files creation of configure.py Was: Approaching LyX 1.5.2 [status update #1]

2007-08-30 Thread Abdelrazak Younes
Bo Peng wrote: Note that configure.py already has an option (--without-latex-config) to create a default textclass.lst file, so maybe a new option could be added to lyx such that on startup a reconfigure is forced by passing that option to configure.py. Once lyx is started, a normal reconfigurati

Re: .lst-files creation of configure.py Was: Approaching LyX 1.5.2 [status update #1]

2007-08-30 Thread Bo Peng
> OK, then a good compromise is to run configure at startup when in no-gui > mode (typically when doing export at the command-line) and delay it > until the GUI is started and running when in gui-mode. This is what is > done for session loading for example (look at > GuiApplication::execBatchComman

Re: .lst-files creation of configure.py Was: Approaching LyX 1.5.2 [status update #1]

2007-08-30 Thread Abdelrazak Younes
Bo Peng wrote: OK, then a good compromise is to run configure at startup when in no-gui mode (typically when doing export at the command-line) and delay it until the GUI is started and running when in gui-mode. This is what is done for session loading for example (look at GuiApplication::execBatc

Re: .lst-files creation of configure.py Was: Approaching LyX 1.5.2 [status update #1]

2007-08-30 Thread Jean-Marc Lasgouttes
"Bo Peng" <[EMAIL PROTECTED]> writes: > I propose that we apply the attached patch to partially solve this > problem. It allows lyx to start even when textclasslist is empty. If > lyx is started like this, only reconfigure (and quit) is allowed. This > gives users a second chance to configure lyx

Re: .lst-files creation of configure.py Was: Approaching LyX 1.5.2 [status update #1]

2007-08-30 Thread Bo Peng
> I do not like much this solution... Having a dialog saying "lyx is not > configured correctly. Try to fix" and two buttons "reconfigure" and > "quit" would look better. With your solution, the user has to hunt in > the menus to guess which actions are possible. This does not contradict with my p

Re: .lst-files creation of configure.py Was: Approaching LyX 1.5.2 [status update #1]

2007-08-30 Thread Enrico Forestieri
On Thu, Aug 30, 2007 at 09:57:31AM -0500, Bo Peng wrote: > > Note that configure.py already has an option (--without-latex-config) > > to create a default textclass.lst file, so maybe a new option could be > > added to lyx such that on startup a reconfigure is forced by passing > > that option to

Re: .lst-files creation of configure.py Was: Approaching LyX 1.5.2 [status update #1]

2007-08-30 Thread Bo Peng
> I think that there is another option. ATM, lyx decides that a > reconfiguration is needed when the timestamp of configure.py is > newer than that of the .lst files. Why not adding the condition > that they are also empty? See the attached. Then I may start lyx.exe 5 times, and leave five lyx.exe

Re: .lst-files creation of configure.py Was: Approaching LyX 1.5.2 [status update #1]

2007-08-30 Thread Richard Heck
Enrico Forestieri wrote: On Thu, Aug 30, 2007 at 09:57:31AM -0500, Bo Peng wrote: Note that configure.py already has an option (--without-latex-config) to create a default textclass.lst file, so maybe a new option could be added to lyx such that on startup a reconfigure is forced by passing

Re: .lst-files creation of configure.py Was: Approaching LyX 1.5.2 [status update #1]

2007-08-31 Thread Jean-Marc Lasgouttes
"Bo Peng" <[EMAIL PROTECTED]> writes: > This does not contradict with my patch at all. I did not do it simply > because I do not know how to do it. At which point of the source code > that I can insert this dialog? It is also possible to hack menubackend > and display a single reconfigure menu ite

Re: .lst-files creation of configure.py Was: Approaching LyX 1.5.2 [status update #1]

2007-08-31 Thread Jean-Marc Lasgouttes
"Bo Peng" <[EMAIL PROTECTED]> writes: > This does not contradict with my patch at all. I did not do it simply > because I do not know how to do it. At which point of the source code > that I can insert this dialog? It is also possible to hack menubackend > and display a single reconfigure menu ite

Re: .lst-files creation of configure.py Was: Approaching LyX 1.5.2 [status update #1]

2007-08-31 Thread Jean-Marc Lasgouttes
"Bo Peng" <[EMAIL PROTECTED]> writes: >> I think that there is another option. ATM, lyx decides that a >> reconfiguration is needed when the timestamp of configure.py is >> newer than that of the .lst files. Why not adding the condition >> that they are also empty? See the attached. > > Then I may