Re: [patch] change tracking output

2005-01-28 Thread Andre Poenitz
On Thu, Jan 27, 2005 at 05:13:07PM +0100, Juergen Spitzmueller wrote: > Angus Leeming wrote: > > Oh, if the file is meant to change only at predetermined times, then a > > single line added to lyx_cb.C's Reconfigure would do the trick: > > > >     LatexFeatures::getAvailable(); > > > > no? > > > >

Re: [patch] change tracking output

2005-01-28 Thread Lars Gullik Bjønnes
Juergen Spitzmueller <[EMAIL PROTECTED]> writes: | Jose' Matos wrote: >> That us premature optimization Jürgen. :-) >> >>   It is easier to simply clear the list since the effect is the same, there >> is no need to consider the different cases. The code then becomes easier to >> understand by anyo

Re: [patch] change tracking output

2005-01-28 Thread Juergen Spitzmueller
Jose' Matos wrote: > When I wrote that my wrist watch still showed 27, I have since then fixed > it. I see you want a fight... No. But I think there are quite a lot of good opportunities ATM. Jürgen

Re: [patch] change tracking output

2005-01-28 Thread Jose' Matos
On Friday 28 January 2005 10:22, Juergen Spitzmueller wrote: > > P.S.: Isn't it Friday today? When I wrote that my wrist watch still showed 27, I have since then fixed it. I see you want a fight... -- José Abílio

Re: [patch] change tracking output

2005-01-28 Thread Juergen Spitzmueller
Jose' Matos wrote: > That us premature optimization Jürgen. :-) > >   It is easier to simply clear the list since the effect is the same, there > is no need to consider the different cases. The code then becomes easier to > understand by anyone. :-) Really? OK, then I change that. Jürgen P.S.: I

Re: [patch] change tracking output

2005-01-28 Thread Jose' Matos
On Friday 28 January 2005 08:52, Juergen Spitzmueller wrote: > > while in case (1) it is not necessary to clear the list (because it is > already empty) it is necessary in (2). That's the reason why I added the > check (to avoid redundant clearing in case 1, which is the more common > one). That

Re: [patch] change tracking output

2005-01-28 Thread Juergen Spitzmueller
Lars Gullik Bjønnes wrote: > Any particualr reason not to just clear it? > >     // Make sure that we are clean >     packages_.clear(); Currently, getAvailable is called from two places: (1) LaTeXFeatures::isAvailable if (packages_.empty()) getAvailable(); (when LyX checks

Re: [patch] change tracking output

2005-01-27 Thread Lars Gullik Bjønnes
Juergen Spitzmueller <[EMAIL PROTECTED]> writes: | Angus Leeming wrote: >> Oh, if the file is meant to change only at predetermined times, then a >> single line added to lyx_cb.C's Reconfigure would do the trick: >> >>     LatexFeatures::getAvailable(); >> >> no? >> >> But you're probably right. N

Re: [patch] change tracking output

2005-01-27 Thread Juergen Spitzmueller
Angus Leeming wrote: > Oh, if the file is meant to change only at predetermined times, then a > single line added to lyx_cb.C's Reconfigure would do the trick: > >     LatexFeatures::getAvailable(); > > no? > > But you're probably right. Not worth it. At the moment. I did it nevertheless. Patch at

Re: [patch] change tracking output

2005-01-24 Thread Juergen Spitzmueller
Angus Leeming wrote: > Oh, if the file is meant to change only at predetermined times, then a > single line added to lyx_cb.C's Reconfigure would do the trick: > >     LatexFeatures::getAvailable(); > > no? Ah, yes, probably. Maybe I'll have a look after my return (weekend). Regards, Jürgen

Re: [patch] change tracking output

2005-01-24 Thread Angus Leeming
Juergen Spitzmueller wrote: > Angus Leeming wrote: >> What you could do is "watch" packages.lst and read it again when it >> changes. See RenderMonitoredPreview (src/insets/render_preview.[Ch]). >> >> Basically, you'd store a >> // Check the file every 2 secs >> lyx::support::FileMonitor monitor_(

Re: [patch] change tracking output

2005-01-24 Thread Juergen Spitzmueller
Angus Leeming wrote: > What you could do is "watch" packages.lst and read it again when it > changes. See RenderMonitoredPreview (src/insets/render_preview.[Ch]). > > Basically, you'd store a >     // Check the file every 2 secs >     lyx::support::FileMonitor monitor_(std::string(), 2000); > > Onc

Re: [patch] change tracking output

2005-01-24 Thread Angus Leeming
Juergen Spitzmueller wrote: > Angus Leeming wrote: >> ..and what's a PackagesList? Is the compiler looking for >> >> LaTeXFeatures::PackagesList LaTeXFeatures::packages_; >> >> perhaps? > > Umm. Thank you both. > The static list works now. The only drawback (vs. non-static) is that you > have to

Re: [patch] change tracking output

