Re: FYI: Translation of web site

2008-11-22 Thread Christian Ridderström

On Fri, 21 Nov 2008, Jean-Marc Lasgouttes wrote:

If people have good reasons for why we should discourage translations of 
the web pages, now is good time to give them.


The only good reason would be that they are not enough kept to date. 
What if there is a download page in german, but it does not have the 
latest versions?


I think I can fix something for the download page. One way would be 
to create it using a template, so that the translations would only 
require certain phrases to be translated. The backend is already in 
place for this. It's a good point though, and something that needs to be 
dealt with carefully.


/Christian

--
Christian Ridderström, +46-8-768 39 44http://www.md.kth.se/~chr

Re: FYI: Translation of web site

2008-11-22 Thread Joost Verburg

Jean-Marc Lasgouttes wrote:
If people have good reasons for why we should discourage translations 
of the web pages, now is good time to give them.


The only good reason would be that they are not enough kept to date. 
What if there is a download page in

german, but it does not have the latest versions?


Maybe we can create a template with a download link to the latest version.

Joost



[PATCH] Bug 5539

2008-11-22 Thread rgheck


The attached patch is a first, simple fix for this bug: If a file fails 
to load, we do not try to load it again. The downside to this version is 
that, even if you fixed the problem, then it won't try to load again. I 
tried resetting the failedtoload_ variable in fileChanged(), but that 
didn't work, as it doesn't seem to get hit. I guess that doesn't get 
checked for child documents.


Note that most of this is moving certain methods into InsetInclude.

rh

Index: src/insets/InsetInclude.cpp
===
--- src/insets/InsetInclude.cpp	(revision 27676)
+++ src/insets/InsetInclude.cpp	(working copy)
@@ -160,7 +160,8 @@
 
 InsetInclude::InsetInclude(InsetCommandParams const & p)
 	: InsetCommand(p, "include"), include_label(uniqueID()),
