Re: use FindCXX11Compiler.cmake also for MSVC

2015-12-10 Thread Georg Baum
Kornel Benko wrote:

> I am a bit lost, since the small snippet below does not compile on MSVC
> (for unknown reason)
> 
> 
> template 
> struct check
> {
> static_assert(sizeof(int) <= sizeof(T), "not big enough");
> };
> 
> typedef check right_angle_brackets;
> 
> class TestDeleted
> {
> public:
> TestDeleted() = delete;
> };
> 
> 
> int a;
> decltype(a) b;
> 
> typedef check check_type;
> check_type c;
> check_type&& cr = static_cast(c);
> 
> auto d = a;
> 
> int main() {
>   return 0;
> };
> ==

It compiles with this MSVC online compiler: http://webcompiler.cloudapp.net/ 
According to https://msdn.microsoft.com/en-us/library/hh567368.aspx#featurelist 
it should also compile with MSVC 2013. 
Earlier versions do not work because of TestDeleted.

Uwe, can you please apply the patch from Kornel in the first message in this 
thread, delete CMakeCache.txt, try to build and then send me  
CMakeFiles/CMakeError.log? It is too big for the list. This file will tell 
us what goes wrong with the test.

> If it compiles (with any needed compiler flags), then the last patch I
> sent (in the starting mail on this thread) should be similar.
> 
> Sources changed slightly in the meantime, so the patch may not apply
> cleanly. My latest guess was the flag "/Ze" to enable MSVC extensions, but
> I got no response ...

Sorry, I overlooked that. /Ze is for Microsoft extensions, this is not 
needed.


Georg



Re: make distcheck: cannot remove '../../po/lyx.pot'

2015-12-10 Thread Jean-Marc Lasgouttes

Le 10/12/2015 03:30, Scott Kostyshak a écrit :

On Wed, Dec 09, 2015 at 10:11:53PM +0100, Georg Baum wrote:

This is just a shot in the dark, but when I try to compile from a fresh git
checkout with autotools, it updates all po and gmo files once, including
lyx.pot. This dos not happen anymore for any further compile, even if the
sources did change. Maybe there is no difference between 2.1 and 2.2, but it
is simply a matter of time stamps of the relevant files in the tar ball?
Maybe for 2.1 lyx.pot has a later timestamp than the files it depends on,
and for 2.2 this is not the case?


Interesting idea. In this case, a git bisect would be worthless so I
will wait before doing it. Is there a way to test your theory? If we use
'touch' to update a file and then try?


Yes, this is something I forgot to mention. I never understood what are 
the situations where the files are rebuilt.


JMarc



Re: Style question

