Re: #6920: Bug in typing a period (or comma) after the word fine.

2010-10-12 Thread Abdelrazak Younes

On 10/11/2010 11:59 PM, Pavel Sanda wrote:

John Mac wrote:
   

How do you enable / disable ligatures onscreen?
 

i dont think we can order qt for (not) doing this.


Of course we can. It is just a matter of painting character by character 
instead of by word.


If you know a bit of C++, the code is in rowpainter.cpp. The idea would 
be to add a check for potential ligature before the word is painted and 
to stop before the painting. This would be similar to the technique used 
for font changes.


Abdel.



Re: crash and new regression

2010-10-12 Thread Jürgen Spitzmüller
Uwe Stöhr wrote:
 We also have a new crash bug that even occurs in branch:
 http://www.lyx.org/trac/ticket/6942

this patch (against branch) should fix that.

Jürgen
Index: src/frontends/qt4/GuiDelimiter.cpp
===
--- src/frontends/qt4/GuiDelimiter.cpp	(Revision 35601)
+++ src/frontends/qt4/GuiDelimiter.cpp	(Arbeitskopie)
@@ -173,6 +173,9 @@
 	leftLW-setViewMode(QListView::IconMode);
 	rightLW-setViewMode(QListView::IconMode);
 
+	leftLW-setDragDropMode(QAbstractItemView::NoDragDrop);
+	rightLW-setDragDropMode(QAbstractItemView::NoDragDrop);
+
 	initMathSymbols();
 
 	typedef mapchar_type, QListWidgetItem * ListItems;


Re: r35573 - lyx-devel/trunk/src/frontends/qt4

2010-10-12 Thread Jürgen Spitzmüller
Pavel Sanda wrote:
 improvements belong rather to trunk. unless you are
 fixing some real trouble i would like not touch svn code in branch.

+1.

Apart from that, I trust Pavel's expertise here. IOW, I let you discuss this.

Jürgen


Re: Branch warn

2010-10-12 Thread Richard Heck

On 10/11/2010 07:58 PM, Pavel Sanda wrote:
LayoutFile.cpp: In member function 'lyx::LayoutFileIndex 
lyx::LayoutFileList::addEmptyClass(const std::string)':

LayoutFile.cpp:230: warning: suggest explicit braces to avoid ambiguous 'else'

   

I don't know why it is flagging this. There is no else.

rh




Re: Branch warn

2010-10-12 Thread Jürgen Spitzmüller
Richard Heck wrote:
 On 10/11/2010 07:58 PM, Pavel Sanda wrote:
  LayoutFile.cpp: In member function 'lyx::LayoutFileIndex 
  lyx::LayoutFileList::addEmptyClass(const std::string)':
  LayoutFile.cpp:230: warning: suggest explicit braces to avoid ambiguous
  'else'
 
 
 
 I don't know why it is flagging this. There is no else.

Maybe it's just extra-cautious? I think the warning does not harm, but if it 
annoys you, just add the braces.

Jürgen


Some thoughts on further development process towards beta and RCs

2010-10-12 Thread Pavel Sanda
hi,

1) short resume for things we need before releasing beta
- Richard has some pending work on lyx2lyx which will finish some JMarc work.
- pending patch from Gregory Jefferis for CT, Vincent might have look on it.
- dispatch fixes for #6417
- #6809 - converting to older LyX versions doesn't work under standard 
conditions
  (lesser importance)

btw i have looked on the thread dealing with #4624. Richard, is there some 
reason
why that patch was not committed?
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg158287.html


2) ideas how to deal with so many bugs we have
i was thinking that dev meeting could have this topic - to get rid at least 
worst cases of
bugs of 2.0svn. however there was no new message about the freiburg party - do 
i understand
correctly this idea is dead, right?


3) beta/branch cooperation
i was thinking that we could release beta and 1.6.8 in approximately the same 
time. from that
point branch became very strict for enhacements, string changes and bigger 
changes generally.
this way we could move left .po file to trunk and ask translators to start work 
on trunk version.
since we were successful at introducing new regressions in branch we could try 
to make at least
the final 1.6.9 without surprises this way. Juergen what do you think about 
this idea?

other opinions, suggestions?
pavel


Re: Some thoughts on further development process towards beta and RCs

2010-10-12 Thread Jürgen Spitzmüller
Pavel Sanda wrote:
 2) ideas how to deal with so many bugs we have
 i was thinking that dev meeting could have this topic - to get rid at least
 worst cases of bugs of 2.0svn. however there was no new message about the
 freiburg party - do i understand correctly this idea is dead, right?

I really don't have time to organize a meeting right now. If Uwe is still 
willing to do that, there will at least be a chance that I will show up there.

 3) beta/branch cooperation
 i was thinking that we could release beta and 1.6.8 in approximately the
 same time. from that point branch became very strict for enhacements,
 string changes and bigger changes generally. this way we could move left
 .po file to trunk and ask translators to start work on trunk version.
 since we were successful at introducing new regressions in branch we could
 try to make at least the final 1.6.9 without surprises this way. Juergen
 what do you think about this idea?

Concerning the synchronouos release time: depends on what bugs show up in 
branch. If we fix some critical bug in branch, we should not wait with the 
release for the beta.

About the po files: I'm not sure this is really an issue. With a decent po 
file editor, keeping two trees in sync is no big deal.

I agree that the final 1.6.x should be as stable as possible, so we should be 
even more conservative than we are now. Given the current development 
dynamics, though, I'm not sure that LyX 1.6.9 will be the final release.

Jürgen


Re: Some thoughts on further development process towards beta and RCs

2010-10-12 Thread Richard Heck

On 10/12/2010 08:34 AM, Pavel Sanda wrote:

hi,

1) short resume for things we need before releasing beta
- Richard has some pending work on lyx2lyx which will finish some JMarc work.

   
I've lost track, I'm afraid, of which patch set is which. Here's what 
I've got.


One thing I remember is a question about converting frm the 
CharStyle:Whatever name format for InsetFlex to some other format. I 
have some lyx2lyx stuff for that, which I'll attach, so perhaps it will 
ring some bells.


I also remember there was something about passthru layouts and paragraph 
breaks. I don't quite recall what that was, but it should be fairly 
easy, if someone can remind me what I was supposed to do. ;-)



btw i have looked on the thread dealing with #4624. Richard, is there some 
reason
why that patch was not committed?
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg158287.html

   
I think we never decided quite what to do about multiple or sectioned 
bibliographies.


Richard

Index: lib/lyx2lyx/lyx_2_0.py
===
--- lib/lyx2lyx/lyx_2_0.py	(revision 35375)
+++ lib/lyx2lyx/lyx_2_0.py	(working copy)
@@ -2057,6 +2057,26 @@
   i += 1
 
 
+def convert_flexnames(document):
+Convert  \\begin_inset Flex Custom:Style to \\begin_inset Flex Style and similarly for CharStyle and Element.
+
+i = 0
+rx = re.compile(r'^\\begin_inset Flex (Custom|CharStyle|Element):(.+)$')
+while True:
+  i = find_token(document.body, \\begin_inset Flex, i)
+  if i == -1:
+return
+  m = rx.match(document.body[i])
+  if m:
+document.body[i] = \\begin_inset Flex  + m.group(2)
+document.body.insert(i+1, legacy  + m.group(1))
+  i += 1
+
+
+def revert_flexnames(document):
+pass
+
+
 def convert_mathdots(document):
  Load mathdots automatically 
 while True:
@@ -2221,10 +2241,13 @@
[397, [remove_Nameref]],
[398, []],
[399, [convert_mathdots]],
-   [400, [convert_rule]]
+   [399, [convert_mathdots]],
+   [400, [convert_rule]],
+   [401, [convert_flexnames]]
   ]
 
