Re: About our bug in treating spaces from copied text

2011-10-14 Thread Jean-Marc Lasgouttes
Le 14/10/2011 03:17, Uwe Stöhr a écrit : I cannot parse what you mean. You are certainly not indicating that any LaTeX list, like itemize or enumerate environment, are designed with free spacing in mind, are you? You misunderstood me. The LaTeX list allows to use multiple spaces. The other

Re: About our bug in treating spaces from copied text

2011-10-14 Thread Jean-Marc Lasgouttes
Le 14/10/2011 03:17, Uwe Stöhr a écrit : I cannot parse what you mean. You are certainly not indicating that any LaTeX list, like itemize or enumerate environment, are designed with free spacing in mind, are you? You misunderstood me. The LaTeX list allows to use multiple spaces. The other

Re: About our bug in treating spaces from copied text

2011-10-13 Thread Uwe Stöhr
Am 12.09.2011 11:46, schrieb Jean-Marc Lasgouttes: It allows free spacing, so that you can insert multiple spaces and LaTeX will respect them. It moreover allows to format your text in the way you like - like in our case typewriter. I cannot parse what you mean. You are certainly not

Re: About our bug in treating spaces from copied text

2011-10-13 Thread Uwe Stöhr
Am 12.09.2011 11:46, schrieb Jean-Marc Lasgouttes: It allows free spacing, so that you can insert multiple spaces and LaTeX will respect them. It moreover allows to format your text in the way you like - like in our case typewriter. I cannot parse what you mean. You are certainly not

Re: About our bug in treating spaces from copied text

2011-09-12 Thread Jean-Marc Lasgouttes
Le 29/08/2011 15:40, Uwe Stöhr a écrit : In which sense is the LaTeX list environment designed to show typewriter code? It allows free spacing, so that you can insert multiple spaces and LaTeX will respect them. It moreover allows to format your text in the way you like - like in our case

Re: About our bug in treating spaces from copied text

2011-09-12 Thread Jean-Marc Lasgouttes
Le 29/08/2011 15:40, Uwe Stöhr a écrit : In which sense is the LaTeX list environment designed to show typewriter code? It allows free spacing, so that you can insert multiple spaces and LaTeX will respect them. It moreover allows to format your text in the way you like - like in our case

Re: [patch] Re: About our bug in treating spaces from copied text

2011-09-01 Thread Uwe Stöhr
Am 29.08.2011 20:22, schrieb Pavel Sanda: you can call methods via class::method() only when they are static. otherwise you need real existing object for that class to call class_variable.method(). generally you need either the variable or to declare that method to be static. How can I do

Re: [patch] Re: About our bug in treating spaces from copied text

2011-09-01 Thread Vincent van Ravesteijn
Op 1-9-2011 16:22, Uwe Stöhr schreef: Am 29.08.2011 20:22, schrieb Pavel Sanda: you can call methods via class::method() only when they are static. otherwise you need real existing object for that class to call class_variable.method(). generally you need either the variable or to declare that

Re: [patch] Re: About our bug in treating spaces from copied text

2011-09-01 Thread Uwe Stöhr
Am 29.08.2011 20:22, schrieb Pavel Sanda: you can call methods via class::method() only when they are static. otherwise you need real existing object for that class to call class_variable.method(). generally you need either the variable or to declare that method to be static. How can I do

Re: [patch] Re: About our bug in treating spaces from copied text

2011-09-01 Thread Vincent van Ravesteijn
Op 1-9-2011 16:22, Uwe Stöhr schreef: Am 29.08.2011 20:22, schrieb Pavel Sanda: you can call methods via class::method() only when they are static. otherwise you need real existing object for that class to call class_variable.method(). generally you need either the variable or to declare that

Re: About our bug in treating spaces from copied text

2011-08-29 Thread Guenter Milde
On 2011-08-27, Uwe Stöhr wrote: Am 23.08.2011 23:18, schrieb Jean-Marc Lasgouttes: Could we just use alltt or even verbatim instead? VFerbatim would not allow any formatting while list does. What is alltt? alltt is an environment of the LaTeX standard package alltt.