2015-12-10 Thread Scott Kostyshak
On Wed, Dec 09, 2015 at 10:10:42AM +0100, Jean-Marc Lasgouttes wrote:
> Le 09/12/2015 06:54, Scott Kostyshak a écrit :
> >Regarding the following code:
> >
> >-
> >void Text::selectWord(Cursor & cur, word_location loc)
> >{
> >   LBUFERR(this == cur.text());
> >   CursorSlice from = cur.top();
> >   CursorSlice to = cur.top();
> >   getWord(from, to, loc);
> >-
> >
> >It is not easy to know whether "to" and "from" are equal to each other 
> >because
> >cur.top() might return something different the second time. For readability
> >purposes, I would prefer either
> 
> I do not really see why this confuses you actually.

Well, since I have a bad memory I always try to write code imagining
"what if I did not have any inside information". A newcommer does not
know that the initializations of 'to' and 'from' are useless (neither
would he under my proposal). A newcommer also does not know what top()
does. Maybe it pops off something, and thus changes the underlying list
so that the second call to it returns something different. My proposal
at least clarifies this.

I don't care that much. I was just curious what others thought. This was
a poor example. I should have cut off the "getWord" call in my quote so
as just to focus on what the reader would think of 'from' and 'to'.

Scott


signature.asc
Description: PGP signature


compilation fails with gnu make

2015-12-10 Thread Guenter Milde
Dear LyXers,

compilation via `make` after a
 ../lyx/configure --enable-build-type=release --with-version-suffix=-svn
failed with error

make[3]: Entering directory '/usr/local/src/lyxbuild/lib'
  GEN  lyx-svn.desktop
make[3]: *** No rule to make target 'images/all-changes-accept.png', needed by 
'all-am'.  Schluss.


It seems there is some cleanup required after
db363ab19f6051bb7b7af3fc88/lyxgit "Remove unneeded png images."

Günter



Re: compilation fails with gnu make

2015-12-10 Thread Stephan Witt
Am 10.12.2015 um 10:17 schrieb Guenter Milde :

> Dear LyXers,
> 
> compilation via `make` after a
> ../lyx/configure --enable-build-type=release --with-version-suffix=-svn
> failed with error
> 
> make[3]: Entering directory '/usr/local/src/lyxbuild/lib'
>  GEN  lyx-svn.desktop
> make[3]: *** No rule to make target 'images/all-changes-accept.png', needed 
> by 'all-am'.  Schluss.
> 
> 
> It seems there is some cleanup required after
> db363ab19f6051bb7b7af3fc88/lyxgit "Remove unneeded png images."

Did you run autogen.sh before configure?

Stephan

Re: make distcheck: cannot remove '../../po/lyx.pot'

2015-12-10 Thread Georg Baum
Scott Kostyshak wrote:

> Interesting idea. In this case, a git bisect would be worthless so I
> will wait before doing it. Is there a way to test your theory? If we use
> 'touch' to update a file and then try?

I'd think so.


Georg



Re: A margin-al question

2015-12-10 Thread Scott Kostyshak
On Sat, Dec 05, 2015 at 10:03:49PM +0100, Jean-Marc Lasgouttes wrote:
> Le 05/12/15 07:17, Scott Kostyshak a écrit :
> >On Fri, Dec 04, 2015 at 07:14:43PM -0500, Scott Kostyshak wrote:
> >>On Thu, Dec 03, 2015 at 10:10:15AM +0100, Jean-Marc Lasgouttes wrote:
> >>>Le 30/11/2015 12:02, Scott Kostyshak a écrit :
> On Sun, Nov 29, 2015 at 11:18:11PM +0100, Murat Yildizoglu wrote:
> >Hello,
> >I would like to know if it would be too difficult for you to implement an
> >option that permits us to fix the margin between the text's border and
> >LyX's window border. Currently, there is nearly zero margin, and that is
> >something that slightly annoyed me for many years.
> 
> Can you send a screenshot? For me there is a margin.
> >>>
> >>>Would this spin-off of my earlier zoomed width patch (which is on hold for
> >>>now) be useful for margins?
> >>
> >>Works fine for me in limited testing. I would say put it in if you think
> >>it is the right thing to do.
> >
> >I believe this is the following issue:
> >http://www.lyx.org/trac/ticket/9376
> 
> My patch is much more limited than the ticket, it only ensures that the
> margin is of the same size w.r.t. the character sizes. Note a big feature,
> just something that seems logical to do.

I have tested this and it works fine for me in limited testing. Please
put it in.

Scott


signature.asc
Description: PGP signature


Re: use FindCXX11Compiler.cmake also for MSVC

2015-12-10 Thread Peter Kümmel

On 10.12.2015 22:48, Kornel Benko wrote:

Am Donnerstag, 10. Dezember 2015 um 21:12:36, schrieb Georg Baum 


Kornel Benko wrote:


I am a bit lost, since the small snippet below does not compile on MSVC
(for unknown reason)


template 
struct check
{
 static_assert(sizeof(int) <= sizeof(T), "not big enough");
};

typedef check right_angle_brackets;

class TestDeleted
{
public:
 TestDeleted() = delete;
};


int a;
decltype(a) b;

typedef check check_type;
check_type c;
check_type&& cr = static_cast(c);

auto d = a;

int main() {
   return 0;
};
==


It compiles with this MSVC online compiler: http://webcompiler.cloudapp.net/
According to https://msdn.microsoft.com/en-us/library/hh567368.aspx#featurelist 
it should also compile with MSVC 2013.
Earlier versions do not work because of TestDeleted.

Uwe, can you please apply the patch from Kornel in the first message in this
thread, delete CMakeCache.txt, try to build and then send me
CMakeFiles/CMakeError.log? It is too big for the list. This file will tell
us what goes wrong with the test.


Maybe also use '--debug-output' as an extra cmake parameter. Than also the file 
CMakeFiles/CMakeOutput.log may be of interest.
I'd like to have both files too.


If it compiles (with any needed compiler flags), then the last patch I
sent (in the starting mail on this thread) should be similar.

Sources changed slightly in the meantime, so the patch may not apply
cleanly. My latest guess was the flag "/Ze" to enable MSVC extensions, but
I got no response ...


Sorry, I overlooked that. /Ze is for Microsoft extensions, this is not
needed.



OK.


Georg


Kornel



Isn't this too much trouble? msvc2013 and msvc2015 have C++11 enabled by 
default.
Not much to do in the cmake files, and whan something has to be changed just use
cmake variables MSVC2012/MSVC2014. Or have I missed something?

Peter


Re: use FindCXX11Compiler.cmake also for MSVC

2015-12-10 Thread Georg Baum
Uwe Stöhr wrote:

> So with a clean git tree one only had to apply the attached patch to get
> cxx11 for MSVC but compiling leads to these 2 errors:
> 
>D:\LyXGit\Master\src\frontends\qt4\GuiView.cpp(3357): error C3848:
> expression having type 'const
> 
std::_Bind &,bool)const,lyx::Buffer::ExportStatus,lyx::Buffer,const std::string
> &,bool>,lyx::Buffer *&,std::_Ph<1> &,bool>' would lose some
> const-volatile qualifiers in order to call 'lyx::Buffer::ExportStatus
> 
std::_Bind const,lyx::Buffer::ExportStatus,lyx::Buffer,const std::string
> &,bool>,lyx::Buffer *&,std::_Ph<1> &,bool>::operator () std::string&>(conststd::string &)'
> [D:\LyXGit\Master\compile-2013\src\frontends\qt4\frontend_qt.vcxproj]
> 
>C:\MSVC2013\VC\include\functional(1241): error C2100: illegal
> indirection (D:\LyXGit\Master\src\insets\InsetText.cpp)
> [D:\LyXGit\Master\compile-2013\src\insets\insets.vcxproj]