-revert =  [[399, [revert_rule]],
+revert =  [[400, [revert_flexnames]],
+   [399, [revert_rule]],
[398, [revert_mathdots]],
[397, [revert_mathrsfs]],
[396, []],
Index: lib/scripts/layout2layout.py
===
--- lib/scripts/layout2layout.py	(revision 35375)
+++ lib/scripts/layout2layout.py	(working copy)
@@ -100,6 +100,10 @@
 # Incremented to format 28, 6 August 2010 by lasgouttes
 # Added ParbreakIsNewline tag for Layout and InsetLayout.
 
+# Incremented to format 29, 10 August 2010 by rgh
+# Changed Custom:Style, CharStyle:Style, and Element:Style
+# uniformly to Flex:Style.
+
 # Do not forget to document format change in Customization
 # Manual (section Declaring a new text class).
 
@@ -107,7 +111,7 @@
 # development/tools/updatelayouts.sh script to update all
 # layout files to the new format.
 
-currentFormat = 28
+currentFormat = 29
 
 
 def usage(prog_name):
@@ -191,6 +195,9 @@
 re_Type = re.compile(r'\s*Type\s+(\w+)', re.IGNORECASE)
 re_Builtin = re.compile(r'^(\s*)LaTeXBuiltin\s+(\w*)', re.IGNORECASE)
 re_True = re.compile(r'^\s*(?:true|1)\s*$', re.IGNORECASE)
+re_InsetLayout = re.compile(r'^\s*InsetLayout\s+(?:Custom|CharStyle|Element):(\S+)\s*$')
+# with quotes
+re_QInsetLayout = re.compile(r'^\s*InsetLayout\s+(?:Custom|CharStyle|Element):([^]+)\s*$')
 
 # counters for sectioning styles (hardcoded in 1.3)
 counters = {part  : \\Roman{part},
@@ -279,10 +286,21 @@
 i += 1
 continue
 
+if format == 28:
+  match = re_InsetLayout.match(lines[i])
+  if match:
+lines[i] = InsetLayout Flex: + match.group(1)
+  else:
+match = re_QInsetLayout.match(lines[i])
+if match:
+  lines[i] = InsetLayout \Flex: + match.group(1) + \
+  i += 1
+  continue
+
 # Only new features
 if format = 24 and format = 27:
-i += 1
-continue
+  i += 1
+  continue
 
 if format == 23:
   match = re_Float.match(lines[i])
Index: src/Buffer.cpp
===
--- src/Buffer.cpp	(revision 35375)
+++ src/Buffer.cpp	(working copy)
@@ -127,7 +127,7 @@
 
 // Do not remove the comment below, so we get merge conflict in
 // independent branches. Instead add your own.
-int const LYX_FORMAT = 400; // uwestoehr: support for \rule
+int const LYX_FORMAT = 401; // rgh: Dummy format for InsetFlex name conversion
 
 typedef mapstring, bool DepClean;
 typedef mapdocstring, pairInsetLabel const *, Buffer::References  RefCache;
Index: src/Paragraph.cpp
===

Re: Some thoughts on further development process towards beta and RCs

2010-10-12 Thread Pavel Sanda
Richard Heck wrote:
 I also remember there was something about passthru layouts and paragraph 
 breaks. I don't quite recall what that was, but it should be fairly easy, 
 if someone can remind me what I was supposed to do. ;-)

the original thread is here:
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg161257.html

pavel


Re: Some thoughts on further development process towards beta and RCs

2010-10-12 Thread Pavel Sanda
Jürgen Spitzmüller wrote:
 Concerning the synchronouos release time: depends on what bugs show up in 
 branch. If we fix some critical bug in branch, we should not wait with the 
 release for the beta.

i was not so much concerned about _synchronous_ releases but with releasing
at least one interim release before becoming more consevative...

pavel


Re: Some thoughts on further development process towards beta and RCs

2010-10-12 Thread Pavel Sanda
Richard Heck wrote:
 I've lost track, I'm afraid, of which patch set is which. Here's what I've 
 got.

i have flagged this message from JMarc in case it makes the things more clear:

I would like to have the newlineisparbreak part, which is important for
sweave support and is a file format change. Hopefully Richard can find
time to provide the missing python part.

pavel


Re: Some thoughts on further development process towards beta and RCs

2010-10-12 Thread Jürgen Spitzmüller
Pavel Sanda wrote:
 i was not so much concerned about synchronous releases but with releasing
 at least one interim release before becoming more consevative...

Ah, OK. Then we are in line.

Jürgen


Re: LyX 2.0 crash when choosing a word from the spell-checker context menu

2010-10-12 Thread Ronen Abravanel
I'm using the SVN current trunk.
The bug happened with 3-days ago SVN version on Ubuntu 10.04 and on
20-minutes-ago svn version (Rev 35607) on Ubuntu 10.10.

In order to get the crash I'm typing a wrong word, when the
red-wiggly-line appears, I right-clicking the word and choose some random
word from the list.
Crash almost every time.

Any more details I can supply?

Ronen.

On Tue, Oct 12, 2010 at 1:09 AM, Stephan Witt st.w...@gmx.net wrote:

 Am 12.10.2010 um 03:16 schrieb Ronen Abravanel:

  Starting program: /home/ronen/dev/lyx/svn/lyx-devel/src/lyx
  [Thread debugging using libthread_db enabled]
  /usr/include/c++/4.4/bits/basic_string.h:738: typename
 _Alloc::rebind_CharT::other::reference std::basic_stringChar, Traits,
 Alloc::operator[](typename _Alloc::rebind_CharT::other::size_type) [with
 _CharT = wchar_t, _Traits = std::char_traitswchar_t, _Alloc =
 std::allocatorwchar_t]: Assertion '__pos = size()' failed.
 
  Program received signal SIGABRT, Aborted.
  0x0012d422 in __kernel_vsyscall ()
  (gdb) bt
  #0  0x0012d422 in __kernel_vsyscall ()
  #1  0x01139651 in raise () from /lib/tls/i686/cmov/libc.so.6
  #2  0x0113ca82 in abort () from /lib/tls/i686/cmov/libc.so.6
  #3  0x082686d0 in std::basic_stringwchar_t, std::char_traitswchar_t,
 std::allocatorwchar_t ::operator[](unsigned int) ()
  #4  0x08252d4a in lyx::Paragraph::isWordSeparator (this=0x908f7b0,
 pos=24)
  at Paragraph.cpp:2795
  #5  0x08252f1d in lyx::Paragraph::locateWord (this=0x908f7b0,
  fr...@0xbfff80e8, t...@0xbfff80dc, loc=lyx::WHOLE_WORD)
  at Paragraph.cpp:3353
  #6  0x08263242 in lyx::Paragraph::Private::rangeOfSpellCheck
 (this=0x908f7b0)
  at Paragraph.cpp:391
  #7  lyx::Paragraph::spellCheck (this=0x908f7b0) at Paragraph.cpp:3632

 Hi Ronen,

 thank you for doing the backtrace.
 Can you please give me some details?
 You're using SVN current trunk code?
 What are you doing to get the crash?

 Stephan


Re: r35608 - in lyx-devel/trunk: lib/layouts lib/lyx2lyx lib/scripts po src src/frontends/qt4 src/insets

2010-10-12 Thread Pavel Sanda
rgh...@lyx.org wrote:
 Log:
 Get rid of CharStyle:, Custom:, and Element: prefixes, per a
 suggestion of JMarc's. Docs to follow.

i guess there is also something to change in doxy of LFUN_FLEX_INSERT?
pavel


Re: r35608 - in lyx-devel/trunk: lib/layouts lib/lyx2lyx lib/scripts po src src/frontends/qt4 src/insets

2010-10-12 Thread Pavel Sanda
rgh...@lyx.org wrote:
 +# Incremented to format 29, 10 August 2010 by rgh
 +# Changed Custom:Style, CharStyle:Style, and Element:Style
 +# uniformly to Flex:Style.

+FORMAT file... p


Re: #6920: Bug in typing a period (or comma) after the word fine.

2010-10-12 Thread Jean-Marc Lasgouttes

Le 11 oct. 10 à 23:59, Pavel Sanda a écrit :

John Mac wrote:

How do you enable / disable ligatures onscreen?


i dont think we can order qt for (not) doing this. but you can try  
to find some font
which is not intelligent enough (if you find it, then report back  
for other people...)


or we could make sure that we honor ligatures when computing metrics.

JMarc

Re: r35613 - lyx-devel/trunk/src/insets

2010-10-12 Thread Richard Heck


JMarc, you should have a look at this, if you have time. I ran into a 
couple problems trying to implement it the way we'd discussed.


I've done here what you suggested, namely, change InsetLayout 
CharStyle:Code, etc, to InsetLayout Flex:Code and change 
\begin_layout Flex CharStyle:Code to \begin_layout Flex Code. Of 
course, this creates a mismatch between the layout name and the inset 
name, which you had proposed to resolve by having InsetFlex::name() 
return Flex: + name_. But this messes up layouts that did not use a 
Custom: or CharStyle: or whatever prefix, and there are plenty of these. 
And what is worse, there is no decent way to anything with them in 
layout2layout. So instead I changed the way we lookup the layout, in 
this patch.


That said, I'm now starting to think that, in the LyX file, we should 
simply have:

\begin_layout Flex Flex:Code
This would actually permit:
\begin_layout Flex CharStyle:Code
if someone wanted to do that, say, in order to be able to provide a 
basic CharStyle layout as a default. It would also resolve the mismatch. 
We could still remove this namespace identifier on the menu, as I have 
already done with Flex.


Thoughts?

Richard

On 10/12/2010 11:37 AM, rgh...@lyx.org wrote:

Author: rgheck
Date: Tue Oct 12 17:37:02 2010
New Revision: 35613
URL: http://www.lyx.org/trac/changeset/35613

Log:
Customize getLayout for InsetFlex and change how we report name() back
to the simple version. We need to do it this way because we should NOT
really require the Flex prefix and, in fact, should permit other
prefixes to be used. Next commit for that.

Modified:
lyx-devel/trunk/src/insets/InsetFlex.cpp
lyx-devel/trunk/src/insets/InsetFlex.h

Modified: lyx-devel/trunk/src/insets/InsetFlex.cpp
==
--- lyx-devel/trunk/src/insets/InsetFlex.cppTue Oct 12 17:11:04 2010
(r35612)
+++ lyx-devel/trunk/src/insets/InsetFlex.cppTue Oct 12 17:37:02 2010
(r35613)
@@ -42,9 +42,13 @@
  {}