Re: About our bug in treating spaces from copied text

2011-08-29 Thread Jean-Marc Lasgouttes
Le 27/08/2011 04:58, Uwe Stöhr a écrit : Am 23.08.2011 23:18, schrieb Jean-Marc Lasgouttes: I think lyxcode is fundamentally flawed, but nobody dares fixing it :) The code is correct - it uses LaTeX#s list environment which is designed for this purpose. In which sense is the LaTeX list

Re: About our bug in treating spaces from copied text

2011-08-29 Thread Uwe Stöhr
Am 29.08.2011 12:01, schrieb Jean-Marc Lasgouttes: In which sense is the LaTeX list environment designed to show typewriter code? It allows free spacing, so that you can insert multiple spaces and LaTeX will respect them. It moreover allows to format your text in the way you like - like in

[patch] Re: About our bug in treating spaces from copied text

2011-08-29 Thread Uwe Stöhr
Attached is the right approach I think: We need to insert normal spaces as such so pressing SPACE leads to \ , pressing Ctrl+Space leads to ~, inserting a visible space leads to \textvisiblespace. So we only need to call InsetSpace's latex void to do the job. The attached patch does this but

Re: [patch] Re: About our bug in treating spaces from copied text

2011-08-29 Thread Pavel Sanda
Uwe Stöhr wrote: The attached patch does this but does not compile: Illegal call of non-static member function. What am I doing wrong here? you can call methods via class::method() only when they are static. otherwise you need real existing object for that class to call

Re: About our bug in treating spaces from copied text

2011-08-29 Thread Guenter Milde
On 2011-08-27, Uwe Stöhr wrote: > Am 23.08.2011 23:18, schrieb Jean-Marc Lasgouttes: >> Could we just use alltt or even verbatim instead? > VFerbatim would not allow any formatting while list does. What is alltt? alltt is an environment of the LaTeX standard package alltt.

Re: About our bug in treating spaces from copied text

2011-08-29 Thread Jean-Marc Lasgouttes
Le 27/08/2011 04:58, Uwe Stöhr a écrit : Am 23.08.2011 23:18, schrieb Jean-Marc Lasgouttes: I think lyxcode is fundamentally flawed, but nobody dares fixing it :) The code is correct - it uses LaTeX#s list environment which is designed for this purpose. In which sense is the LaTeX list

Re: About our bug in treating spaces from copied text

2011-08-29 Thread Uwe Stöhr
Am 29.08.2011 12:01, schrieb Jean-Marc Lasgouttes: In which sense is the LaTeX list environment designed to show typewriter code? It allows free spacing, so that you can insert multiple spaces and LaTeX will respect them. It moreover allows to format your text in the way you like - like in

[patch] Re: About our bug in treating spaces from copied text

2011-08-29 Thread Uwe Stöhr
Attached is the right approach I think: We need to insert normal spaces as such so pressing SPACE leads to "\ ", pressing Ctrl+Space leads to "~", inserting a visible space leads to "\textvisiblespace". So we only need to call InsetSpace's latex void to do the job. The attached patch does this

Re: [patch] Re: About our bug in treating spaces from copied text

2011-08-29 Thread Pavel Sanda
Uwe Stöhr wrote: > The attached patch does this but does not compile: "Illegal call of > non-static member function." What am I doing wrong here? you can call methods via class::method() only when they are static. otherwise you need real existing object for that class to call

Re: About our bug in treating spaces from copied text

2011-08-26 Thread Uwe Stöhr
Am 15.08.2011 10:08, schrieb Vincent van Ravesteijn: +// tabulators and outputting a single space instead is not what we +// want in FreeSpacing mode +par.insert(pos, from_ascii(), font, Change(bparams.trackChanges ? +Change::INSERTED : Change::UNCHANGED)); +pos =

Re: About our bug in treating spaces from copied text