Unfortunately I do not understand either of the error messages. Nevertheless 
I would like to fix at least the compiler detection (see other mail), since 
that all the investigation work is not lost, and if somebody tries to 
continue the work he does not need to solve all problems again.


Georg



Re: use FindCXX11Compiler.cmake also for MSVC

2015-12-10 Thread Kornel Benko
Am Donnerstag, 10. Dezember 2015 um 21:12:36, schrieb Georg Baum 

> Kornel Benko wrote:
> 
> > I am a bit lost, since the small snippet below does not compile on MSVC
> > (for unknown reason)
> > 
> > 
> > template 
> > struct check
> > {
> > static_assert(sizeof(int) <= sizeof(T), "not big enough");
> > };
> > 
> > typedef check right_angle_brackets;
> > 
> > class TestDeleted
> > {
> > public:
> > TestDeleted() = delete;
> > };
> > 
> > 
> > int a;
> > decltype(a) b;
> > 
> > typedef check check_type;
> > check_type c;
> > check_type&& cr = static_cast(c);
> > 
> > auto d = a;
> > 
> > int main() {
> >   return 0;
> > };
> > ==
> 
> It compiles with this MSVC online compiler: http://webcompiler.cloudapp.net/ 
> According to 
> https://msdn.microsoft.com/en-us/library/hh567368.aspx#featurelist it should 
> also compile with MSVC 2013. 
> Earlier versions do not work because of TestDeleted.
> 
> Uwe, can you please apply the patch from Kornel in the first message in this 
> thread, delete CMakeCache.txt, try to build and then send me  
> CMakeFiles/CMakeError.log? It is too big for the list. This file will tell 
> us what goes wrong with the test.

Maybe also use '--debug-output' as an extra cmake parameter. Than also the file 
CMakeFiles/CMakeOutput.log may be of interest.
I'd like to have both files too.

> > If it compiles (with any needed compiler flags), then the last patch I
> > sent (in the starting mail on this thread) should be similar.
> > 
> > Sources changed slightly in the meantime, so the patch may not apply
> > cleanly. My latest guess was the flag "/Ze" to enable MSVC extensions, but
> > I got no response ...
> 
> Sorry, I overlooked that. /Ze is for Microsoft extensions, this is not 
> needed.
> 