-	  preview_(new RenderMonitoredPreview(this)), set_label_(false), label_(0)
+	  preview_(new RenderMonitoredPreview(this)), failedtoload_(false),
+	  set_label_(false), label_(0)
 {
 	preview_->fileChanged(boost::bind(&InsetInclude::fileChanged, this));
 
@@ -173,7 +174,8 @@
 
 InsetInclude::InsetInclude(InsetInclude const & other)
 	: InsetCommand(other), include_label(other.include_label),
-	  preview_(new RenderMonitoredPreview(this)), set_label_(false), label_(0)
+	  preview_(new RenderMonitoredPreview(this)), failedtoload_(false),
+	  set_label_(false), label_(0)
 {
 	preview_->fileChanged(boost::bind(&InsetInclude::fileChanged, this));
 
@@ -351,31 +353,34 @@
 }
 
 
-/// return the child buffer if the file is a LyX doc and is loaded
-Buffer * getChildBuffer(Buffer const & buffer, InsetCommandParams const & params)
+Buffer * InsetInclude::getChildBuffer(Buffer const & buffer) const
 {
-	if (isVerbatim(params) || isListings(params))
+	InsetCommandParams const & p = params();
+	if (isVerbatim(p) || isListings(p))
 		return 0;
 
-	string const included_file = includedFilename(buffer, params).absFilename();
+	string const included_file = includedFilename(buffer, p).absFilename();
 	if (!isLyXFilename(included_file))
 		return 0;
 
-	Buffer * childBuffer = loadIfNeeded(buffer, params); 
+	Buffer * childBuffer = loadIfNeeded(buffer); 
 
 	// FIXME: recursive includes
 	return (childBuffer == &buffer) ? 0 : childBuffer;
 }
 
 
-/// return true if the file is or got loaded.
-Buffer * loadIfNeeded(Buffer const & parent, InsetCommandParams const & params)
+Buffer * InsetInclude::loadIfNeeded(Buffer const & parent) const
 {
-	if (isVerbatim(params) || isListings(params))
+	InsetCommandParams const & p = params();
+	if (failedtoload_)
 		return 0;
 
+	if (isVerbatim(p) || isListings(p))
+		return 0;
+
 	string const parent_filename = parent.absFileName();
-	FileName const included_file = makeAbsPath(to_utf8(params["filename"]),
+	FileName const included_file = makeAbsPath(to_utf8(p["filename"]),
 			   onlyPath(parent_filename));
 
 	if (!isLyXFilename(included_file.absFilename()))
@@ -393,6 +398,7 @@
 			return 0;
 
 		if (!child->loadLyXFile(included_file)) {
+			failedtoload_ = true;
 			//close the buffer we just opened
 			theBufferList().release(child);
 			return 0;
@@ -466,7 +472,7 @@
 		 isLyXFilename(included_file.absFilename())) {
 		//if it's a LyX file and we're inputting or including,
 		//try to load it so we can write the associated latex
-		if (!loadIfNeeded(buffer(), params()))
+		if (!loadIfNeeded(buffer()))
 			return false;
 
 		Buffer * tmp = theBufferList().getBuffer(included_file);
@@ -626,7 +632,7 @@
 	string const exportfile = changeExtension(incfile, ".sgml");
 	DocFileName writefile(changeExtension(included_file, ".sgml"));
 
-	if (loadIfNeeded(buffer(), params())) {
+	if (loadIfNeeded(buffer())) {
 		Buffer * tmp = theBufferList().getBuffer(FileName(included_file));
 
 		string const mangled = writefile.mangledFilename();
@@ -689,7 +695,7 @@
 	// Here we must do the fun stuff...
 	// Load the file in the include if it needs
 	// to be loaded:
-	if (loadIfNeeded(buffer(), params())) {
+	if (loadIfNeeded(buffer())) {
 		// a file got loaded
 		Buffer * const tmp = theBufferList().getBuffer(FileName(included_file));
 		// make sure the buffer isn't us
@@ -711,7 +717,7 @@
 void InsetInclude::fillWithBibKeys(BiblioInfo & keys,
 	InsetIterator const & /*di*/) const
 {
-	if (loadIfNeeded(buffer(), params())) {
+	if (loadIfNeeded(buffer())) {
 		string const included_file = includedFilename(buffer(), params()).absFilename();
 		Buffer * tmp = theBufferList().getBuffer(FileName(included_file));
 		BiblioInfo const & newkeys = tmp->localBibInfo();
@@ -722,7 +728,7 @@
 
 void InsetInclude::updateBibfilesCache()
 {
-	Buffer * const tmp = getChildBuffer(buffer(), params());
+	Buffer * const tmp = getChildBuffer(buffer());
 	if (tmp) {
 		tmp->setParent(0);
 		tmp->updateBibfilesCache();
@@ -734,7 +740,7 @@
 support::FileNameList const &
 	InsetInclude::getBibfilesCache(Buffer const & buffer) const
 {
-	Buffer * const tmp = getChildBuffer(buffer, params());
+	Buffer * const tmp = getChildBuffer(buffer);
 	if

Re: Buffer Message Assert [Was: trunk is asserting on shutdown]

2008-11-22 Thread rgheck

Enrico Forestieri wrote:

On Sat, Nov 22, 2008 at 07:23:56PM +0100, Abdelrazak Younes wrote:
  
Actually the internal buffer is properly created and deleted; IOW I 
cannot reproduce the assertion... Do you still can?



The bug does not always happens. Here is a recipe for triggering it:
1) Load and preview the user guide (DVI or PDF)
2) Quit LyX

../../../src/support/FileName.cpp(602): Could not delete 
/tmp/lyx_tmpdir.JL3220/lyx_tmpbuf1
../../../src/support/lassert.cpp(21): ASSERTION singleton_ VIOLATED IN 
../../src/LyX.cpp:1221
Assertion triggered in void lyx::doAssert(const char*, const char*, long int) by failing 
check "false" in file ../../../src/support/lassert.cpp:23
Segmentation fault (core dumped)

  

I don't actually need to preview it. But same idea.

rh




Re: Buffer Message Assert [Was: trunk is asserting on shutdown]

2008-11-22 Thread Enrico Forestieri
On Sat, Nov 22, 2008 at 07:23:56PM +0100, Abdelrazak Younes wrote:
> Actually the internal buffer is properly created and deleted; IOW I 
> cannot reproduce the assertion... Do you still can?

The bug does not always happens. Here is a recipe for triggering it:
1) Load and preview the user guide (DVI or PDF)
2) Quit LyX

../../../src/support/FileName.cpp(602): Could not delete 
/tmp/lyx_tmpdir.JL3220/lyx_tmpbuf1
../../../src/support/lassert.cpp(21): ASSERTION singleton_ VIOLATED IN 
../../src/LyX.cpp:1221
Assertion triggered in void lyx::doAssert(const char*, const char*, long int) 
by failing check "false" in file ../../../src/support/lassert.cpp:23
Segmentation fault (core dumped)

-- 
Enrico


Re: Hebrew and Proof Environment

2008-11-22 Thread Dov Feldstern

Jürgen Spitzmüller wrote:

Dov Feldstern wrote:

Hmm, it looks like there's a missing newline in the tex output which is
causing the problem: attached find the tex output I'm getting from Amir's
LyX file in 2.0svn (in which the problem he describes exists), and a fixed
tex output which displays correctly, I think (Amir, can you confirm that
the fixed output is correct?).

Does anyone have any ideas why that newline disappeared?


In order to fix this bug probably:
http://bugzilla.lyx.org/show_bug.cgi?id=4993



Yes, I can confirm that undoing r25416 and r27236, r27237 fixes the problem Amir 
reported.


Adding a ---Separator--- environment before the proof *does* help, but I doubt 
that that can be considered more than a workaround...


Is this a bug in article(Hebrew) (i.e., should it not be sensitive to a newline 
before it, given that it is an environment)? Or is it a bug in LyX? I'm not 
familiar enough with bugs 5436, 4993 (which the above changesets solve), but I 
see that there's a comment there (added by Richard) with a FIXME, so I presume 
that this is a LyX issue?


Should Amir open a bug for this?

Dov


Bug 5472

2008-11-22 Thread Vincent van Ravesteijn

Olivier Ripoll schreef:
It means you are the first person having tried the crash recipe to 
report no LyX crash...
No, I'm probably the first one who went looking for the crash and 
succeeded to find it. I have now tried four different PCs and only one 
shows the culprit. If the bug would always reveal itself by following 
your recipe, the bug was probably already solved.



Any idea for other culprit ?
I installed Adobe Acrobat 7.0 at one of the PCs that previously did not 
show the bug. And guess what... the bug appears... but only when LyX is 
compiled in the 'Release' version. When compiled in the debug version, 
nothing happens. This is probably the same as bug 4846.  
http://bugzilla.lyx.org/show_bug.cgi?id=4846


// FIXME: Work around bug 4846 for Windows Vista and Qt4
   // (see http://bugzilla.lyx.org/show_bug.cgi?id=4846)
   // If the clipboard is not cleared, LyX crashes on exit when it is
   // compiled in release mode and if there is something in the clipboard.
   // This is related to QWindowsMimeMetafile which is apparently not
   // properly destroyed.

Bug  5472 disappears when:

* The QWindowsMimeMetafile wmf_mime_ is not registered. (commenting out 
[EMAIL PROTECTED])

or
* QWindowsMimeMetafile::[EMAIL PROTECTED]@531 returns 
true in stead of false. (Then pasting from LyX into Word does not work 
anymore).


Any one an idea ?

Vincent


Re: Buffer Message Assert [Was: trunk is asserting on shutdown]

2008-11-22 Thread Abdelrazak Younes

On 22/11/2008 14:58, Abdelrazak Younes wrote:

On 22/11/2008 14:44, rgheck wrote:

Jürgen Spitzmüller wrote:

rgheck wrote:
I think the warning is wrong, though. There's no reason there 
should be
a failure to remove the temporary directory...except perhaps that 
it was

already destroyed. So I think we have an extra Buffer lying around for
some reason, and it's being destroyed on exit. This might be an issue
with the new search stuff. It creates a Buffer for its own use, 
doesn't it?


But then we have two bugs:

1.) the warning, as it appears, is wrong
2.) the warning itself will always trigger an assert, even it it is 
issued for good reason


This second bug is also in branch, AFAICS. What shall we do? Use a 
console warning instead?


I'm guessing Abdel will know what to do. I seem to remember a similar 
issue a while ago. And we may not actually need to do anything. My 
sense is that all the Buffer objects are supposed to be destroyed by 
us, manually, not by glibc or whatever on shutdown. So I think it may 
be just the one bug: That we have an undestroyed Buffer.


Right. I'll have a look.


Actually the internal buffer is properly created and deleted; IOW I 
cannot reproduce the assertion... Do you still can?


Abdel.



Re: [Fwd: [Cvslog] r27656 - /lyx-devel/trunk/src/TextMetrics.cpp]

2008-11-22 Thread Jürgen Spitzmüller
Dov Feldstern wrote:
> Should this kind of thing --- which is purely "under the hood" --- be
> documented in status.16x, or no need? (reminder: code reuse in overloaded
> versions of isRTLBoundary)

I don't think this specific change needs to be documented.

Jürgen


Re: Hebrew and Proof Environment

2008-11-22 Thread Jürgen Spitzmüller
Dov Feldstern wrote:
> >> in the new version, after I render to pdf, the proof doesn't start at
> >> a new
> >> line.
> >> i.e in LyX I see:
> >>
> >> bla bla bla
> >> proof: bla bla 2
> >>
> >> and after I render I see:
> >>
> >> bla bla bla proof bla bla 2

Try if inserting a ---Separator--- environment right before the proof helps.

Jürgen


Re: [Fwd: [Cvslog] r27656 - /lyx-devel/trunk/src/TextMetrics.cpp]

2008-11-22 Thread Dov Feldstern

Jürgen Spitzmüller wrote:

Dov Feldstern wrote:

Jürgen, OK for branch?


OK.

Jürgen


Should this kind of thing --- which is purely "under the hood" --- be documented 
in status.16x, or no need? (reminder: code reuse in overloaded versions of 
isRTLBoundary)


Re: Hebrew and Proof Environment

2008-11-22 Thread Amir Rachum
The fixed pdf looks fine.

On Sat, Nov 22, 2008 at 7:46 PM, Dov Feldstern <[EMAIL PROTECTED]> wrote:

> Amir Rachum wrote:
>
>> How do I compile these? When I use Import > LaTeX (plain) I get a weird
>> file, with both those files. I can attach a screen shot if you want me to.
>>
>>
> I'm not sure how it's done in Windows; in linux I just run the latex
> command on them to see that the output is correct:
>
> latex 
>
> produces a dvi file (I'm attaching a pdf of the fixed output, just so that
> you can confirm it's correct).
>
> If import isn't working, that may be another problem, but I never import
> latex into LyX, so I'm just not sure...
>



-- 
Amir Rachum


Re: Hebrew and Proof Environment

2008-11-22 Thread Dov Feldstern

Amir Rachum wrote:
How do I compile these? When I use Import > LaTeX (plain) I get a weird 
file, with both those files. I can attach a screen shot if you want me to.




I'm not sure how it's done in Windows; in linux I just run the latex command on 
them to see that the output is correct:


latex 

produces a dvi file (I'm attaching a pdf of the fixed output, just so that you 
can confirm it's correct).


If import isn't working, that may be another problem, but I never import latex 
into LyX, so I'm just not sure...


proofexample-fixed.pdf
Description: Adobe PDF document


Re: Hebrew and Proof Environment

2008-11-22 Thread Jürgen Spitzmüller
Dov Feldstern wrote:
> Hmm, it looks like there's a missing newline in the tex output which is
> causing the problem: attached find the tex output I'm getting from Amir's
> LyX file in 2.0svn (in which the problem he describes exists), and a fixed
> tex output which displays correctly, I think (Amir, can you confirm that
> the fixed output is correct?).
>
> Does anyone have any ideas why that newline disappeared?

In order to fix this bug probably:
http://bugzilla.lyx.org/show_bug.cgi?id=4993

> On a separate note, just out of curiosity: I'm not able to compile the 1.6
> tex output Amir sent --- I'm getting
>
> LaTeX Error: Command \textquotedbl unavailable in encoding LHE
>
> Juergen -- this looks like it may be related to what you just fixed? But I
> don't understand why it seems to be compiling for Amir without any trouble?
> Anyhow, I don't know if this is important; I don't think it's related to
> his problem, in any case

Yes, this should be fixed in 1.6.1svn and trunk.

Jürgen


Re: Hebrew and Proof Environment

2008-11-22 Thread Amir Rachum
How do I compile these? When I use Import > LaTeX (plain) I get a weird
file, with both those files. I can attach a screen shot if you want me to.

On Sat, Nov 22, 2008 at 7:30 PM, Dov Feldstern <[EMAIL PROTECTED]> wrote:

> Amir Rachum wrote:
>
>> Here is an example, hope that helps.
>>
>> thanks
>>
>> On Sat, Nov 22, 2008 at 6:31 PM, Dov Feldstern <[EMAIL PROTECTED] > [EMAIL PROTECTED]>> wrote:
>>
>>rgheck wrote:
>>
>>Amir Rachum wrote:
>>
>>I've recently upgraded to LyX 1.6 and using Windows XP.
>>I use the document class article (Hebrew). I use the proof
>>environment, but
>>in the new version, after I render to pdf, the proof doesn't
>>start at a new
>>line.
>>i.e in LyX I see:
>>
>>bla bla bla
>>proof: bla bla 2
>>
>>and after I render I see:
>>
>>bla bla bla proof bla bla 2
>>
>>
>>This happens with documents I edited with the previous
>>version of LyX and
>>they render fine with 1.5.
>>What can I do?
>>
>>
>>
>>Hi, Amir!
>>
>>Can you please send a minimal example which includes this problem?
>>I'd like to see three files: the LyX file itself, an export to latex
>>from 1.5 (i.e., an example with correct output), and an export to
>>latex from 1.6 (with incorrect output). That'll help us figure out
>>what's wrong.
>>
>>Dov
>>
>>
>>
>>
>> --
>> Amir Rachum
>>
>
> Hmm, it looks like there's a missing newline in the tex output which is
> causing the problem: attached find the tex output I'm getting from Amir's
> LyX file in 2.0svn (in which the problem he describes exists), and a fixed
> tex output which displays correctly, I think (Amir, can you confirm that the
> fixed output is correct?).
>
> Does anyone have any ideas why that newline disappeared?
>
> On a separate note, just out of curiosity: I'm not able to compile the 1.6
> tex output Amir sent --- I'm getting
>
> LaTeX Error: Command \textquotedbl unavailable in encoding LHE
>
> Juergen -- this looks like it may be related to what you just fixed? But I
> don't understand why it seems to be compiling for Amir without any trouble?
> Anyhow, I don't know if this is important; I don't think it's related to his
> problem, in any case
>
> Dov
>



-- 
Amir Rachum


Re: Hebrew and Proof Environment

2008-11-22 Thread Dov Feldstern

Amir Rachum wrote:

Here is an example, hope that helps.

thanks

On Sat, Nov 22, 2008 at 6:31 PM, Dov Feldstern <[EMAIL PROTECTED] 
> wrote:


rgheck wrote:

Amir Rachum wrote:

I've recently upgraded to LyX 1.6 and using Windows XP.
I use the document class article (Hebrew). I use the proof
environment, but
in the new version, after I render to pdf, the proof doesn't
start at a new
line.
i.e in LyX I see:

bla bla bla
proof: bla bla 2

and after I render I see:

bla bla bla proof bla bla 2


This happens with documents I edited with the previous
version of LyX and
they render fine with 1.5.
What can I do?



Hi, Amir!

Can you please send a minimal example which includes this problem?
I'd like to see three files: the LyX file itself, an export to latex
from 1.5 (i.e., an example with correct output), and an export to
latex from 1.6 (with incorrect output). That'll help us figure out
what's wrong.

Dov




--
Amir Rachum


Hmm, it looks like there's a missing newline in the tex output which is causing 
the problem: attached find the tex output I'm getting from Amir's LyX file in 
2.0svn (in which the problem he describes exists), and a fixed tex output which 
displays correctly, I think (Amir, can you confirm that the fixed output is 
correct?).


Does anyone have any ideas why that newline disappeared?

On a separate note, just out of curiosity: I'm not able to compile the 1.6 tex 
output Amir sent --- I'm getting


LaTeX Error: Command \textquotedbl unavailable in encoding LHE

Juergen -- this looks like it may be related to what you just fixed? But I don't 
understand why it seems to be compiling for Amir without any trouble? Anyhow, I 
don't know if this is important; I don't think it's related to his problem, in 
any case


Dov


proofexample-2.0.tex
Description: TeX document


proofexample-fixed.tex
Description: TeX document


Re: Hebrew and Proof Environment

2008-11-22 Thread Amir Rachum
Here is an example, hope that helps.

thanks

On Sat, Nov 22, 2008 at 6:31 PM, Dov Feldstern <[EMAIL PROTECTED]> wrote:

> rgheck wrote:
>
>> Amir Rachum wrote:
>>
>>> I've recently upgraded to LyX 1.6 and using Windows XP.
>>> I use the document class article (Hebrew). I use the proof environment,
>>> but
>>> in the new version, after I render to pdf, the proof doesn't start at a
>>> new
>>> line.
>>> i.e in LyX I see:
>>>
>>> bla bla bla
>>> proof: bla bla 2
>>>
>>> and after I render I see:
>>>
>>> bla bla bla proof bla bla 2
>>>
>>>
>>> This happens with documents I edited with the previous version of LyX and
>>> they render fine with 1.5.
>>> What can I do?
>>>
>>>
>>>
> Hi, Amir!
>
> Can you please send a minimal example which includes this problem? I'd like
> to see three files: the LyX file itself, an export to latex from 1.5 (i.e.,
> an example with correct output), and an export to latex from 1.6 (with
> incorrect output). That'll help us figure out what's wrong.
>
> Dov
>
>


-- 
Amir Rachum


proofexample.lyx
Description: application/lyx


proofexample-1.5.tex
Description: TeX document


proofexample-1.6.tex
Description: TeX document


Re: Compilation failure

2008-11-22 Thread Abdelrazak Younes

On 22/11/2008 17:21, Jean-Marc Lasgouttes wrote:

Trunk does not compile right now. Abdel, this is with qt 4.3.0.


Sorry, I forgot to commit the ui file. Fixed now.

Abdel.



Re: Compilation failure

2008-11-22 Thread Jean-Marc Lasgouttes


Le 22 nov. 08 à 18:01, Abdelrazak Younes a écrit :


On 22/11/2008 17:21, Jean-Marc Lasgouttes wrote:

Trunk does not compile right now. Abdel, this is with qt 4.3.0.


That's weird, FindAndReplaceUi should use EmbeddedWorkArea now, are  
you sure that it was uic'd?




In the ui file I see:

 name="find_work_area_" >


JMarc

Re: Compilation failure

2008-11-22 Thread Abdelrazak Younes

On 22/11/2008 17:21, Jean-Marc Lasgouttes wrote:

Trunk does not compile right now. Abdel, this is with qt 4.3.0.


That's weird, FindAndReplaceUi should use EmbeddedWorkArea now, are you 
sure that it was uic'd?




JMarc

g++ -DHAVE_CONFIG_H -I. -I../../../../lyx-devel/src/frontends/qt4 
-I../../..  -DQT_NO_STL -DQT_NO_KEYWORDS -DQT_NO_CAST_TO_ASCII 
-DQT_NO_STL -I../../../../lyx-devel/src 
-I../../../../lyx-devel/src/frontends -I../../../../lyx-devel/images 
-I/Users/jmarc/src/qt/build/include 
-I/Users/jmarc/src/qt/build/include/QtCore 
-I/Users/jmarc/src/qt/build/include/QtGui   
-I../../../../lyx-devel/boost  -Wextra -Wall-g -O -MT 
FindAndReplace.o -MD -MP -MF .deps/FindAndReplace.Tpo -c -o 
FindAndReplace.o 
../../../../lyx-devel/src/frontends/qt4/FindAndReplace.cpp
./ui_FindAndReplaceUi.h: In member function ‘void 
Ui_FindAndReplaceUi::setupUi(QWidget*)’:
./ui_FindAndReplaceUi.h:75: error: ‘class lyx::frontend::GuiWorkArea’ 
has no member named ‘setWidgetResizable’
../../../../lyx-devel/src/frontends/qt4/FindAndReplace.cpp: In member 
function ‘virtual void 
lyx::frontend::FindAndReplace::hideEvent(QHideEvent*)’:
../../../../lyx-devel/src/frontends/qt4/FindAndReplace.cpp:148: error: 
‘class lyx::frontend::GuiWorkArea’ has no member named ‘disable’
../../../../lyx-devel/src/frontends/qt4/FindAndReplace.cpp: In member 
function ‘void lyx::frontend::FindAndReplace::on_closePB_clicked()’:
../../../../lyx-devel/src/frontends/qt4/FindAndReplace.cpp:186: error: 
‘class lyx::frontend::GuiWorkArea’ has no member named ‘disable’

make[6]: *** [FindAndReplace.o] Error 1







Re: Modules loading preamble lines unnecessarily

2008-11-22 Thread Jürgen Spitzmüller
Jean-Marc Lasgouttes wrote:
> I'll apply it when I can build. Juergen, is it OK for branch?

Yes, looks good.

Jürgen


Re: Modules loading preamble lines unnecessarily

2008-11-22 Thread Jean-Marc Lasgouttes

What about this patch?


Looks simple enough.


I'll apply it when I can build. Juergen, is it OK for branch?

JMarc


Re: Modules loading preamble lines unnecessarily

2008-11-22 Thread rgheck

Jean-Marc Lasgouttes wrote:
LyX isn't (currently) aware of what's being output and what isn't 
being output, at least not in this respect. So when it sees an 
endnote, it adds the package.


What about this patch?


Looks simple enough.

rh



Re: Modules loading preamble lines unnecessarily

2008-11-22 Thread Jean-Marc Lasgouttes
LyX isn't (currently) aware of what's being output and what isn't  
being output, at least not in this respect. So when it sees an  
endnote, it adds the package.


What about this patch?

JMarc



nopreamble.diff
Description: Binary data


Re: Hebrew and Proof Environment

2008-11-22 Thread Dov Feldstern

rgheck wrote:

Amir Rachum wrote:

I've recently upgraded to LyX 1.6 and using Windows XP.
I use the document class article (Hebrew). I use the proof 
environment, but
in the new version, after I render to pdf, the proof doesn't start at 
a new

line.
i.e in LyX I see:

bla bla bla
proof: bla bla 2

and after I render I see:

bla bla bla proof bla bla 2


This happens with documents I edited with the previous version of LyX and
they render fine with 1.5.
What can I do?




Hi, Amir!

Can you please send a minimal example which includes this problem? I'd like to 
see three files: the LyX file itself, an export to latex from 1.5 (i.e., an 
example with correct output), and an export to latex from 1.6 (with incorrect 
output). That'll help us figure out what's wrong.


Dov



Compilation failure

2008-11-22 Thread Jean-Marc Lasgouttes

Trunk does not compile right now. Abdel, this is with qt 4.3.0.

JMarc

g++ -DHAVE_CONFIG_H -I. -I../../../../lyx-devel/src/frontends/qt4 - 
I../../..  -DQT_NO_STL -DQT_NO_KEYWORDS -DQT_NO_CAST_TO_ASCII - 
DQT_NO_STL -I../../../../lyx-devel/src -I../../../../lyx-devel/src/ 
frontends -I../../../../lyx-devel/images -I/Users/jmarc/src/qt/build/ 
include -I/Users/jmarc/src/qt/build/include/QtCore -I/Users/jmarc/src/ 
qt/build/include/QtGui   -I../../../../lyx-devel/boost  -Wextra - 
Wall-g -O -MT FindAndReplace.o -MD -MP -MF .deps/ 
FindAndReplace.Tpo -c -o FindAndReplace.o ../../../../lyx-devel/src/ 
frontends/qt4/FindAndReplace.cpp
./ui_FindAndReplaceUi.h: In member function ‘void  
Ui_FindAndReplaceUi::setupUi(QWidget*)’:
./ui_FindAndReplaceUi.h:75: error: ‘class lyx::frontend::GuiWorkArea’  
has no member named ‘setWidgetResizable’
../../../../lyx-devel/src/frontends/qt4/FindAndReplace.cpp: In member  
function ‘virtual void lyx::frontend::FindAndReplace::hideEvent 
(QHideEvent*)’:
../../../../lyx-devel/src/frontends/qt4/FindAndReplace.cpp:148:  
error: ‘class lyx::frontend::GuiWorkArea’ has no member named ‘disable’
../../../../lyx-devel/src/frontends/qt4/FindAndReplace.cpp: In member  
function ‘void lyx::frontend::FindAndReplace::on_closePB_clicked()’:
../../../../lyx-devel/src/frontends/qt4/FindAndReplace.cpp:186:  
error: ‘class lyx::frontend::GuiWorkArea’ has no member named ‘disable’

make[6]: *** [FindAndReplace.o] Error 1



Re: Modules loading preamble lines unnecessarily

2008-11-22 Thread rgheck

Bennett Helm wrote:

On Sat, Nov 22, 2008 at 8:37 AM, rgheck <[EMAIL PROTECTED]> wrote:
  

Bennett Helm wrote:


Another possible module bug ... though perhaps one not worth fixing.

Create a document and add a module like Endnotes. Checking the latex
source, merely adding the endnotes module doesn't change anything yet:
you have to add an endnote, and only then does the
\usepackage{endnotes} line get added to the preamble.

However, if you add an endnote within a LyX Note (and nowhere else in
the document), the endnote will not appear in the LaTeX output, and
yet the \usepackage{endnotes} line is added to the preamble anyway --
unnecessarily.

Should this not happen?


  

This isn't module-specific. You'd find the same thing happened, say, with
the use of AMS classes, if you have "Use AMS Automatically" checked. LyX
isn't (currently) aware of what's being output and what isn't being output,
at least not in this respect. So when it sees an endnote, it adds the
package.



Fair enough.

  
Which isn't to say LyX ought to work that way. You might want to 
bugzilla it as a general issue.



By the way, the more I explore them, the more I realize modules are brilliant!

  

Thanks!

rh



Re: Modules Bug?

2008-11-22 Thread rgheck

Bennett Helm wrote:

On Sat, Nov 22, 2008 at 8:33 AM, rgheck <[EMAIL PROTECTED]> wrote:
  

You need to use AddToPreamble instead of Preamble. The Preamble command
overwrites all previous Preamble declarations.

I know that's silly, but that's how Preamble has always worked. It's also
why I added AddToPreamble.



Ah -- that makes sense. What's confusing here is that "Preamble" when
used in defining paragraph styles, e.g., doesn't overwrite the
existing preamble. I wonder whether it would be worthwhile having
paragraph style definitions use "AddToPreamble" as well.

  
Probably the right thing to do is make Preamble do what AddToPreamble 
now does, and add a "ReplacePreamble" tag for what Preamble used to do. 
This actually came up first when I was modularizing the AMS classes. 
Modules typically do not want to overwrite the preamble but to add to 
it, so we should make that the easy thing to do.


rh



Re: Modules loading preamble lines unnecessarily

2008-11-22 Thread Bennett Helm
On Sat, Nov 22, 2008 at 8:37 AM, rgheck <[EMAIL PROTECTED]> wrote:
> Bennett Helm wrote:
>>
>> Another possible module bug ... though perhaps one not worth fixing.
>>
>> Create a document and add a module like Endnotes. Checking the latex
>> source, merely adding the endnotes module doesn't change anything yet:
>> you have to add an endnote, and only then does the
>> \usepackage{endnotes} line get added to the preamble.
>>
>> However, if you add an endnote within a LyX Note (and nowhere else in
>> the document), the endnote will not appear in the LaTeX output, and
>> yet the \usepackage{endnotes} line is added to the preamble anyway --
>> unnecessarily.
>>
>> Should this not happen?
>>
>>
>
> This isn't module-specific. You'd find the same thing happened, say, with
> the use of AMS classes, if you have "Use AMS Automatically" checked. LyX
> isn't (currently) aware of what's being output and what isn't being output,
> at least not in this respect. So when it sees an endnote, it adds the
> package.

Fair enough.

By the way, the more I explore them, the more I realize modules are brilliant!

Bennett


Re: Modules Bug?

2008-11-22 Thread Bennett Helm
On Sat, Nov 22, 2008 at 8:33 AM, rgheck <[EMAIL PROTECTED]> wrote:
> You need to use AddToPreamble instead of Preamble. The Preamble command
> overwrites all previous Preamble declarations.
>
> I know that's silly, but that's how Preamble has always worked. It's also
> why I added AddToPreamble.

Ah -- that makes sense. What's confusing here is that "Preamble" when
used in defining paragraph styles, e.g., doesn't overwrite the
existing preamble. I wonder whether it would be worthwhile having
paragraph style definitions use "AddToPreamble" as well.

Bennett


Re: Buffer Message Assert [Was: trunk is asserting on shutdown]

2008-11-22 Thread Abdelrazak Younes

On 22/11/2008 14:44, rgheck wrote:

Jürgen Spitzmüller wrote:

rgheck wrote:

I think the warning is wrong, though. There's no reason there should be
a failure to remove the temporary directory...except perhaps that it 
was

already destroyed. So I think we have an extra Buffer lying around for
some reason, and it's being destroyed on exit. This might be an issue
with the new search stuff. It creates a Buffer for its own use, 
doesn't it?


But then we have two bugs:

1.) the warning, as it appears, is wrong
2.) the warning itself will always trigger an assert, even it it is 
issued for good reason


This second bug is also in branch, AFAICS. What shall we do? Use a 
console warning instead?


I'm guessing Abdel will know what to do. I seem to remember a similar 
issue a while ago. And we may not actually need to do anything. My 
sense is that all the Buffer objects are supposed to be destroyed by 
us, manually, not by glibc or whatever on shutdown. So I think it may 
be just the one bug: That we have an undestroyed Buffer.


Right. I'll have a look.

Abdel.



Re: ForkedCall

2008-11-22 Thread Abdelrazak Younes

On 22/11/2008 11:56, Peter Kümmel wrote:

LyX wrote:

On 21/11/2008 22:03, Peter Kümmel wrote:

Peter Kümmel wrote:

Peter Kümmel corrects:


Doesn't ForkedCall do in principle the same as SystemCall?

Seems this external tool execution is a big redundant hack
which everybody fears to touch.


Looking at ForkedCall more detailed, it becomes clear that I
also have to replace this class with a QProcess based one and
to merge it with SystemCall.

ForkedCall starts a process and emits signals, that's really
a QProcess candidate.


Funny, I thought that your branch was about exactly that :-)

Abdel.



Have you changed your name? ;)


Just changed my system and I forgot how to configure Thunderbirds :-)

Abdel.



Re: [Cvslog] r27623 - /lyx-devel/branches/personal/kuemmel/progress_me...

2008-11-22 Thread Abdelrazak Younes

On 22/11/2008 11:53, Peter Kümmel wrote:

Pavel Sanda wrote:


but the basic question is was why to replace the old calls by newer 
ones when

we dont desperately need background call for those.



My intention is to cleanup and simplify the code.


And that's a worthy goal.


But I must admit, technically
there is not much gain for rcs, and like everybody else I know "never 
touch a running
system". So I'm skeptical about proceeding, especially because I'm the 
only one

working on this stuff which easily completely breaks LyX.


I think you are on the right track on that if you start using QProcess 
for one process (Latex) than all other process management code should be 
migrated to QProcess.


Abdel.



Buffer Message Assert [Was: trunk is asserting on shutdown]

2008-11-22 Thread rgheck

Jürgen Spitzmüller wrote:

rgheck wrote:
  

I think the warning is wrong, though. There's no reason there should be
a failure to remove the temporary directory...except perhaps that it was
already destroyed. So I think we have an extra Buffer lying around for
some reason, and it's being destroyed on exit. This might be an issue
with the new search stuff. It creates a Buffer for its own use, doesn't it?



But then we have two bugs:

1.) the warning, as it appears, is wrong
2.) the warning itself will always trigger an assert, even it it is issued for 
good reason


This second bug is also in branch, AFAICS. What shall we do? Use a console 
warning instead?


  
I'm guessing Abdel will know what to do. I seem to remember a similar 
issue a while ago. And we may not actually need to do anything. My sense 
is that all the Buffer objects are supposed to be destroyed by us, 
manually, not by glibc or whatever on shutdown. So I think it may be 
just the one bug: That we have an undestroyed Buffer.


Richard



Re: Modules loading preamble lines unnecessarily

2008-11-22 Thread rgheck

Bennett Helm wrote:

Another possible module bug ... though perhaps one not worth fixing.

Create a document and add a module like Endnotes. Checking the latex
source, merely adding the endnotes module doesn't change anything yet:
you have to add an endnote, and only then does the
\usepackage{endnotes} line get added to the preamble.

However, if you add an endnote within a LyX Note (and nowhere else in
the document), the endnote will not appear in the LaTeX output, and
yet the \usepackage{endnotes} line is added to the preamble anyway --
unnecessarily.

Should this not happen?

  
This isn't module-specific. You'd find the same thing happened, say, 
with the use of AMS classes, if you have "Use AMS Automatically" 
checked. LyX isn't (currently) aware of what's being output and what 
isn't being output, at least not in this respect. So when it sees an 
endnote, it adds the package.


Richard



Re: Modules Bug?

2008-11-22 Thread rgheck

Bennett Helm wrote:

In 1.6.1svn, I'm trying to create a couple of very simple modules that
basically load a single package. Here they are:

#\DeclareLyXModule{Show Labels}
#DescriptionBegin
#Displays all LaTeX labels in the margins.
#DescriptionEnd

Format 11

Preamble
\RequirePackage{showlabels}
EndPreamble

--

#\DeclareLyXModule{Draft Watermark}
#DescriptionBegin
#Adds a Draft watermark on the bottom of each page.
#DescriptionEnd

Format 11

Preamble
\RequirePackage{prelim2e}
EndPreamble

--

These both work when only one of them is loaded: the "\RequirePackage"
line shows up in the "Textclass specific LaTeX commands" section of
the preamble. However, when *both* are loaded, only the last one shows
up rather than both. Is this a problem with the way modules are
loaded, or am I doing something wrong in my module definitions?

Thanks.

Bennett
  
You need to use AddToPreamble instead of Preamble. The Preamble command 
overwrites all previous Preamble declarations.


I know that's silly, but that's how Preamble has always worked. It's 
also why I added AddToPreamble.


rh



Hebrew and Proof Environment

2008-11-22 Thread rgheck

Amir Rachum wrote:

I've recently upgraded to LyX 1.6 and using Windows XP.
I use the document class article (Hebrew). I use the proof environment, but
in the new version, after I render to pdf, the proof doesn't start at a new
line.
i.e in LyX I see:

bla bla bla
proof: bla bla 2

and after I render I see:

bla bla bla proof bla bla 2


This happens with documents I edited with the previous version of LyX and
they render fine with 1.5.
What can I do?

  
Not sure. There have been a lot of changes to the RTL stuff, so it may 
be that you've caught a bug in it. Let's forward this to the devel list, 
and see.



Another question - I use LyX mostly for summarizing lecture notes and I
would like to have 2 option:
1) to create a list of theorems/claims
2) to create an exercise/solution and an example environments.

Is that possible to do?

  
Anything you can do in LaTeX, you can do in LyX. Regarding (2), look at 
the Customization manual, chapter 5. I'm not sure about lists of 
theorems. Surely it can be done, but I don't know how.


rh



Re: Approaching LyX 1.6.1 [status update #1]

2008-11-22 Thread Jürgen Spitzmüller
Richard Heck wrote:
> OK, as a first step, any comments on the attached cleanup?

It looks good to me, but I'd like to hear a second voice, just in case I've 
overlooked something.

Jürgen


Re: ForkedCall

2008-11-22 Thread Peter Kümmel

LyX wrote:

On 21/11/2008 22:03, Peter Kümmel wrote:

Peter Kümmel wrote:

Peter Kümmel corrects:


Doesn't ForkedCall do in principle the same as SystemCall?

Seems this external tool execution is a big redundant hack
which everybody fears to touch.


Looking at ForkedCall more detailed, it becomes clear that I
also have to replace this class with a QProcess based one and
to merge it with SystemCall.

ForkedCall starts a process and emits signals, that's really
a QProcess candidate.


Funny, I thought that your branch was about exactly that :-)

Abdel.



Have you changed your name? ;)

Peter


<>

Re: [Cvslog] r27623 - /lyx-devel/branches/personal/kuemmel/progress_me...

2008-11-22 Thread Peter Kümmel

Pavel Sanda wrote:


but the basic question is was why to replace the old calls by newer ones when
we dont desperately need background call for those.



My intention is to cleanup and simplify the code. But I must admit, technically
there is not much gain for rcs, and like everybody else I know "never touch a 
running
system". So I'm skeptical about proceeding, especially because I'm the only one
working on this stuff which easily completely breaks LyX.

Peter


Re: trunk is asserting on shutdown

2008-11-22 Thread Jürgen Spitzmüller
rgheck wrote:
> I think the warning is wrong, though. There's no reason there should be
> a failure to remove the temporary directory...except perhaps that it was
> already destroyed. So I think we have an extra Buffer lying around for
> some reason, and it's being destroyed on exit. This might be an issue
> with the new search stuff. It creates a Buffer for its own use, doesn't it?

But then we have two bugs:

1.) the warning, as it appears, is wrong
2.) the warning itself will always trigger an assert, even it it is issued for 
good reason

This second bug is also in branch, AFAICS. What shall we do? Use a console 
warning instead?

Jürgen