2011-08-26 Thread Uwe Stöhr
Am 23.08.2011 23:18, schrieb Jean-Marc Lasgouttes: I think lyxcode is fundamentally flawed, but nobody dares fixing it :) The code is correct - it uses LaTeX#s list environment which is designed for this purpose. Could we just use alltt or even verbatim instead? VFerbatim would not allow

Re: About our bug in treating spaces from copied text

2011-08-26 Thread Uwe Stöhr
Am 15.08.2011 10:08, schrieb Vincent van Ravesteijn: +// tabulators and outputting a single space instead is not what we +// want in FreeSpacing mode +par.insert(pos, from_ascii(""), font, Change(bparams.trackChanges ? +Change::INSERTED : Change::UNCHANGED)); +pos =

Re: About our bug in treating spaces from copied text

2011-08-26 Thread Uwe Stöhr
Am 23.08.2011 23:18, schrieb Jean-Marc Lasgouttes: I think lyxcode is fundamentally flawed, but nobody dares fixing it :) The code is correct - it uses LaTeX#s list environment which is designed for this purpose. Could we just use alltt or even verbatim instead? VFerbatim would not allow

Re: About our bug in treating spaces from copied text

2011-08-23 Thread Jean-Marc Lasgouttes
Le 06/08/11 17:40, Uwe Stöhr a écrit : \begin{lyxcode} ~~~Hello~~Hello~~\end{lyxcode} This is wrong because if the line is too long, LaTeX tries to break the line and does this at the first possibility - and this is at the beginning of course. Thus the leading spaces get lost which was reported

Re: About our bug in treating spaces from copied text

2011-08-23 Thread Jean-Marc Lasgouttes
Le 06/08/11 17:40, Uwe Stöhr a écrit : \begin{lyxcode} ~~~Hello~~Hello~~\end{lyxcode} This is wrong because if the line is too long, LaTeX tries to break the line and does this at the first possibility - and this is at the beginning of course. Thus the leading spaces get lost which was reported

Re: About our bug in treating spaces from copied text

2011-08-15 Thread Vincent van Ravesteijn
On Mon, Aug 15, 2011 at 6:06 AM, Uwe Stöhr uwesto...@web.de wrote: Am 12.08.2011 20:12, schrieb Vincent van Ravesteijn: Paragraph::insert(...) just calls Paragraph::insertChar(). Looking at Paragraph::insertChar(..., bool trackChanges) you can see that this does nothing else than

Re: About our bug in treating spaces from copied text

2011-08-15 Thread Vincent van Ravesteijn
On Mon, Aug 15, 2011 at 6:06 AM, Uwe Stöhr wrote: > Am 12.08.2011 20:12, schrieb Vincent van Ravesteijn: > > > >> Paragraph::insert(...) just calls Paragraph::insertChar(). Looking at >> Paragraph::insertChar(..., >> bool trackChanges) you can see that this does nothing else

Re: About our bug in treating spaces from copied text

2011-08-14 Thread Uwe Stöhr
Am 12.08.2011 20:12, schrieb Vincent van Ravesteijn: Paragraph::insert(...) just calls Paragraph::insertChar(). Looking at Paragraph::insertChar(..., bool trackChanges) you can see that this does nothing else than Paragraph::insertChar(..., Change const change) except for using

Re: About our bug in treating spaces from copied text

2011-08-14 Thread Uwe Stöhr
Am 12.08.2011 20:12, schrieb Vincent van Ravesteijn: Paragraph::insert(...) just calls Paragraph::insertChar(). Looking at Paragraph::insertChar(..., bool trackChanges) you can see that this does nothing else than Paragraph::insertChar(..., Change const & change) except for using

Re: About our bug in treating spaces from copied text

2011-08-12 Thread Uwe Stöhr
Am 11.08.2011 03:03, schrieb Pavel Sanda: why bparams.trackChanges is replaced by Change(Change::UNCHANGED) ? Because par.insert requires a Change statement, while par.insertChar uses a bool (bparams.trackChanges). What do you think is correct here? i dont know CT code. its just suspicious

Re: About our bug in treating spaces from copied text