OK.

> Georg

Kornel

signature.asc
Description: This is a digitally signed message part.


Re: A margin-al question

2015-12-10 Thread Scott Kostyshak
On Sat, Dec 05, 2015 at 10:06:27PM +0100, Jean-Marc Lasgouttes wrote:
> Le 29/11/15 23:18, Murat Yildizoglu a écrit :
> >Hello,
> >I would like to know if it would be too difficult for you to implement
> >an option that permits us to fix the margin between the text's border
> >and LyX's window border. Currently, there is nearly zero margin, and
> >that is something that slightly annoyed me for many years.
> >I was wondering if the adoption of the new QT would allow for such an
> >option.
> >This is  a question comfort rather than usability, but nevertheless...
> >Best regards,
> 
> Murat, what kind of value would you choose for the margin? What is the
> difference wrt just resizing the window? We have a ticket that complains
> about line width, but I tend to think that the solution is to qvoid
> full-screen windows.
> 
> Do you have something else in mind?

Murat, do you have any input on the above questions?

Scott


signature.asc
Description: PGP signature


Re: Style question

2015-12-10 Thread Richard Heck
On 12/10/2015 03:09 AM, Scott Kostyshak wrote:
> On Wed, Dec 09, 2015 at 10:10:42AM +0100, Jean-Marc Lasgouttes wrote:
>> Le 09/12/2015 06:54, Scott Kostyshak a écrit :
>>> Regarding the following code:
>>>
>>> -
>>> void Text::selectWord(Cursor & cur, word_location loc)
>>> {
>>>   LBUFERR(this == cur.text());
>>>   CursorSlice from = cur.top();
>>>   CursorSlice to = cur.top();
>>>   getWord(from, to, loc);
>>> -
>>>
>>> It is not easy to know whether "to" and "from" are equal to each other 
>>> because
>>> cur.top() might return something different the second time. For readability
>>> purposes, I would prefer either
>> I do not really see why this confuses you actually.
> Well, since I have a bad memory I always try to write code imagining
> "what if I did not have any inside information". A newcommer does not
> know that the initializations of 'to' and 'from' are useless (neither
> would he under my proposal). 

And it's even more confusing because the initiation of from DOES matter,
whereas that of to does not matter.

> A newcommer also does not know what top()
> does. Maybe it pops off something, and thus changes the underlying list
> so that the second call to it returns something different. My proposal
> at least clarifies this.
>
> I don't care that much. I was just curious what others thought. This was
> a poor example. I should have cut off the "getWord" call in my quote so
> as just to focus on what the reader would think of 'from' and 'to'.

At the very least, if the value of to is irrelevant, then it should just be:
CursorSlice to;
Then it's not potentially misleading as to why we're passing the same
value twice.

Richard



Re: A margin-al question

2015-12-10 Thread Guillaume Munch

Le 05/12/2015 21:03, Jean-Marc Lasgouttes a écrit :

Le 05/12/15 07:17, Scott Kostyshak a écrit :

On Fri, Dec 04, 2015 at 07:14:43PM -0500, Scott Kostyshak wrote:

On Thu, Dec 03, 2015 at 10:10:15AM +0100, Jean-Marc Lasgouttes wrote:

Le 30/11/2015 12:02, Scott Kostyshak a écrit :

On Sun, Nov 29, 2015 at 11:18:11PM +0100, Murat Yildizoglu wrote:

Hello,
I would like to know if it would be too difficult for you to
implement an
option that permits us to fix the margin between the text's border
and
LyX's window border. Currently, there is nearly zero margin, and
that is
something that slightly annoyed me for many years.


Can you send a screenshot? For me there is a margin.


Would this spin-off of my earlier zoomed width patch (which is on
hold for
now) be useful for margins?


Works fine for me in limited testing. I would say put it in if you think
it is the right thing to do.


I believe this is the following issue:
http://www.lyx.org/trac/ticket/9376


My patch is much more limited than the ticket, it only ensures that the
margin is of the same size w.r.t. the character sizes. Note a big
feature, just something that seems logical to do.

Concerning the ticket, I think people should just resize their window :)