-docstring InsetFlex::name() const
-{
-   return from_utf8(Flex: + name_);
+InsetLayout const  InsetFlex::getLayout() const
+{
+   DocumentClass const  dc = buffer().params().documentClass();
+   docstring const dname = from_utf8(name_);
+   if (dc.hasInsetLayout(dname))
+   return dc.insetLayout(dname);
+   return dc.insetLayout(from_utf8(Flex: + name_));
  }



Modified: lyx-devel/trunk/src/insets/InsetFlex.h
==
--- lyx-devel/trunk/src/insets/InsetFlex.h  Tue Oct 12 17:11:04 2010
(r35612)
+++ lyx-devel/trunk/src/insets/InsetFlex.h  Tue Oct 12 17:37:02 2010
(r35613)
@@ -25,7 +25,9 @@
///
InsetFlex(Buffer *, std::string const  layoutName);
///
-   docstring name() const;
+   docstring name() const { return from_utf8(name_); }
+   ///
+   InsetLayout const  getLayout() const;
///
InsetCode lyxCode() const { return FLEX_CODE; }
/// Default looks
   




Re: Backport of po/Makefile.in.in ok?

2010-10-12 Thread Stephan Witt
Am 11.10.2010 um 16:45 schrieb Stephan Witt:

 Am 11.10.2010 um 13:55 schrieb BH:
 
 On Mon, Oct 11, 2010 at 2:22 AM, Stephan Witt st.w...@gmx.net wrote:
 Am 10.10.2010 um 22:56 schrieb Jean-Marc Lasgouttes:
 Personnally, I hav no problem with my 0.18.1 from macports.
 
 How did you get it?
 I tried port search gettext and got the answer
 gettext @0.17 (devel)
   GNU gettext package
 
 gettext 0.18.1.1 for me. (Have you tried port selfupdate?)
 
 No. I'm not familiar with macport...
 I thought that port search mentions the newest available version.
 Then I'll do it this way.

Ok, I did it. And have to sort out the build environment again :-(
autotools based build doesn't find the Qt4 libraries but iconv now gets linked 
twice...
I'll fix the announced spell checker crash when I'm able to build again.

But I guess gettext is working now.

Stephan

doc build error

2010-10-12 Thread Stephan Witt
make[3]: *** No rule to make target `clipart/mbox.png', needed by `all-am'.  
Stop.



Re: r35573 - lyx-devel/trunk/src/frontends/qt4

2010-10-12 Thread Stephan Witt

Am 12.10.2010 um 10:03 schrieb Jürgen Spitzmüller:

 Pavel Sanda wrote:
 improvements belong rather to trunk. unless you are
 fixing some real trouble i would like not touch svn code in branch.
 
 +1.


Ok. I don't have a need to do so. But CVS improvements I'd like to backport.
I'd say there I fix real trouble. I'd discuss it with Pavel to an end.
Would that be ok?

Stephan

Re: r35573 - lyx-devel/trunk/src/frontends/qt4

2010-10-12 Thread Jürgen Spitzmüller
Stephan Witt wrote:
 Ok. I don't have a need to do so. But CVS improvements I'd like to
 backport. I'd say there I fix real trouble. I'd discuss it with Pavel to
 an end. Would that be ok?

Sure. Just let me know when you have come to an agreement.

Jürgen


Re: Some thoughts on further development process towards beta and RCs

2010-10-12 Thread Pavel Sanda
Uwe Stöhr wrote:
 In my opinion we need the beta and feature freeze right now because

releasing beta every 2 weeks doesn't solve anything because the main problem is
not absence of bug reports but the fact that most of us have no time for fixing
them.

freezing is good idea and i already retarget many enh requests. for beta release
i made small list of bugs and it could be done in short time when there
is an interest in fixing them.

generally speaking i dont see much merit in release some beast full of bugs -
right now i'm at the institute where the whole network is built upon opensuse
linux and all machines have in this moment lyx 1.6.0. there is no force in this
world to get proper lyx version in stable ubuntu series, because of stability
policies and nobody cares that the version they actually ship is due to qt 4.6
unstable crap.

my edification from this is that while stable distros have no problem to
adapt 1.6.0 (instead of using stable 1.5.7) they wont update upcomming fixes.
so better to release 2.0 later than fix things in 2.0.1.

 Regarding the meeting there is only one way to have it here in Freiburg:
 - meet this year (don't know where I am next year)
 - rent a house in the black forest (this is the only way the accommodation 
 is payable)
 Drawbacks:
 - we won't have Internet connection
 - we meet before LyX 2.0 is out (it is better to meet after 2.0 is released 
 to focus on bug fixes, to make decisions for the next release and to 
 prevent that we introduce last-minute changes)

looks like we have very opposite views ;)
i asked about meeting just because of the possibility to meet before 2.0 is out.
my proposal would be also that the main topic is polish relase and fix remaining
bugs - of course dunno whether other devs would like it this way
but i see your point about next release choices etc.

no internet is not such a big deal in case we have some small wifi router to 
setup
local network.

the key question whether you are in a mood to organize such an event, Juergen
won't help from what i read...

pavel


Re: doc build error

2010-10-12 Thread Pavel Sanda
Stephan Witt wrote:
 make[3]: *** No rule to make target `clipart/mbox.png', needed by `all-am'.  
 Stop.

rerun ./autogen.sh
p


Re: LyX 2.0 crash when choosing a word from the spell-checker context menu

2010-10-12 Thread John McCabe-Dansted
On Tue, Oct 12, 2010 at 10:43 PM, Ronen Abravanel ron...@mit.edu wrote:
 Any more details I can supply?

I don't think any more is required. This seems to be another way to reproduce:
http://www.lyx.org/trac/ticket/6945
(I submitted this bug a few hours after your original report, which
would be why you couldn't find it).

I tried your recipe, and as with #6945, it appears to be a regression
in r35362.

-- 
John C. McCabe-Dansted


Re: r35573 - lyx-devel/trunk/src/frontends/qt4

2010-10-12 Thread Pavel Sanda
Stephan Witt wrote:
 But CVS improvements I'd like to backport.

when the code is enclosed inside CVS::... functions i have no problem
with backporting it. cvs is currently unusable in branch.

pavel


Re: doc build error

2010-10-12 Thread Stephan Witt
Am 12.10.2010 um 18:58 schrieb Pavel Sanda:

 Stephan Witt wrote:
 make[3]: *** No rule to make target `clipart/mbox.png', needed by `all-am'.  
 Stop.
 
 rerun ./autogen.sh

% sh autogen.sh
Using automake (GNU automake) 1.11.1
Using autoconf (GNU Autoconf) 2.68
This autoconf version is not supported by LyX.
LyX only supports autoconf 2.59c-2.65, 2.67.
%

BTW, another consequence of updating my build system.
I'll work around.

Stephan

RefStyle Patch

2010-10-12 Thread Richard Heck


OK, one last try at a refstyle patch. It introduces a document option to 
use refstyle or prettyref, the former being the default for new 
documents, the latter staying in place for old ones, though of course 
users can change this.


This now works well enough for me, though there may be some other cases 
prettyref handles out of the box that refstyle does not. Theorem is one, 
and I've added a simple \newref definition for this to LaTeXFeatures, 
though perhaps it would be nice if we did some translation for it, as 
well. I'm not really sure how to do that, though, so if anyone wants to 
tell me


Comments welcome.

Richard

Index: src/Buffer.cpp
===
--- src/Buffer.cpp	(revision 35615)
+++ src/Buffer.cpp	(working copy)
@@ -127,7 +127,7 @@
 
 // Do not remove the comment below, so we get merge conflict in
 // independent branches. Instead add your own.
-int const LYX_FORMAT = 403; // rgh: Dummy format for InsetFlex name conversion
+int const LYX_FORMAT = 404; // rgh: refstyle
 
 typedef mapstring, bool DepClean;
 typedef mapdocstring, pairInsetLabel const *, Buffer::References  RefCache;
Index: src/BufferParams.cpp
===
--- src/BufferParams.cpp	(revision 35615)
+++ src/BufferParams.cpp	(working copy)
@@ -415,6 +415,7 @@
 	html_math_img_scale = 1.0;
 
 	output_sync = false;
+	use_refstyle = true;
 }
 
 
@@ -853,6 +854,8 @@
 		lex  output_sync;
 	} else if (token == \\output_sync_macro) {
 		lex  output_sync_macro;
+	} else if (token == \\use_refstyle) {
+		lex  use_refstyle;
 	} else {
 		lyxerr  BufferParams::readToken(): Unknown token:   
 			token  endl;
@@ -980,6 +983,7 @@
 	\n\\use_indices   convertstring(use_indices)
 	\n\\paperorientation   string_orientation[orientation]
 	\n\\suppress_date   convertstring(suppress_date)
+		  \n\\use_refstyle   use_refstyle
 	'\n';
 	if (isbackgroundcolor == true)
 		os  \\backgroundcolor   lyx::X11hexname(backgroundcolor)  '\n';
Index: src/BufferParams.h
===
--- src/BufferParams.h	(revision 35615)
+++ src/BufferParams.h	(working copy)
@@ -405,6 +405,8 @@
 	bool output_sync;
 	/// custom LaTeX macro from user instead our own
 	std::string output_sync_macro;
+	/// use refstyle? or prettyref?
+	bool use_refstyle;
 
 private:
 	///
Index: src/frontends/qt4/GuiDocument.cpp
===
--- src/frontends/qt4/GuiDocument.cpp	(revision 35615)
+++ src/frontends/qt4/GuiDocument.cpp	(working copy)
@@ -1118,6 +1118,8 @@
 		this, SLOT(browseMaster()));
 	connect(latexModule-suppressDateCB, SIGNAL(clicked()),
 		this, SLOT(change_adaptor()));
+	connect(latexModule-refstyleCB, SIGNAL(clicked()),
+		this, SLOT(change_adaptor()));
 
 	// postscript drivers
 	for (int n = 0; tex_graphics[n][0]; ++n) {
@@ -2106,6 +2108,7 @@
 
 	// date
 	bp_.suppress_date = latexModule-suppressDateCB-isChecked();
+	bp_.use_refstyle  = latexModule-refstyleCB-isChecked();
 
 	// biblio
 	bp_.setCiteEngine(ENGINE_BASIC);
@@ -2531,6 +2534,7 @@
 
 	// date
 	latexModule-suppressDateCB-setChecked(bp_.suppress_date);
+	latexModule-refstyleCB-setChecked(bp_.use_refstyle);
 
 	// biblio
 	biblioModule-citeDefaultRB-setChecked(
Index: src/insets/InsetRef.cpp
===
--- src/insets/InsetRef.cpp	(revision 35615)
+++ src/insets/InsetRef.cpp	(working copy)
@@ -12,6 +12,7 @@
 #include InsetRef.h
 
 #include Buffer.h
+#include BufferParams.h
 #include Cursor.h
 #include DispatchResult.h
 #include InsetLabel.h
@@ -50,7 +51,7 @@
 		|| s == pageref
 		|| s == vref 
 		|| s == vpageref
-		|| s == prettyref
+		|| s == formatted
 		|| s == eqref
 		|| s == nameref;
 }
@@ -70,11 +71,24 @@
 
 int InsetRef::latex(odocstream  os, OutputParams const  runparams) const
 {
-	// We don't want to output p_[name], since that is only used 
-	// in docbook. So we construct new params, without it, and use that.
-	InsetCommandParams p(REF_CODE, getCmdName());
-	p[reference] = getParam(reference);
-	os  p.getCommand(runparams);
+	string const cmd = getCmdName();
+	docstring const ref = getParam(reference);
+	if (cmd != formatted) {
+		// We don't want to output p_[name], since that is only used 
+		// in docbook. So we construct new params, without it, and use that.
+		InsetCommandParams p(REF_CODE, cmd);
+		p[reference] = ref;
+		os  p.getCommand(runparams);
+		return 0;
+	} 
+	
+	// so we're doing a formatted reference.
+	if  (!buffer().params().use_refstyle) {
+		os  \\prettyref{  ref  '}';
+		return 0;
+	}
+	
+	os  \\lyxref{  ref  '}';
 	return 0;
 }
 
@@ -211,9 +225,14 @@
 	string const cmd = getCmdName();
 	if (cmd == vref || cmd == vpageref)
 		features.require(varioref);
-	else if (cmd == prettyref)
-		features.require(prettyref);
-	else if (cmd == eqref)
+	else if (getCmdName() == formatted) {
+		if 

Re: LyX 2.0 crash when choosing a word from the spell-checker context menu

2010-10-12 Thread Stephan Witt
Am 12.10.2010 um 19:00 schrieb John McCabe-Dansted:

 On Tue, Oct 12, 2010 at 10:43 PM, Ronen Abravanel ron...@mit.edu wrote:
 Any more details I can supply?

No, I got it already. Thanks.

 I don't think any more is required. This seems to be another way to reproduce:
 http://www.lyx.org/trac/ticket/6945
 (I submitted this bug a few hours after your original report, which
 would be why you couldn't find it).
 
 I tried your recipe, and as with #6945, it appears to be a regression
 in r35362.

Should by fixed now (r35616).

Stephan

Re: RefStyle Patch

2010-10-12 Thread Pavel Sanda
Richard Heck wrote:
 Comments welcome.

cant comment on the latex part but otherwise looks good. FORMAT file...
pavel


Re: doc build error

2010-10-12 Thread Pavel Sanda
Stephan Witt wrote:
 LyX only supports autoconf 2.59c-2.65, 2.67.

should be better now.
pavel


[Fwd: Re: Ticket #6092 Spell checker renders LyX inoperable]

2010-10-12 Thread David Philipp Rentsch

Hi Stephan, 
your name as well as the fact that you wrote from a gmx email address
suggest that your German, as I am, but, as I'm unsure of this and don't
know whether I'm communicating only with you or with other developers,
I'll keep writing in English.

Hi Stephan, or other developer 

I guess I would have to install Lyx 1.6.7 from scratch as it would
probably lead to dependency problems on my ubuntu distribution. I am
very busy right now trying to recover deleted data for a friend. This
will time and I'm also doing a translation. 
I might find the time to install this week. If so I will also take the
time to create a bug tracker account and report. 
best,
David

On Fri, 2010-10-01 at 16:40 +0200, Stephan Witt wrote: 

 Am 01.10.2010 um 14:48 schrieb David Philipp Rentsch:
 
  Dear Madam or Sir,
  
  I had something to say about this bug, but don't know how to do it in bug 
  tracker.
 
 Dear David,
 
 I guess you has to login (if not done creating an account before).
 
  Ticket #6092 (closed defect: worksforme) 
  Opened 15 months ago
  Last modified 5 days ago
  Spell checker renders LyX inoperable
  
  I have had the same problem in 1.65 using a Spanish document. The problem 
  seams to occur only when the cursor is at the end of the document (when 
  there are no words after the cursor).
 
 The last comment there suggests to open the ticket again, if it's not fixed 
 with 1.6.7.
 Do you have the opportunity to check the problem with 1.6.7 again?
 
 Regards,
 Stephan







Re: [Fwd: Re: Ticket #6092 Spell checker renders LyX inoperable]

2010-10-12 Thread Pavel Sanda
David Philipp Rentsch wrote:
   The problem seams to occur only when the cursor is at the end of the 
   document (when there are no words after the cursor).

i think thats different bug we marked fixedintrunk since it will be fixed in 
2.0.
simply create new empty file and press f7 to start spellcheck.
pavel


Re: [Fwd: Re: Ticket #6092 Spell checker renders LyX inoperable]

2010-10-12 Thread Pavel Sanda
Pavel Sanda wrote:
 David Philipp Rentsch wrote:
The problem seams to occur only when the cursor is at the end of the 
document (when there are no words after the cursor).
 
 i think thats different bug we marked fixedintrunk since it will be fixed in 
 2.0.

now i see it was recently closed by Uwe, so its the right bug... i remember to 
look on the issue, but i didn't see one line fix
and knowing that 2.0 solved it, i let it sleep. sorry for confusion.

 simply create new empty file and press f7 to start spellcheck.
 pavel


Warnings in trunk

2010-10-12 Thread Pavel Sanda
when opening or creating new files in trunk is see on the console messages like:

Warning: 83
Warning: 34

pavel


Re: Warnings in trunk

2010-10-12 Thread Pavel Sanda
Pavel Sanda wrote:
 when opening or creating new files in trunk is see on the console messages 
 like:
 
 Warning: 83
 Warning: 34

i guess this has something to do with last changes in lyx2lyx. try to open eg 
additional manual.
newly saved files do not have it.

 
 pavel


Re: LyX 2.0 crash when choosing a word from the spell-checker context menu

2010-10-12 Thread Ronen Abravanel
Awesome.  Works for me perfectly.

Thanks!


On Tue, Oct 12, 2010 at 3:09 PM, Stephan Witt st.w...@gmx.net wrote:

 Am 12.10.2010 um 19:00 schrieb John McCabe-Dansted:

  On Tue, Oct 12, 2010 at 10:43 PM, Ronen Abravanel ron...@mit.edu
 wrote:
  Any more details I can supply?

 No, I got it already. Thanks.

  I don't think any more is required. This seems to be another way to
 reproduce:
  http://www.lyx.org/trac/ticket/6945
  (I submitted this bug a few hours after your original report, which
  would be why you couldn't find it).
 
  I tried your recipe, and as with #6945, it appears to be a regression
  in r35362.

 Should by fixed now (r35616).

 Stephan


Re: Warnings in trunk

2010-10-12 Thread Uwe Stöhr

 i guess this has something to do with last changes in lyx2lyx.

Yes, it was a debug warning I forgot to delete before committing. I removed it 
now.

regards Uwe


Re: crash and new regression

2010-10-12 Thread Uwe Stöhr

 this patch (against branch) should fix that.

Thanks, That fixes the bug, please apply.

regards Uwe


r35620

2010-10-12 Thread Uwe Stöhr

Jürgen,

can this also go to branch?

regards Uwe


Re: doc build error

2010-10-12 Thread Stephan Witt
Am 12.10.2010 um 22:09 schrieb Pavel Sanda:

 Stephan Witt wrote:
 LyX only supports autoconf 2.59c-2.65, 2.67.
 
 should be better now.

Yes, thanks.
I've add 2.68 to error message...

Stephan


Re: LyX 2.0 crash when choosing a word from the spell-checker context menu

2010-10-12 Thread Stephan Witt
Am 13.10.2010 um 02:32 schrieb Ronen Abravanel:

 Awesome.  Works for me perfectly.
 
 Thanks!

Fine. Thanks for reporting.

Stephan


Re: #6920: Bug in typing a period (or comma) after the word "fine."

2010-10-12 Thread Abdelrazak Younes

On 10/11/2010 11:59 PM, Pavel Sanda wrote:

John Mac wrote:
   

How do you enable / disable ligatures onscreen?
 

i dont think we can order qt for (not) doing this.


Of course we can. It is just a matter of painting character by character 
instead of by word.


If you know a bit of C++, the code is in rowpainter.cpp. The idea would 
be to add a check for potential ligature before the word is painted and 
to stop before the painting. This would be similar to the technique used 
for font changes.


Abdel.



Re: crash and new regression

2010-10-12 Thread Jürgen Spitzmüller
Uwe Stöhr wrote:
> We also have a new crash bug that even occurs in branch:
> http://www.lyx.org/trac/ticket/6942

this patch (against branch) should fix that.

Jürgen
Index: src/frontends/qt4/GuiDelimiter.cpp
===
--- src/frontends/qt4/GuiDelimiter.cpp	(Revision 35601)
+++ src/frontends/qt4/GuiDelimiter.cpp	(Arbeitskopie)
@@ -173,6 +173,9 @@
 	leftLW->setViewMode(QListView::IconMode);
 	rightLW->setViewMode(QListView::IconMode);
 
+	leftLW->setDragDropMode(QAbstractItemView::NoDragDrop);
+	rightLW->setDragDropMode(QAbstractItemView::NoDragDrop);
+
 	initMathSymbols();
 
 	typedef map ListItems;


Re: r35573 - lyx-devel/trunk/src/frontends/qt4

2010-10-12 Thread Jürgen Spitzmüller
Pavel Sanda wrote:
> improvements belong rather to trunk. unless you are
> fixing some real trouble i would like not touch svn code in branch.

+1.

Apart from that, I trust Pavel's expertise here. IOW, I let you discuss this.

Jürgen


Re: Branch warn

2010-10-12 Thread Richard Heck

On 10/11/2010 07:58 PM, Pavel Sanda wrote:
LayoutFile.cpp: In member function 'lyx::LayoutFileIndex 
lyx::LayoutFileList::addEmptyClass(const std::string&)':

LayoutFile.cpp:230: warning: suggest explicit braces to avoid ambiguous 'else'

   

I don't know why it is flagging this. There is no else.

rh




Re: Branch warn

2010-10-12 Thread Jürgen Spitzmüller
Richard Heck wrote:
> On 10/11/2010 07:58 PM, Pavel Sanda wrote:
> > LayoutFile.cpp: In member function 'lyx::LayoutFileIndex 
> > lyx::LayoutFileList::addEmptyClass(const std::string&)':
> > LayoutFile.cpp:230: warning: suggest explicit braces to avoid ambiguous
> > 'else'
> >
> >
> 
> I don't know why it is flagging this. There is no else.

Maybe it's just extra-cautious? I think the warning does not harm, but if it 
annoys you, just add the braces.

Jürgen


Some thoughts on further development process towards beta and RCs

2010-10-12 Thread Pavel Sanda
hi,

1) short resume for things we need before releasing beta
- Richard has some pending work on lyx2lyx which will finish some JMarc work.
- pending patch from Gregory Jefferis for CT, Vincent might have look on it.
- dispatch fixes for #6417
- #6809 - converting to older LyX versions doesn't work under standard 
conditions
  (lesser importance)

btw i have looked on the thread dealing with #4624. Richard, is there some 
reason
why that patch was not committed?
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg158287.html


2) ideas how to deal with so many bugs we have
i was thinking that dev meeting could have this topic - to get rid at least 
worst cases of
bugs of 2.0svn. however there was no new message about the freiburg party - do 
i understand
correctly this idea is dead, right?


3) beta/branch cooperation
i was thinking that we could release beta and 1.6.8 in approximately the same 
time. from that
point branch became very strict for enhacements, string changes and bigger 
changes generally.
this way we could move left .po file to trunk and ask translators to start work 
on trunk version.
since we were successful at introducing new regressions in branch we could try 
to make at least
the final 1.6.9 without surprises this way. Juergen what do you think about 
this idea?

other opinions, suggestions?
pavel


Re: Some thoughts on further development process towards beta and RCs

2010-10-12 Thread Jürgen Spitzmüller
Pavel Sanda wrote:
> 2) ideas how to deal with so many bugs we have
> i was thinking that dev meeting could have this topic - to get rid at least
> worst cases of bugs of 2.0svn. however there was no new message about the
> freiburg party - do i understand correctly this idea is dead, right?

I really don't have time to organize a meeting right now. If Uwe is still 
willing to do that, there will at least be a chance that I will show up there.

> 3) beta/branch cooperation
> i was thinking that we could release beta and 1.6.8 in approximately the
> same time. from that point branch became very strict for enhacements,
> string changes and bigger changes generally. this way we could move left
> .po file to trunk and ask translators to start work on trunk version.
> since we were successful at introducing new regressions in branch we could
> try to make at least the final 1.6.9 without surprises this way. Juergen
> what do you think about this idea?

Concerning the synchronouos release time: depends on what bugs show up in 
branch. If we fix some critical bug in branch, we should not wait with the 
release for the beta.

About the po files: I'm not sure this is really an issue. With a decent po 
file editor, keeping two trees in sync is no big deal.

I agree that the final 1.6.x should be as stable as possible, so we should be 
even more conservative than we are now. Given the current development 
dynamics, though, I'm not sure that LyX 1.6.9 will be the final release.

Jürgen


Re: Some thoughts on further development process towards beta and RCs

2010-10-12 Thread Richard Heck

On 10/12/2010 08:34 AM, Pavel Sanda wrote:

hi,

1) short resume for things we need before releasing beta
- Richard has some pending work on lyx2lyx which will finish some JMarc work.

   
I've lost track, I'm afraid, of which patch set is which. Here's what 
I've got.


One thing I remember is a question about converting frm the 
CharStyle:Whatever name format for InsetFlex to some other format. I 
have some lyx2lyx stuff for that, which I'll attach, so perhaps it will 
ring some bells.


I also remember there was something about passthru layouts and paragraph 
breaks. I don't quite recall what that was, but it should be fairly 
easy, if someone can remind me what I was supposed to do. ;-)



btw i have looked on the thread dealing with #4624. Richard, is there some 
reason
why that patch was not committed?
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg158287.html

   
I think we never decided quite what to do about multiple or sectioned 
bibliographies.


Richard

Index: lib/lyx2lyx/lyx_2_0.py
===
--- lib/lyx2lyx/lyx_2_0.py	(revision 35375)
+++ lib/lyx2lyx/lyx_2_0.py	(working copy)
@@ -2057,6 +2057,26 @@
   i += 1
 
 
+def convert_flexnames(document):
+"Convert  \\begin_inset Flex Custom:Style to \\begin_inset Flex Style and similarly for CharStyle and Element."
+
+i = 0
+rx = re.compile(r'^\\begin_inset Flex (Custom|CharStyle|Element):(.+)$')
+while True:
+  i = find_token(document.body, "\\begin_inset Flex", i)
+  if i == -1:
+return
+  m = rx.match(document.body[i])
+  if m:
+document.body[i] = "\\begin_inset Flex " + m.group(2)
+document.body.insert(i+1, "legacy " + m.group(1))
+  i += 1
+
+
+def revert_flexnames(document):
+pass
+
+
 def convert_mathdots(document):
 " Load mathdots automatically "
 while True:
@@ -2221,10 +2241,13 @@
[397, [remove_Nameref]],
[398, []],
[399, [convert_mathdots]],
-   [400, [convert_rule]]
+   [399, [convert_mathdots]],
+   [400, [convert_rule]],
+   [401, [convert_flexnames]]
   ]
 
-revert =  [[399, [revert_rule]],
+revert =  [[400, [revert_flexnames]],
+   [399, [revert_rule]],
[398, [revert_mathdots]],
[397, [revert_mathrsfs]],
[396, []],
Index: lib/scripts/layout2layout.py
===
--- lib/scripts/layout2layout.py	(revision 35375)
+++ lib/scripts/layout2layout.py	(working copy)
@@ -100,6 +100,10 @@
 # Incremented to format 28, 6 August 2010 by lasgouttes
 # Added ParbreakIsNewline tag for Layout and InsetLayout.
 
+# Incremented to format 29, 10 August 2010 by rgh
+# Changed Custom:Style, CharStyle:Style, and Element:Style
+# uniformly to Flex:Style.
+
 # Do not forget to document format change in Customization
 # Manual (section "Declaring a new text class").
 
@@ -107,7 +111,7 @@
 # development/tools/updatelayouts.sh script to update all
 # layout files to the new format.
 
-currentFormat = 28
+currentFormat = 29
 
 
 def usage(prog_name):
@@ -191,6 +195,9 @@
 re_Type = re.compile(r'\s*Type\s+(\w+)', re.IGNORECASE)
 re_Builtin = re.compile(r'^(\s*)LaTeXBuiltin\s+(\w*)', re.IGNORECASE)
 re_True = re.compile(r'^\s*(?:true|1)\s*$', re.IGNORECASE)
+re_InsetLayout = re.compile(r'^\s*InsetLayout\s+(?:Custom|CharStyle|Element):(\S+)\s*$')
+# with quotes
+re_QInsetLayout = re.compile(r'^\s*InsetLayout\s+"(?:Custom|CharStyle|Element):([^"]+)"\s*$')
 
 # counters for sectioning styles (hardcoded in 1.3)
 counters = {"part"  : "\\Roman{part}",
@@ -279,10 +286,21 @@
 i += 1
 continue
 
+if format == 28:
+  match = re_InsetLayout.match(lines[i])
+  if match:
+lines[i] = "InsetLayout Flex:" + match.group(1)
+  else:
+match = re_QInsetLayout.match(lines[i])
+if match:
+  lines[i] = "InsetLayout \"Flex:" + match.group(1) + "\""
+  i += 1
+  continue
+
 # Only new features
 if format >= 24 and format <= 27:
-i += 1
-continue
+  i += 1
+  continue
 
 if format == 23:
   match = re_Float.match(lines[i])
Index: src/Buffer.cpp
===
--- src/Buffer.cpp	(revision 35375)
+++ src/Buffer.cpp	(working copy)
@@ -127,7 +127,7 @@
 
 // Do not remove the comment below, so we get merge conflict in
 // independent branches. Instead add your own.
-int const LYX_FORMAT = 400; // uwestoehr: support for \rule
+int const LYX_FORMAT = 401; // rgh: Dummy format for InsetFlex name conversion
 
 typedef map DepClean;
 typedef map RefCache;
Index: src/Paragraph.cpp
===
--- 

Re: Some thoughts on further development process towards beta and RCs

2010-10-12 Thread Pavel Sanda
Richard Heck wrote:
> I also remember there was something about passthru layouts and paragraph 
> breaks. I don't quite recall what that was, but it should be fairly easy, 
> if someone can remind me what I was supposed to do. ;-)

the original thread is here:
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg161257.html

pavel


Re: Some thoughts on further development process towards beta and RCs

2010-10-12 Thread Pavel Sanda
Jürgen Spitzmüller wrote:
> Concerning the synchronouos release time: depends on what bugs show up in 
> branch. If we fix some critical bug in branch, we should not wait with the 
> release for the beta.

i was not so much concerned about _synchronous_ releases but with releasing
at least one interim release before becoming more consevative...

pavel


Re: Some thoughts on further development process towards beta and RCs

2010-10-12 Thread Pavel Sanda
Richard Heck wrote:
> I've lost track, I'm afraid, of which patch set is which. Here's what I've 
> got.

i have flagged this message from JMarc in case it makes the things more clear:

>I would like to have the newlineisparbreak part, which is important for
>sweave support and is a file format change. Hopefully Richard can find
>time to provide the missing python part.

pavel


Re: Some thoughts on further development process towards beta and RCs

2010-10-12 Thread Jürgen Spitzmüller
Pavel Sanda wrote:
> i was not so much concerned about synchronous releases but with releasing
> at least one interim release before becoming more consevative...

Ah, OK. Then we are in line.

Jürgen


Re: LyX 2.0 crash when choosing a word from the spell-checker context menu

2010-10-12 Thread Ronen Abravanel
I'm using the SVN current trunk.
The bug happened with 3-days ago SVN version on Ubuntu 10.04 and on
20-minutes-ago svn version (Rev 35607) on Ubuntu 10.10.

In order to get the crash I'm typing a "wrong" word, when the
red-wiggly-line appears, I right-clicking the word and choose some random
word from the list.
Crash almost every time.

Any more details I can supply?

Ronen.

On Tue, Oct 12, 2010 at 1:09 AM, Stephan Witt  wrote:

> Am 12.10.2010 um 03:16 schrieb Ronen Abravanel:
>
> > Starting program: /home/ronen/dev/lyx/svn/lyx-devel/src/lyx
> > [Thread debugging using libthread_db enabled]
> > /usr/include/c++/4.4/bits/basic_string.h:738: typename
> _Alloc::rebind<_CharT>::other::reference std::basic_string Alloc>::operator[](typename _Alloc::rebind<_CharT>::other::size_type) [with
> _CharT = wchar_t, _Traits = std::char_traits, _Alloc =
> std::allocator]: Assertion '__pos <= size()' failed.
> >
> > Program received signal SIGABRT, Aborted.
> > 0x0012d422 in __kernel_vsyscall ()
> > (gdb) bt
> > #0  0x0012d422 in __kernel_vsyscall ()
> > #1  0x01139651 in raise () from /lib/tls/i686/cmov/libc.so.6
> > #2  0x0113ca82 in abort () from /lib/tls/i686/cmov/libc.so.6
> > #3  0x082686d0 in std::basic_string std::allocator >::operator[](unsigned int) ()
> > #4  0x08252d4a in lyx::Paragraph::isWordSeparator (this=0x908f7b0,
> pos=24)
> > at Paragraph.cpp:2795
> > #5  0x08252f1d in lyx::Paragraph::locateWord (this=0x908f7b0,
> > fr...@0xbfff80e8, t...@0xbfff80dc, loc=lyx::WHOLE_WORD)
> > at Paragraph.cpp:3353
> > #6  0x08263242 in lyx::Paragraph::Private::rangeOfSpellCheck
> (this=0x908f7b0)
> > at Paragraph.cpp:391
> > #7  lyx::Paragraph::spellCheck (this=0x908f7b0) at Paragraph.cpp:3632
>
> Hi Ronen,
>
> thank you for doing the backtrace.
> Can you please give me some details?
> You're using SVN current trunk code?
> What are you doing to get the crash?
>
> Stephan


Re: r35608 - in lyx-devel/trunk: lib/layouts lib/lyx2lyx lib/scripts po src src/frontends/qt4 src/insets

2010-10-12 Thread Pavel Sanda
rgh...@lyx.org wrote:
> Log:
> Get rid of "CharStyle:", "Custom:", and "Element:" prefixes, per a
> suggestion of JMarc's. Docs to follow.

i guess there is also something to change in doxy of LFUN_FLEX_INSERT?
pavel


Re: r35608 - in lyx-devel/trunk: lib/layouts lib/lyx2lyx lib/scripts po src src/frontends/qt4 src/insets

2010-10-12 Thread Pavel Sanda
rgh...@lyx.org wrote:
> +# Incremented to format 29, 10 August 2010 by rgh
> +# Changed Custom:Style, CharStyle:Style, and Element:Style
> +# uniformly to Flex:Style.

+FORMAT file... p


Re: #6920: Bug in typing a period (or comma) after the word "fine."

2010-10-12 Thread Jean-Marc Lasgouttes

Le 11 oct. 10 à 23:59, Pavel Sanda a écrit :

John Mac wrote:

How do you enable / disable ligatures onscreen?


i dont think we can order qt for (not) doing this. but you can try  
to find some font
which is not intelligent enough (if you find it, then report back  
for other people...)


or we could make sure that we honor ligatures when computing metrics.

JMarc

Re: r35613 - lyx-devel/trunk/src/insets

2010-10-12 Thread Richard Heck


JMarc, you should have a look at this, if you have time. I ran into a 
couple problems trying to implement it the way we'd discussed.


I've done here what you suggested, namely, change "InsetLayout 
CharStyle:Code", etc, to "InsetLayout Flex:Code" and change 
"\begin_layout Flex CharStyle:Code" to "\begin_layout Flex Code". Of 
course, this creates a mismatch between the layout name and the inset 
name, which you had proposed to resolve by having InsetFlex::name() 
return "Flex:" + name_. But this messes up layouts that did not use a 
Custom: or CharStyle: or whatever prefix, and there are plenty of these. 
And what is worse, there is no decent way to anything with them in 
layout2layout. So instead I changed the way we lookup the layout, in 
this patch.


That said, I'm now starting to think that, in the LyX file, we should 
simply have:

\begin_layout Flex Flex:Code
This would actually permit:
\begin_layout Flex CharStyle:Code
if someone wanted to do that, say, in order to be able to provide a 
basic CharStyle layout as a default. It would also resolve the mismatch. 
We could still remove this "namespace" identifier on the menu, as I have 
already done with Flex.


Thoughts?

Richard

On 10/12/2010 11:37 AM, rgh...@lyx.org wrote:

Author: rgheck
Date: Tue Oct 12 17:37:02 2010
New Revision: 35613
URL: http://www.lyx.org/trac/changeset/35613

Log:
Customize getLayout for InsetFlex and change how we report name() back
to the simple version. We need to do it this way because we should NOT
really require the "Flex" prefix and, in fact, should permit other
prefixes to be used. Next commit for that.

Modified:
lyx-devel/trunk/src/insets/InsetFlex.cpp
lyx-devel/trunk/src/insets/InsetFlex.h

Modified: lyx-devel/trunk/src/insets/InsetFlex.cpp
==
--- lyx-devel/trunk/src/insets/InsetFlex.cppTue Oct 12 17:11:04 2010
(r35612)
+++ lyx-devel/trunk/src/insets/InsetFlex.cppTue Oct 12 17:37:02 2010
(r35613)
@@ -42,9 +42,13 @@
  {}


-docstring InsetFlex::name() const
-{
-   return from_utf8("Flex:" + name_);
+InsetLayout const&  InsetFlex::getLayout() const
+{
+   DocumentClass const&  dc = buffer().params().documentClass();
+   docstring const dname = from_utf8(name_);
+   if (dc.hasInsetLayout(dname))
+   return dc.insetLayout(dname);
+   return dc.insetLayout(from_utf8("Flex:" + name_));
  }



Modified: lyx-devel/trunk/src/insets/InsetFlex.h
==
--- lyx-devel/trunk/src/insets/InsetFlex.h  Tue Oct 12 17:11:04 2010
(r35612)
+++ lyx-devel/trunk/src/insets/InsetFlex.h  Tue Oct 12 17:37:02 2010
(r35613)
@@ -25,7 +25,9 @@
///
InsetFlex(Buffer *, std::string const&  layoutName);
///
-   docstring name() const;
+   docstring name() const { return from_utf8(name_); }
+   ///
+   InsetLayout const&  getLayout() const;
///
InsetCode lyxCode() const { return FLEX_CODE; }
/// Default looks
   




Re: Backport of po/Makefile.in.in ok?

2010-10-12 Thread Stephan Witt
Am 11.10.2010 um 16:45 schrieb Stephan Witt:

> Am 11.10.2010 um 13:55 schrieb BH:
> 
>> On Mon, Oct 11, 2010 at 2:22 AM, Stephan Witt  wrote:
>>> Am 10.10.2010 um 22:56 schrieb Jean-Marc Lasgouttes:
 Personnally, I hav no problem with my 0.18.1 from macports.
>>> 
>>> How did you get it?
>>> I tried "port search gettext" and got the answer
>>> gettext @0.17 (devel)
>>>   GNU gettext package
>> 
>> gettext 0.18.1.1 for me. (Have you tried port selfupdate?)
> 
> No. I'm not familiar with macport...
> I thought that "port search" mentions the newest available version.
> Then I'll do it this way.

Ok, I did it. And have to sort out the build environment again :-(
autotools based build doesn't find the Qt4 libraries but iconv now gets linked 
twice...
I'll fix the announced spell checker crash when I'm able to build again.

But I guess gettext is working now.

Stephan

doc build error

2010-10-12 Thread Stephan Witt
make[3]: *** No rule to make target `clipart/mbox.png', needed by `all-am'.  
Stop.



Re: r35573 - lyx-devel/trunk/src/frontends/qt4

2010-10-12 Thread Stephan Witt

Am 12.10.2010 um 10:03 schrieb Jürgen Spitzmüller:

> Pavel Sanda wrote:
>> improvements belong rather to trunk. unless you are
>> fixing some real trouble i would like not touch svn code in branch.
> 
> +1.


Ok. I don't have a need to do so. But CVS improvements I'd like to backport.
I'd say there I fix real trouble. I'd discuss it with Pavel to an end.
Would that be ok?

Stephan

Re: r35573 - lyx-devel/trunk/src/frontends/qt4

2010-10-12 Thread Jürgen Spitzmüller
Stephan Witt wrote:
> Ok. I don't have a need to do so. But CVS improvements I'd like to
> backport. I'd say there I fix real trouble. I'd discuss it with Pavel to
> an end. Would that be ok?

Sure. Just let me know when you have come to an agreement.

Jürgen


Re: Some thoughts on further development process towards beta and RCs

2010-10-12 Thread Pavel Sanda
Uwe Stöhr wrote:
> In my opinion we need the beta and feature freeze right now because

releasing beta every 2 weeks doesn't solve anything because the main problem is
not absence of bug reports but the fact that most of us have no time for fixing
them.

freezing is good idea and i already retarget many enh requests. for beta release
i made small list of bugs and it could be done in short time when there
is an interest in fixing them.

generally speaking i dont see much merit in release some beast full of bugs -
right now i'm at the institute where the whole network is built upon opensuse
linux and all machines have in this moment lyx 1.6.0. there is no force in this
world to get proper lyx version in stable ubuntu series, because of stability
policies and nobody cares that the version they actually ship is due to qt 4.6
unstable crap.

my edification from this is that while "stable" distros have no problem to
adapt 1.6.0 (instead of using stable 1.5.7) they wont update upcomming fixes.
so better to release 2.0 later than fix things in 2.0.1.

> Regarding the meeting there is only one way to have it here in Freiburg:
> - meet this year (don't know where I am next year)
> - rent a house in the black forest (this is the only way the accommodation 
> is payable)
> Drawbacks:
> - we won't have Internet connection
> - we meet before LyX 2.0 is out (it is better to meet after 2.0 is released 
> to focus on bug fixes, to make decisions for the next release and to 
> prevent that we introduce last-minute changes)

looks like we have very opposite views ;)
i asked about meeting just because of the possibility to meet before 2.0 is out.
my proposal would be also that the main topic is polish relase and fix remaining
bugs - of course dunno whether other devs would like it this way
but i see your point about next release choices etc.

no internet is not such a big deal in case we have some small wifi router to 
setup
local network.

the key question whether you are in a mood to organize such an event, Juergen
won't help from what i read...

pavel


Re: doc build error

2010-10-12 Thread Pavel Sanda
Stephan Witt wrote:
> make[3]: *** No rule to make target `clipart/mbox.png', needed by `all-am'.  
> Stop.

rerun ./autogen.sh
p


Re: LyX 2.0 crash when choosing a word from the spell-checker context menu

2010-10-12 Thread John McCabe-Dansted
On Tue, Oct 12, 2010 at 10:43 PM, Ronen Abravanel  wrote:
> Any more details I can supply?

I don't think any more is required. This seems to be another way to reproduce:
http://www.lyx.org/trac/ticket/6945
(I submitted this bug a few hours after your original report, which
would be why you couldn't find it).

I tried your recipe, and as with #6945, it appears to be a regression
in r35362.

-- 
John C. McCabe-Dansted


Re: r35573 - lyx-devel/trunk/src/frontends/qt4

2010-10-12 Thread Pavel Sanda
Stephan Witt wrote:
> But CVS improvements I'd like to backport.

when the code is enclosed inside CVS::... functions i have no problem
with backporting it. cvs is currently unusable in branch.

pavel


Re: doc build error

2010-10-12 Thread Stephan Witt
Am 12.10.2010 um 18:58 schrieb Pavel Sanda:

> Stephan Witt wrote:
>> make[3]: *** No rule to make target `clipart/mbox.png', needed by `all-am'.  
>> Stop.
> 
> rerun ./autogen.sh

% sh autogen.sh
Using automake (GNU automake) 1.11.1
Using autoconf (GNU Autoconf) 2.68
This autoconf version is not supported by LyX.
LyX only supports autoconf 2.59c-2.65, 2.67.
%

BTW, another consequence of updating my build system.
I'll work around.

Stephan

RefStyle Patch

2010-10-12 Thread Richard Heck


OK, one last try at a refstyle patch. It introduces a document option to 
use refstyle or prettyref, the former being the default for new 
documents, the latter staying in place for old ones, though of course 
users can change this.


This now works well enough for me, though there may be some other cases 
prettyref handles out of the box that refstyle does not. Theorem is one, 
and I've added a simple \newref definition for this to LaTeXFeatures, 
though perhaps it would be nice if we did some translation for it, as 
well. I'm not really sure how to do that, though, so if anyone wants to 
tell me


Comments welcome.

Richard

Index: src/Buffer.cpp
===
--- src/Buffer.cpp	(revision 35615)
+++ src/Buffer.cpp	(working copy)
@@ -127,7 +127,7 @@
 
 // Do not remove the comment below, so we get merge conflict in
 // independent branches. Instead add your own.
-int const LYX_FORMAT = 403; // rgh: Dummy format for InsetFlex name conversion
+int const LYX_FORMAT = 404; // rgh: refstyle
 
 typedef map DepClean;
 typedef map RefCache;
Index: src/BufferParams.cpp
===
--- src/BufferParams.cpp	(revision 35615)
+++ src/BufferParams.cpp	(working copy)
@@ -415,6 +415,7 @@
 	html_math_img_scale = 1.0;
 
 	output_sync = false;
+	use_refstyle = true;
 }
 
 
@@ -853,6 +854,8 @@
 		lex >> output_sync;
 	} else if (token == "\\output_sync_macro") {
 		lex >> output_sync_macro;
+	} else if (token == "\\use_refstyle") {
+		lex >> use_refstyle;
 	} else {
 		lyxerr << "BufferParams::readToken(): Unknown token: " << 
 			token << endl;
@@ -980,6 +983,7 @@
 	   << "\n\\use_indices " << convert(use_indices)
 	   << "\n\\paperorientation " << string_orientation[orientation]
 	   << "\n\\suppress_date " << convert(suppress_date)
+		 << "\n\\use_refstyle " << use_refstyle
 	   << '\n';
 	if (isbackgroundcolor == true)
 		os << "\\backgroundcolor " << lyx::X11hexname(backgroundcolor) << '\n';
Index: src/BufferParams.h
===
--- src/BufferParams.h	(revision 35615)
+++ src/BufferParams.h	(working copy)
@@ -405,6 +405,8 @@
 	bool output_sync;
 	/// custom LaTeX macro from user instead our own
 	std::string output_sync_macro;
+	/// use refstyle? or prettyref?
+	bool use_refstyle;
 
 private:
 	///
Index: src/frontends/qt4/GuiDocument.cpp
===
--- src/frontends/qt4/GuiDocument.cpp	(revision 35615)
+++ src/frontends/qt4/GuiDocument.cpp	(working copy)
@@ -1118,6 +1118,8 @@
 		this, SLOT(browseMaster()));
 	connect(latexModule->suppressDateCB, SIGNAL(clicked()),
 		this, SLOT(change_adaptor()));
+	connect(latexModule->refstyleCB, SIGNAL(clicked()),
+		this, SLOT(change_adaptor()));
 
 	// postscript drivers
 	for (int n = 0; tex_graphics[n][0]; ++n) {
@@ -2106,6 +2108,7 @@
 
 	// date
 	bp_.suppress_date = latexModule->suppressDateCB->isChecked();
+	bp_.use_refstyle  = latexModule->refstyleCB->isChecked();
 
 	// biblio
 	bp_.setCiteEngine(ENGINE_BASIC);
@@ -2531,6 +2534,7 @@
 
 	// date
 	latexModule->suppressDateCB->setChecked(bp_.suppress_date);
+	latexModule->refstyleCB->setChecked(bp_.use_refstyle);
 
 	// biblio
 	biblioModule->citeDefaultRB->setChecked(
Index: src/insets/InsetRef.cpp
===
--- src/insets/InsetRef.cpp	(revision 35615)
+++ src/insets/InsetRef.cpp	(working copy)
@@ -12,6 +12,7 @@
 #include "InsetRef.h"
 
 #include "Buffer.h"
+#include "BufferParams.h"
 #include "Cursor.h"
 #include "DispatchResult.h"
 #include "InsetLabel.h"
@@ -50,7 +51,7 @@
 		|| s == "pageref"
 		|| s == "vref" 
 		|| s == "vpageref"
-		|| s == "prettyref"
+		|| s == "formatted"
 		|| s == "eqref"
 		|| s == "nameref";
 }
@@ -70,11 +71,24 @@
 
 int InsetRef::latex(odocstream & os, OutputParams const & runparams) const
 {
-	// We don't want to output p_["name"], since that is only used 
-	// in docbook. So we construct new params, without it, and use that.
-	InsetCommandParams p(REF_CODE, getCmdName());
-	p["reference"] = getParam("reference");
-	os << p.getCommand(runparams);
+	string const cmd = getCmdName();
+	docstring const ref = getParam("reference");
+	if (cmd != "formatted") {
+		// We don't want to output p_["name"], since that is only used 
+		// in docbook. So we construct new params, without it, and use that.
+		InsetCommandParams p(REF_CODE, cmd);
+		p["reference"] = ref;
+		os << p.getCommand(runparams);
+		return 0;
+	} 
+	
+	// so we're doing a formatted reference.
+	if  (!buffer().params().use_refstyle) {
+		os << "\\prettyref{" << ref << '}';
+		return 0;
+	}
+	
+	os << "\\lyxref{" << ref << '}';
 	return 0;
 }
 
@@ -211,9 +225,14 @@
 	string const cmd = getCmdName();
 	if (cmd == "vref" || cmd == "vpageref")
 		features.require("varioref");
-	else if (cmd == "prettyref")
-		

Re: LyX 2.0 crash when choosing a word from the spell-checker context menu

2010-10-12 Thread Stephan Witt
Am 12.10.2010 um 19:00 schrieb John McCabe-Dansted:

> On Tue, Oct 12, 2010 at 10:43 PM, Ronen Abravanel  wrote:
>> Any more details I can supply?

No, I got it already. Thanks.

> I don't think any more is required. This seems to be another way to reproduce:
> http://www.lyx.org/trac/ticket/6945
> (I submitted this bug a few hours after your original report, which
> would be why you couldn't find it).
> 
> I tried your recipe, and as with #6945, it appears to be a regression
> in r35362.

Should by fixed now (r35616).

Stephan

Re: RefStyle Patch

2010-10-12 Thread Pavel Sanda
Richard Heck wrote:
> Comments welcome.

cant comment on the latex part but otherwise looks good. FORMAT file...
pavel


Re: doc build error

2010-10-12 Thread Pavel Sanda
Stephan Witt wrote:
> LyX only supports autoconf 2.59c-2.65, 2.67.

should be better now.
pavel


[Fwd: Re: Ticket #6092 Spell checker renders LyX inoperable]

2010-10-12 Thread David Philipp Rentsch

Hi Stephan, 
your name as well as the fact that you wrote from a gmx email address
suggest that your German, as I am, but, as I'm unsure of this and don't
know whether I'm communicating only with you or with other developers,
I'll keep writing in English.

Hi Stephan, or other developer 

I guess I would have to install Lyx 1.6.7 from scratch as it would
probably lead to dependency problems on my ubuntu distribution. I am
very busy right now trying to recover deleted data for a friend. This
will time and I'm also doing a translation. 
I might find the time to install this week. If so I will also take the
time to create a bug tracker account and report. 
best,
David

On Fri, 2010-10-01 at 16:40 +0200, Stephan Witt wrote: 

> Am 01.10.2010 um 14:48 schrieb David Philipp Rentsch:
> 
> > Dear Madam or Sir,
> > 
> > I had something to say about this bug, but don't know how to do it in bug 
> > tracker.
> 
> Dear David,
> 
> I guess you has to login (if not done creating an account before).
> 
> > Ticket #6092 (closed defect: worksforme) 
> > Opened 15 months ago
> > Last modified 5 days ago
> > Spell checker renders LyX inoperable
> > 
> > I have had the same problem in 1.65 using a Spanish document. The problem 
> > seams to occur only when the cursor is at the end of the document (when 
> > there are no words after the cursor).
> 
> The last comment there suggests to open the ticket again, if it's not fixed 
> with 1.6.7.
> Do you have the opportunity to check the problem with 1.6.7 again?
> 
> Regards,
> Stephan







Re: [Fwd: Re: Ticket #6092 Spell checker renders LyX inoperable]

2010-10-12 Thread Pavel Sanda
David Philipp Rentsch wrote:
> > > The problem seams to occur only when the cursor is at the end of the 
> > > document (when there are no words after the cursor).

i think thats different bug we marked fixedintrunk since it will be fixed in 
2.0.
simply create new empty file and press f7 to start spellcheck.
pavel


Re: [Fwd: Re: Ticket #6092 Spell checker renders LyX inoperable]

2010-10-12 Thread Pavel Sanda
Pavel Sanda wrote:
> David Philipp Rentsch wrote:
> > > > The problem seams to occur only when the cursor is at the end of the 
> > > > document (when there are no words after the cursor).
> 
> i think thats different bug we marked fixedintrunk since it will be fixed in 
> 2.0.

now i see it was recently closed by Uwe, so its the right bug... i remember to 
look on the issue, but i didn't see one line fix
and knowing that 2.0 solved it, i let it sleep. sorry for confusion.

> simply create new empty file and press f7 to start spellcheck.
> pavel


Warnings in trunk

2010-10-12 Thread Pavel Sanda
when opening or creating new files in trunk is see on the console messages like:

Warning: 83
Warning: 34

pavel


Re: Warnings in trunk

2010-10-12 Thread Pavel Sanda
Pavel Sanda wrote:
> when opening or creating new files in trunk is see on the console messages 
> like:
> 
> Warning: 83
> Warning: 34

i guess this has something to do with last changes in lyx2lyx. try to open eg 
additional manual.
newly saved files do not have it.

> 
> pavel


Re: LyX 2.0 crash when choosing a word from the spell-checker context menu

2010-10-12 Thread Ronen Abravanel
Awesome.  Works for me perfectly.

Thanks!


On Tue, Oct 12, 2010 at 3:09 PM, Stephan Witt  wrote:

> Am 12.10.2010 um 19:00 schrieb John McCabe-Dansted:
>
> > On Tue, Oct 12, 2010 at 10:43 PM, Ronen Abravanel 
> wrote:
> >> Any more details I can supply?
>
> No, I got it already. Thanks.
>
> > I don't think any more is required. This seems to be another way to
> reproduce:
> > http://www.lyx.org/trac/ticket/6945
> > (I submitted this bug a few hours after your original report, which
> > would be why you couldn't find it).
> >
> > I tried your recipe, and as with #6945, it appears to be a regression
> > in r35362.
>
> Should by fixed now (r35616).
>
> Stephan


Re: Warnings in trunk

2010-10-12 Thread Uwe Stöhr

> i guess this has something to do with last changes in lyx2lyx.

Yes, it was a debug warning I forgot to delete before committing. I removed it 
now.

regards Uwe


Re: crash and new regression

2010-10-12 Thread Uwe Stöhr

> this patch (against branch) should fix that.

Thanks, That fixes the bug, please apply.

regards Uwe


r35620

2010-10-12 Thread Uwe Stöhr

Jürgen,

can this also go to branch?

regards Uwe


Re: doc build error

2010-10-12 Thread Stephan Witt
Am 12.10.2010 um 22:09 schrieb Pavel Sanda:

> Stephan Witt wrote:
>> LyX only supports autoconf 2.59c-2.65, 2.67.
> 
> should be better now.

Yes, thanks.
I've add 2.68 to error message...

Stephan


Re: LyX 2.0 crash when choosing a word from the spell-checker context menu

2010-10-12 Thread Stephan Witt
Am 13.10.2010 um 02:32 schrieb Ronen Abravanel:

> Awesome.  Works for me perfectly.
> 
> Thanks!

Fine. Thanks for reporting.

Stephan