2011-08-12 Thread Vincent van Ravesteijn
Op 12-8-2011 15:40, Uwe Stöhr schreef: Am 11.08.2011 03:03, schrieb Pavel Sanda: why bparams.trackChanges is replaced by Change(Change::UNCHANGED) ? Because par.insert requires a Change statement, while par.insertChar uses a bool (bparams.trackChanges). What do you think is correct here?

Re: About our bug in treating spaces from copied text

2011-08-12 Thread Uwe Stöhr
Am 11.08.2011 03:03, schrieb Pavel Sanda: why bparams.trackChanges is replaced by Change(Change::UNCHANGED) ? Because par.insert requires a Change statement, while par.insertChar uses a bool (bparams.trackChanges). What do you think is correct here? i dont know CT code. its just suspicious

Re: About our bug in treating spaces from copied text

2011-08-12 Thread Vincent van Ravesteijn
Op 12-8-2011 15:40, Uwe Stöhr schreef: Am 11.08.2011 03:03, schrieb Pavel Sanda: why bparams.trackChanges is replaced by Change(Change::UNCHANGED) ? Because par.insert requires a Change statement, while par.insertChar uses a bool (bparams.trackChanges). What do you think is correct here?

Re: About our bug in treating spaces from copied text

2011-08-10 Thread Pavel Sanda
Uwe Stöhr wrote: Index: Text.cpp === --- Text.cpp(revision 39427) +++ Text.cpp(working copy) @@ -788,8 +788,11 @@ ++pos; space_inserted = true;

Re: About our bug in treating spaces from copied text

2011-08-10 Thread Pavel Sanda
Uwe Stöhr wrote: >>> Index: Text.cpp >>> === >>> --- Text.cpp(revision 39427) >>> +++ Text.cpp(working copy) >>> @@ -788,8 +788,11 @@ >>> ++pos; >>>

Re: About our bug in treating spaces from copied text

2011-08-09 Thread Uwe Stöhr
Am 08.08.2011 19:42, schrieb Pavel Sanda: curious questions: is style.free_spacing == true only for LyX-Code No, you can also use this in other layouts as well. There are currently only the layouts beamer and egs who are using it and both use the lyxcode environment (which uses LaTeX's list

Re: About our bug in treating spaces from copied text

2011-08-09 Thread Uwe Stöhr
Am 08.08.2011 19:42, schrieb Pavel Sanda: curious questions: is style.free_spacing == true only for LyX-Code No, you can also use this in other layouts as well. There are currently only the layouts beamer and egs who are using it and both use the lyxcode environment (which uses LaTeX's list

Re: About our bug in treating spaces from copied text

2011-08-08 Thread Pavel Sanda
Uwe Stöhr wrote: Am 06.08.2011 17:40, schrieb Uwe Stöhr: The attached patch fixes point 1. and the tabulator issue. curious questions: is style.free_spacing == true only for LyX-Code (i.e. can't we break some other environments by sudden replacing ~ - '\ ' ? + // we need a normal space

Re: About our bug in treating spaces from copied text

2011-08-08 Thread Pavel Sanda
Uwe Stöhr wrote: > Am 06.08.2011 17:40, schrieb Uwe Stöhr: > >> The attached patch fixes point 1. and the tabulator issue. curious questions: is style.free_spacing == true only for LyX-Code (i.e. can't we break some other environments by sudden replacing ~ -> '\ ' ? > + // we need a normal

Re: About our bug in treating spaces from copied text

2011-08-06 Thread Uwe Stöhr
Am 06.08.2011 17:40, schrieb Uwe Stöhr: The attached patch fixes point 1. and the tabulator issue. Now it is really attached. regards Uwe Index: Paragraph.cpp === --- Paragraph.cpp (revision 39427) +++ Paragraph.cpp (working

Re: About our bug in treating spaces from copied text

2011-08-06 Thread Uwe Stöhr
Am 06.08.2011 17:40, schrieb Uwe Stöhr: The attached patch fixes point 1. and the tabulator issue. Now it is really attached. regards Uwe Index: Paragraph.cpp === --- Paragraph.cpp (revision 39427) +++ Paragraph.cpp (working