I tend to disagree with this last assertion, because the size of the 
buffer view changes depending on what panels are open, and also because 
margins affect readability and comfort too.


Personally I would love to be able to set margins and the line spacing 
as I see it fit like I can do on my kindle 
(), 
possibly with a maximum line width.



Guillaume




Re: use FindCXX11Compiler.cmake also for MSVC

2015-12-10 Thread Kornel Benko
Am Donnerstag, 10. Dezember 2015 um 23:39:17, schrieb Peter Kümmel 

> On 10.12.2015 22:48, Kornel Benko wrote:
> > Am Donnerstag, 10. Dezember 2015 um 21:12:36, schrieb Georg Baum 
> > 
> >> Kornel Benko wrote:
> >>
> >>> I am a bit lost, since the small snippet below does not compile on MSVC
> >>> (for unknown reason)
> >>>
> >>> 
> >>> template 
> >>> struct check
> >>> {
> >>>  static_assert(sizeof(int) <= sizeof(T), "not big enough");
> >>> };
> >>>
> >>> typedef check right_angle_brackets;
> >>>
> >>> class TestDeleted
> >>> {
> >>> public:
> >>>  TestDeleted() = delete;
> >>> };
> >>>
> >>>
> >>> int a;
> >>> decltype(a) b;
> >>>
> >>> typedef check check_type;
> >>> check_type c;
> >>> check_type&& cr = static_cast(c);
> >>>
> >>> auto d = a;
> >>>
> >>> int main() {
> >>>return 0;
> >>> };
> >>> ==
> >>
> >> It compiles with this MSVC online compiler: 
> >> http://webcompiler.cloudapp.net/
> >> According to 
> >> https://msdn.microsoft.com/en-us/library/hh567368.aspx#featurelist it 
> >> should also compile with MSVC 2013.
> >> Earlier versions do not work because of TestDeleted.
> >>
> >> Uwe, can you please apply the patch from Kornel in the first message in 
> >> this
> >> thread, delete CMakeCache.txt, try to build and then send me
> >> CMakeFiles/CMakeError.log? It is too big for the list. This file will tell
> >> us what goes wrong with the test.
> >
> > Maybe also use '--debug-output' as an extra cmake parameter. Than also the 
> > file CMakeFiles/CMakeOutput.log may be of interest.
> > I'd like to have both files too.
> >
> >>> If it compiles (with any needed compiler flags), then the last patch I
> >>> sent (in the starting mail on this thread) should be similar.
> >>>
> >>> Sources changed slightly in the meantime, so the patch may not apply
> >>> cleanly. My latest guess was the flag "/Ze" to enable MSVC extensions, but
> >>> I got no response ...
> >>
> >> Sorry, I overlooked that. /Ze is for Microsoft extensions, this is not
> >> needed.
> >>
> >
> > OK.
> >
> >> Georg
> >
> > Kornel
> >
> 
> Isn't this too much trouble? msvc2013 and msvc2015 have C++11 enabled by 
> default.
> Not much to do in the cmake files, and whan something has to be changed just 
> use
> cmake variables MSVC2012/MSVC2014. Or have I missed something?

I think yes. I'd like use some built-in tests to check for compiler features.
That way we may have less conditional code in cmake scripts.

And to know, why a compilation fails, is of some value too.

> Peter

Kornel

signature.asc
Description: This is a digitally signed message part.


Re: A margin-al question

2015-12-10 Thread Murat Yildizoglu
Sorry Scott,
It seems that I have missed your original reply. 
I do not use the full screen mode, but even in a normal window, the letters are 
just touching the border of the window, without any gutter or margin. For me 
the text would be easier to read and manipulate if there was a small gutter at 
least between the window border and the letters of the text. I use LyX under 
OSX FYI. 

Murat Yildizoglu