2005-01-24 Thread Juergen Spitzmueller
Angus Leeming wrote: > ..and what's a PackagesList? Is the compiler looking for > >     LaTeXFeatures::PackagesList LaTeXFeatures::packages_; > > perhaps? Umm. Thank you both. The static list works now. The only drawback (vs. non-static) is that you have to restart LyX to get packages.lst reparse

Re: [patch] change tracking output

2005-01-24 Thread Georg Baum
Juergen Spitzmueller wrote: > * format incremented to 240. > * new bufferparam: > \output_changes {true|false} > (should the change tracking marks be visible in the output or not?) > * lyx2lyx should just delete the param in 239. Here is the patch. Untested, but should work ;-) Georg? output_ch

Re: [patch] change tracking output

2005-01-24 Thread Angus Leeming
Juergen Spitzmueller wrote: > I might be totally blind, but I cannot get it to compile. ...and what's a PackagesList? Is the compiler looking for LaTeXFeatures::PackagesList LaTeXFeatures::packages_; perhaps? -- Angus

Re: [patch] change tracking output

2005-01-24 Thread Georg Baum
Juergen Spitzmueller wrote: >> PackagesList LaTeXFeatures::packages_; Try LaTeXFeatures::PackagesList LaTeXFeatures::packages_; because PackagesList is a type defined inside the class LaTeXFeatures. Georg

Re: [patch] change tracking output

2005-01-24 Thread Juergen Spitzmueller
Angus Leeming wrote: > It isn't static in the patch you posted. Sure isn't ;-) > Anyway, this is what you need: > > LaTeXFeatures.h > > class LaTeXFeatures { >     ... >     static PackagesList packages_; > }; > > LaTeXFeatures.C (immediately below the #includes): > > PackagesList LaTeXFeatures

Re: [patch] change tracking output

2005-01-24 Thread Juergen Spitzmueller
Georg Baum wrote: > I can do that this evening if I know what you wrote in development/FORMAT. > I guess it is only the new parameter in the header? Yes. Here's what I wrote: * format incremented to 240. * new bufferparam: \output_changes {true|false} (sho

Re: [patch] change tracking output

2005-01-24 Thread Georg Baum
Juergen Spitzmueller wrote: > Jean-Marc Lasgouttes wrote: >> When you do that >> -int const LYX_FORMAT = 239; >> +int const LYX_FORMAT = 240; >> don't forget to update development/FORMAT > > Sure (already done). I'll need someone to adapt lyx2lyx, though. I can do that this evening if I know wha

Re: [patch] change tracking output

2005-01-24 Thread Juergen Spitzmueller
Jean-Marc Lasgouttes wrote: > When you do that > -int const LYX_FORMAT = 239; > +int const LYX_FORMAT = 240; > don't forget to update development/FORMAT Sure (already done). I'll need someone to adapt lyx2lyx, though. Jürgen

Re: [patch] change tracking output

2005-01-24 Thread Jean-Marc Lasgouttes
> "Juergen" == Juergen Spitzmueller <[EMAIL PROTECTED]> writes: Juergen> Done. Updated patch (without the getAvailable() changes) Juergen> attached. When you do that -int const LYX_FORMAT = 239; +int const LYX_FORMAT = 240; don't forget to update development/FORMAT JMarc

Re: [patch] change tracking output

2005-01-24 Thread Jean-Marc Lasgouttes
> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: Angus> It isn't static in the patch you posted. Anyway, this is what Angus> you need: Angus> LaTeXFeatures.h Angus> class LaTeXFeatures { ... static PackagesList packages_; }; Angus> LaTeXFeatures.C (immediately below the #includes): A

Re: [patch] change tracking output

2005-01-24 Thread Angus Leeming
Juergen Spitzmueller wrote: >> I am not sure putting this list in LaTeXFeatures like that is the best >> solution, since packages.lst will be parsed everytime one exports to >> latex... You may want to turn packages_ into a static variable and >> make getPackage static too. > > I tried this, but t

Re: [patch] change tracking output

2005-01-24 Thread Juergen Spitzmueller
Jean-Marc Lasgouttes wrote: > > "Juergen" == Juergen Spitzmueller <[EMAIL PROTECTED]> writes: > The patch looks good. A few remarks: > > + case LFUN_OUTPUT_CHANGES: { > + LaTeXFeatures features(*buf, buf->params(), false); > + if (!features.isAvailable("dvipost")) >

Re: [patch] change tracking output

2005-01-24 Thread Jean-Marc Lasgouttes
> "Juergen" == Juergen Spitzmueller <[EMAIL PROTECTED]> writes: Juergen> The attached patch fixes some real problems with the output Juergen> of change tracked documents and implements a possibility to Juergen> check whether a (required) package is installed. Good idea. Juergen> - If dvipost

[patch] change tracking output

2005-01-23 Thread Juergen Spitzmueller
The attached patch fixes some real problems with the output of change tracked documents and implements a possibility to check whether a (required) package is installed. The problems, which always occur when a user is in change tracking mode (also cf. bug 1031): - If dvipost is not installed, e