> Le 10 déc. 2015 à 23:35, Scott Kostyshak  a écrit :
> 
>> On Sat, Dec 05, 2015 at 10:06:27PM +0100, Jean-Marc Lasgouttes wrote:
>> Le 29/11/15 23:18, Murat Yildizoglu a écrit :
>>> Hello,
>>> I would like to know if it would be too difficult for you to implement
>>> an option that permits us to fix the margin between the text's border
>>> and LyX's window border. Currently, there is nearly zero margin, and
>>> that is something that slightly annoyed me for many years.
>>> I was wondering if the adoption of the new QT would allow for such an
>>> option.
>>> This is  a question comfort rather than usability, but nevertheless...
>>> Best regards,
>> 
>> Murat, what kind of value would you choose for the margin? What is the
>> difference wrt just resizing the window? We have a ticket that complains
>> about line width, but I tend to think that the solution is to qvoid
>> full-screen windows.
>> 
>> Do you have something else in mind?
> 
> Murat, do you have any input on the above questions?
> 
> Scott


Re: #9899: SIGSEGV error in table with different font sizes

2015-12-10 Thread Tyler Grummett
Just upgraded to the new version and it is working. Previously simply
selecting two cells with different fonts would make it crash, but now I can
select both and change the fontsize to a uniform size as was the original
intent.

Thank you for your prompt replies!

On Thu, Dec 10, 2015 at 7:31 PM, LyX Ticket Tracker  wrote:

> #9899: SIGSEGV error in table with different font sizes
> ---+
>  Reporter:  TheRealDurdan  |   Owner:  Tyler
>  Type:  defect |  Status:  new
>  Priority:  highest|   Milestone:
> Component:  general| Version:  2.1.2
>  Severity:  critical   |  Resolution:
>  Keywords:  crash  |
> ---+
> Changes (by spitz):
>
>  * keywords:  SIGSEGV table fontsize => crash
>  * priority:  normal => highest
>  * severity:  normal => critical
>
>
> Comment:
>
>  Did you try with a more recent version?
>
> --
> Ticket URL: 
> The LyX Project 
> LyX -- The Document Processor
>


Bundled 3rdparty libraries

2015-12-10 Thread Peter Kümmel
https://github.com/syntheticpp/lyx/commits/3rdparty

I would like to merge above Branch which adds src/3rdparty with stripped down 
sources of zlib iconv and hunspell.

Build and usage of these libs is controlled by LYX_3RDPARTY_BUILD and has been 
trdted with mingw-cross, msvc2013 and msvc2015. 

I see this as the starting point for a simpler dependency handling.

64Bit build with msvc2015

2015-12-10 Thread Peter Kümmel
Here are patches needed for a Wimdow 64 build done with msvc2015 :

https://github.com/syntheticpp/lyx/commits/msvc15-amd64

Most changes because long is only 32bit on Windows. 
http://www.viva64.com/en/t/0012/

Having a look at the tabe it seems nobody toke the coutage to make int 64 bit 
wide on 64 bit systems ;-) 

Installer with mingw build

2015-12-10 Thread Peter Kümmel
The automatic build now also builds iconv, hunspell, and zlib.

Uwe, could you check if the downloadable zip is good enough as basis for a real 
installer?

https://github.com/syntheticpp/LyX-bleeding-edge/blob/LyX-master-win32/README.md

If this works, then we could even try to build the installer automatically. 
Uwe, do you know that scripting in linux is much more convinient than these bat 
file hacking.

Or we switch mingw on Windows.

Are there any god reasons to not use mingw for a release? (sure for developing 
msvc could be still used)

Re: [LyX/master] Set default output format for manuals to PDF (pdflatex).

2015-12-10 Thread Kornel Benko
Am Donnerstag, 10. Dezember 2015 um 10:41:33, schrieb Günter Milde 

> commit 0529b40cc94a2202b14705ef40ba5ea90dc5882a
> Author: Günter Milde 
> Date:   Thu Dec 10 10:40:50 2015 +0100
> 
> Set default output format for manuals to PDF (pdflatex).
> 
> Pdflatex is the recommended export tool for the manuals.
> Pdflatex brings the best results for hyperlinking.
> Some features (e.g. rotated text) are not available in DVI or PS (dvips).
> 
> This does not affect export from command line or autotests
> (where this setting is ignored and the format must aways be given 
> explicitely).

It effects the test suite. Now we are there, doing exactly the same as VW.

Kornel

signature.asc
Description: This is a digitally signed message part.