Re: [LyX/master] ctest update.

2019-02-28 Thread Kornel Benko
Am Donnerstag, 28. Februar 2019 21:24:45 CET schrieb Scott Kostyshak 
:
> On Mon, Feb 25, 2019 at 01:17:36AM +0100, Günter Milde wrote:
> > commit 4de4263f93fdca326d6603e996c7e8ba35454593
> > Author: Günter Milde 
> > Date:   Mon Feb 25 01:17:20 2019 +0100
> > 
> > ctest update.
> > 
> > * set required non-TeX fonts in the documents
> > * update comments for inverted tests
> > * update some tags
> 
> I think starting with this commit, the following test now fails for me:
> 
> ctest -R "export/examples/uk/splash_pdf4_texF"
> 
> I also have the following test failing (but I'm not sure if it's related
> to this commit):
> 
> ctest -R "export/doc/uk/Intro_pdf4_texF"
> 
> Scott

I see the same, but I don't thing it was this commit. Using
the original version of useSystemFonts.pl the errors still appear.

Kornel



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


ja/EmbeddedObjects.lyx: Uncodable character in latexString!

2019-02-28 Thread Scott Kostyshak
I have no idea if this is something worth spending time on, but I note
it just in case. To reproduce:

$ lyx -e platex lib/doc/ja/EmbeddedObjects.lyx 
Encoding.cpp (244): Uncodable character in latexString!
Encoding.cpp (244): Uncodable character in latexString!
Encoding.cpp (244): Uncodable character in latexString!
Encoding.cpp (244): Uncodable character in latexString!
Encoding.cpp (244): Uncodable character in latexString!
Encoding.cpp (244): Uncodable character in latexString!
Encoding.cpp (244): Uncodable character in latexString!
Encoding.cpp (244): Uncodable character in latexString!
Encoding.cpp (244): Uncodable character in latexString!
Encoding.cpp (244): Uncodable character in latexString!
Encoding.cpp (244): Uncodable character in latexString!
Encoding.cpp (244): Uncodable character in latexString!
Encoding.cpp (244): Uncodable character in latexString!
Encoding.cpp (244): Uncodable character in latexString!
Encoding.cpp (244): Uncodable character in latexString!
Encoding.cpp (244): Uncodable character in latexString!
$

Scott


signature.asc
Description: PGP signature


Re: File import error

2019-02-28 Thread Scott Kostyshak
On Thu, Feb 28, 2019 at 11:27:06PM -0500, Paul A. Rubin wrote:
> On 2/28/19 9:24 PM, Scott Kostyshak wrote:
> > On Thu, Feb 28, 2019 at 05:03:45PM -0500, Paul A. Rubin wrote:
> > 
> > > I don't see anything like this in the bug tracker. Any suggestions on
> > > something I can test here? Should I file a bug report?
> > As JMarc mentioned on the lyx-users thread, are there any differences in
> > preferences?
> > 
> > Scott
> I can't find a switch for using native dialogs in the Tools > Preferences...

I don't think it is accessible from the GUI (but not sure of that
claim).

> dialog, and I can't find any reference to it in any file in either
> /usr/share/lyx or ~/.lyx (including subdirectories). Any suggestions where I
> should look?

You don't need to look here, but this is the commit that introduced it:

  af795b80

> Is this in 2.3.2? (FWIW, the version I have lists the build
> date as 12/08/18.)

Yes the setting does apply for 2.3.x

You can just test with the following added to your preferences file:

  \use_native_filedialog false

and also try with

  \use_native_filedialog true

Any difference in behavior regarding this bug, between those two?

By the way, is the bug 100% reproducible on the system that has it? Can
you see *any* .tex files? Does it depend on the directory you're in?

I just tested but can't reproduce.

Scott


signature.asc
Description: PGP signature


Re: File import error

2019-02-28 Thread Paul A. Rubin

On 2/28/19 9:24 PM, Scott Kostyshak wrote:

On Thu, Feb 28, 2019 at 05:03:45PM -0500, Paul A. Rubin wrote:


I don't see anything like this in the bug tracker. Any suggestions on
something I can test here? Should I file a bug report?

As JMarc mentioned on the lyx-users thread, are there any differences in
preferences?

Scott
I can't find a switch for using native dialogs in the Tools > 
Preferences... dialog, and I can't find any reference to it in any file 
in either /usr/share/lyx or ~/.lyx (including subdirectories). Any 
suggestions where I should look? Is this in 2.3.2? (FWIW, the version I 
have lists the build date as 12/08/18.)


Paul



Re: File import error

2019-02-28 Thread Scott Kostyshak
On Thu, Feb 28, 2019 at 05:03:45PM -0500, Paul A. Rubin wrote:

> I don't see anything like this in the bug tracker. Any suggestions on
> something I can test here? Should I file a bug report?

As JMarc mentioned on the lyx-users thread, are there any differences in
preferences?

Scott


signature.asc
Description: PGP signature


Re: [LyX/master] ctest update.

2019-02-28 Thread Scott Kostyshak
On Mon, Feb 25, 2019 at 01:17:36AM +0100, Günter Milde wrote:
> commit 4de4263f93fdca326d6603e996c7e8ba35454593
> Author: Günter Milde 
> Date:   Mon Feb 25 01:17:20 2019 +0100
> 
> ctest update.
> 
> * set required non-TeX fonts in the documents
> * update comments for inverted tests
> * update some tags

I think starting with this commit, the following test now fails for me:

ctest -R "export/examples/uk/splash_pdf4_texF"

I also have the following test failing (but I'm not sure if it's related
to this commit):

ctest -R "export/doc/uk/Intro_pdf4_texF"

Scott


signature.asc
Description: PGP signature


Re: File import error

2019-02-28 Thread Richard Kimberly Heck
On 2/28/19 5:03 PM, Paul A. Rubin wrote:
> A rather mysterious issue has cropped up on the user list, and I'm
> moving it over here hoping someone will have a clue where to look. I'd
> file a bug report, but I'm not entirely sure it's a LyX bug.
>
> Symptom: On some systems, the file dialog opened by File > Import >
> LaTeX (plain)... fails to find .tex files with the default file filter
> (*.tex) but sees them when you switch the filter to all files.
>
> Now comes the goofy part.
>
>   * The original report was by a user of Linux Mint 18 (Sarah), in
> both the Cinnamon and MATE desktop environments, using the version
> of LyX 2.3.2 from Liviu's repository, on two different machines.
>   * On my desktop (Mint 18.3 Sylvia, MATE, same version of LyX from
> same repo) I cannot reproduce this problem.
>   * On my laptop (Mint 19.1 Tessa, MATE, same version of LyX from same
> repo) I can reproduce the problem.
>   * Someone else reported the problem on Ubuntu 18.04 (also LyX 2.3.2,
> provenance unknown).
>
> It doesn't seem to be a function of the desktop environment (MATE on
> both my systems), nor to an old versus new OS version (my desktop is a
> newer version the OP's and an older version than my laptop).
>
> It doesn't seem to a function of the Qt version (identical across OP's
> machine and both of mine), nor the specific compilation of LyX (same
> binary, down to the compile date, on both my machines).
>
> I don't think it's a MIME type issue. Both my desktop and my laptop
> give me the same MIME type (text/x-tex) for a .tex file.
>
> I ran LyX with -dbg any on both systems, and both times when I opened
> the import menu item I saw the same info for the file filter:
>
>> Select with path "/home/paul", mask "LaTeX (plain) (*.tex);;All Files
>> (*)", suggested ""
> There is one other oddity, which may or may not be related to the
> problem. Despite the fact that the OP and I are running the same
> version of LyX (2.3.2) built with the same version of Qt (4.8.7) under
> the same desktop environment (MATE) on fundamentally the same OS
> (Mint), her file dialog and the file dialog on my laptop look the same
> as each other but different from the file dialog on my desktop (where
> things work). The layout of controls is a bit different, and on her
> machine and my laptop the filter select control is a button that just
> says "LaTeX" (with a down arrow to change types) whereas on my desktop
> there is a label field and a select control, with the select control
> entry defaulting to "LaTeX (plain) (*.tex)".
>
> I don't see anything like this in the bug tracker. Any suggestions on
> something I can test here? Should I file a bug report?
>
There is a 'native dialog' thing that might have to do with this. It
might be that you're getting Qt's dialogs in some cases and your
desktop's dialogs in others. But I have no idea, really.

Riki




File import error

2019-02-28 Thread Paul A. Rubin
A rather mysterious issue has cropped up on the user list, and I'm 
moving it over here hoping someone will have a clue where to look. I'd 
file a bug report, but I'm not entirely sure it's a LyX bug.


Symptom: On some systems, the file dialog opened by File > Import > 
LaTeX (plain)... fails to find .tex files with the default file filter 
(*.tex) but sees them when you switch the filter to all files.


Now comes the goofy part.

 * The original report was by a user of Linux Mint 18 (Sarah), in both
   the Cinnamon and MATE desktop environments, using the version of LyX
   2.3.2 from Liviu's repository, on two different machines.
 * On my desktop (Mint 18.3 Sylvia, MATE, same version of LyX from same
   repo) I cannot reproduce this problem.
 * On my laptop (Mint 19.1 Tessa, MATE, same version of LyX from same
   repo) I can reproduce the problem.
 * Someone else reported the problem on Ubuntu 18.04 (also LyX 2.3.2,
   provenance unknown).

It doesn't seem to be a function of the desktop environment (MATE on 
both my systems), nor to an old versus new OS version (my desktop is a 
newer version the OP's and an older version than my laptop).


It doesn't seem to a function of the Qt version (identical across OP's 
machine and both of mine), nor the specific compilation of LyX (same 
binary, down to the compile date, on both my machines).


I don't think it's a MIME type issue. Both my desktop and my laptop give 
me the same MIME type (text/x-tex) for a .tex file.


I ran LyX with -dbg any on both systems, and both times when I opened 
the import menu item I saw the same info for the file filter:


Select with path "/home/paul", mask "LaTeX (plain) (*.tex);;All Files 
(*)", suggested ""
There is one other oddity, which may or may not be related to the 
problem. Despite the fact that the OP and I are running the same version 
of LyX (2.3.2) built with the same version of Qt (4.8.7) under the same 
desktop environment (MATE) on fundamentally the same OS (Mint), her file 
dialog and the file dialog on my laptop look the same as each other but 
different from the file dialog on my desktop (where things work). The 
layout of controls is a bit different, and on her machine and my laptop 
the filter select control is a button that just says "LaTeX" (with a 
down arrow to change types) whereas on my desktop there is a label field 
and a select control, with the select control entry defaulting to "LaTeX 
(plain) (*.tex)".


I don't see anything like this in the bug tracker. Any suggestions on 
something I can test here? Should I file a bug report?


Thanks,

Paul




Re: Problem with Python 3.6.6

2019-02-28 Thread Guenter Milde
On 2019-02-28, Stephan Witt wrote:
> Am 27.02.2019 um 14:23 schrieb Guenter Milde :
>> On 2019-02-26, Stephan Witt wrote:
>>> Am 26.02.2019 um 13:15 schrieb Guenter Milde :
 On 2019-02-26, Stephan Witt wrote:
> Am 26.02.2019 um 09:06 schrieb Guenter Milde :
>> On 2019-02-26, Stephan Witt wrote:

>> ...

>>> Traceback (most recent call last):
>>> File "/Users/stephan/git/lyx/lib/scripts/convertDefault.py", line 38, 
>>> in 
>>>  output = output.decode()
>>> AttributeError: 'str' object has no attribute 'decode'

>> ...

 I suppose that the unpatched code is correct with older Py3 versions, where
 `os.popen()` may have returned a bytes-string but the regexp-match a
 unicode-string and no implicit conversion is done.

>> ...

>>> The change 5b160e82be3 is to blame for this piece of code and is by José.
>>> His intention was it to prepare the scripts for the transition to Python 3.
>>> Probably he wants to comment on this or improve it further. ;-)

>> Could you test the following workaround, please?
>> This should help to ensure we have a (unicode) string object in Python3
>> without doing harm in other cases.

> Yes, this works for Python 3.6.6 on my system. With Python 2.7.15 it
> works too.

Thank you for confirming. It is now committed [9abd46b4d5/lyxgit].

Günter



>> diff --git a/lib/scripts/convertDefault.py b/lib/scripts/convertDefault.py
>> index 8678965013..c7db4f5499 100644
>> --- a/lib/scripts/convertDefault.py
>> +++ b/lib/scripts/convertDefault.py
>> @@ -35,7 +35,10 @@ if fout.close() != None:
>> output = fout.readline()
>> fout.close()
>> if not PY2:
>> -output = output.decode()
>> +# ensure we have a (unicode) string object in Python3
>> +# FIXME: not required for version >= 3.5
>> +#check whether this is required with any supported 3.x version!
>> +output = str(output)

>> version = re_version.match(output)




Re: Errors compiling LyX on Windows 10 VS 2017

2019-02-28 Thread Kornel Benko
Am Donnerstag, 28. Februar 2019 14:22:14 CET schrieb Jean-Marc Lasgouttes 
:
> Le 28/02/2019 à 13:01, Kornel Benko a écrit :
> > Am Donnerstag, 28. Februar 2019 11:56:57 CET schrieb Jean-Marc Lasgouttes 
> > :
> >> Le 28/02/2019 à 11:36, Kornel Benko a écrit :
>  Note that isalnum depends on the current locale, which is not a good
>  idea at all. We want to use unicode stuff.
> >>>
> >>> Good to know. I was not aware of textutils.h, shame on me.
> >>
> >> I did not see an exact equivalent to isalnum, so I do not know what you
> >> are after.
> >>
> >> JMarc
> >>
> > 
> > isAlnumASCII() helps a lot.
> 
> What do you use it for? It it OK that it is restricted to ascii characters?

I use it to remove '\n' from the searched string (not from the pattern string)
Formerly, all '\n' were replaced by space, but that is not needed if '\n' is 
followed
or prefixed by '{', or '}', or '\\' or such.
Space at some places is disturbing, because it is wrong to discard non-empty 
constructs.
For instance the string '\\foreignlanguage{english}{\\emph{\n}}'
is converted to
\foreignlanguage{english}{\emph{}}
and not to
\foreignlanguage{english}{\emph{ }}

OTOH, for the string
'abc\ndef'
it is OK to be converted to 'abc def'

> JMarc

Kornel



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


Re: Errors compiling LyX on Windows 10 VS 2017

2019-02-28 Thread Daniel

On 28/02/2019 12:04, Jean-Marc Lasgouttes wrote:

Le 28/02/2019 à 08:50, Daniel a écrit :
Compiling on Windows 10 with VS 2017 used to work. But now I get an 
error message when trying to compile LyX:


 Error    C2146
 syntax error: missing ')' before identifier 'or'
 LyX (applications\LyX\LyX)
 C:\Users\Daniel\lyx\devel\lyx\src\BufferParams.cpp
 3293

The line in question reads:

 if (inputenc == "default" or features.isRequired("japanese")) {


This one is fixed in master now.

JMarc




Thanks. I can compile again!

Daniel



Re: Errors compiling LyX on Windows 10 VS 2017

2019-02-28 Thread Jean-Marc Lasgouttes

Le 28/02/2019 à 13:01, Kornel Benko a écrit :

Am Donnerstag, 28. Februar 2019 11:56:57 CET schrieb Jean-Marc Lasgouttes 
:

Le 28/02/2019 à 11:36, Kornel Benko a écrit :

Note that isalnum depends on the current locale, which is not a good
idea at all. We want to use unicode stuff.


Good to know. I was not aware of textutils.h, shame on me.


I did not see an exact equivalent to isalnum, so I do not know what you
are after.

JMarc



isAlnumASCII() helps a lot.


What do you use it for? It it OK that it is restricted to ascii characters?

JMarc


Re: Errors compiling LyX on Windows 10 VS 2017

2019-02-28 Thread Kornel Benko
Am Donnerstag, 28. Februar 2019 11:56:57 CET schrieb Jean-Marc Lasgouttes 
:
> Le 28/02/2019 à 11:36, Kornel Benko a écrit :
> >> Note that isalnum depends on the current locale, which is not a good
> >> idea at all. We want to use unicode stuff.
> > 
> > Good to know. I was not aware of textutils.h, shame on me.
> 
> I did not see an exact equivalent to isalnum, so I do not know what you 
> are after.
> 
> JMarc
> 

isAlnumASCII() helps a lot.

The problem I were the inserted '\n' in the searched strings. They were 
converted to ' ', but this is not needed,
if '\n' is enclosed in non-alphanum chars.

Kornel


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


Re: Errors compiling LyX on Windows 10 VS 2017

2019-02-28 Thread Jean-Marc Lasgouttes

Le 28/02/2019 à 08:50, Daniel a écrit :
Compiling on Windows 10 with VS 2017 used to work. But now I get an 
error message when trying to compile LyX:


 Error    C2146
 syntax error: missing ')' before identifier 'or'
 LyX (applications\LyX\LyX)
 C:\Users\Daniel\lyx\devel\lyx\src\BufferParams.cpp
 3293

The line in question reads:

 if (inputenc == "default" or features.isRequired("japanese")) {


This one is fixed in master now.

JMarc



Re: Errors compiling LyX on Windows 10 VS 2017

2019-02-28 Thread Jean-Marc Lasgouttes

Le 28/02/2019 à 11:36, Kornel Benko a écrit :

Note that isalnum depends on the current locale, which is not a good
idea at all. We want to use unicode stuff.


Good to know. I was not aware of textutils.h, shame on me.


I did not see an exact equivalent to isalnum, so I do not know what you 
are after.


JMarc


Re: Errors compiling LyX on Windows 10 VS 2017

2019-02-28 Thread Kornel Benko
Am Donnerstag, 28. Februar 2019 10:53:15 CET schrieb Jean-Marc Lasgouttes 
:
> Le 28/02/2019 à 09:33, Kornel Benko a écrit :
> >>Error   C2672
> >>'std::isalnum': no matching overloaded function found   
> >>LyX (applications\LyX\LyX)  
> >>C:\Users\Daniel\lyx\devel\lyx\src\lyxfind.cpp
> >>2866
> >>
> >> The line in question reads:
> >>
> >>if (std::isalnum(t[pos+1])) {
> > 
> > Probably missing
> > #include 
> > Could you please test?
> 
> Kornel, it would be better for consistency at least for now to stick to 
> the functions defined in support/textutils.h. If you do not find there 
> what you need please create a correct function.
> 
> Note that isalnum depends on the current locale, which is not a good 
> idea at all. We want to use unicode stuff.

Good to know. I was not aware of textutils.h, shame on me.

> JMarc

Kornel



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


Re: about the Win installer

2019-02-28 Thread Uwe Stöhr

On 28.02.2019 08:38, Scott Kostyshak wrote:


I confirm that after updating TL 2018, I can now compile the Embedded
Objects manual. Uwe let me know that the bug was in arydshln 1.75 and
since last weekend the new version 1.76 of this package is available
where the bug is fixed.


For the records: The arydshln developer explained me the issue was
triggered by an update of the longtable package. It changed the table
line handling so that arydhsln's connection to the line handling did not
work anymore.

regards Uwe


Re: Errors compiling LyX on Windows 10 VS 2017

2019-02-28 Thread Daniel

On 28/02/2019 09:33, Kornel Benko wrote:

Am Donnerstag, 28. Februar 2019 08:50:04 CET schrieb Daniel :

But next I get:

Error   C2672
'std::isalnum': no matching overloaded function found   
LyX (applications\LyX\LyX)  
C:\Users\Daniel\lyx\devel\lyx\src\lyxfind.cpp
2866

The line in question reads:

if (std::isalnum(t[pos+1])) {


Probably missing
#include 
Could you please test?


I tried adding
#include 
at the top of lyxfind.cpp, but it does not help.

Daniel



Re: Errors compiling LyX on Windows 10 VS 2017

2019-02-28 Thread Jean-Marc Lasgouttes

Le 28/02/2019 à 09:33, Kornel Benko a écrit :

Error   C2672
'std::isalnum': no matching overloaded function found   
LyX (applications\LyX\LyX)  
C:\Users\Daniel\lyx\devel\lyx\src\lyxfind.cpp
2866

The line in question reads:

if (std::isalnum(t[pos+1])) {


Probably missing
#include 
Could you please test?


Kornel, it would be better for consistency at least for now to stick to 
the functions defined in support/textutils.h. If you do not find there 
what you need please create a correct function.


Note that isalnum depends on the current locale, which is not a good 
idea at all. We want to use unicode stuff.


JMarc


Re: Errors compiling LyX on Windows 10 VS 2017

2019-02-28 Thread Kornel Benko
Am Donnerstag, 28. Februar 2019 08:50:04 CET schrieb Daniel :
> Compiling on Windows 10 with VS 2017 used to work. But now I get an 
> error message when trying to compile LyX:
> 
>   Error   C2146
>   syntax error: missing ')' before identifier 'or'
>   LyX (applications\LyX\LyX)
>   C:\Users\Daniel\lyx\devel\lyx\src\BufferParams.cpp
>   3293
> 
> The line in question reads:
> 
>   if (inputenc == "default" or features.isRequired("japanese")) {

Git blame gives
32e4a85e4 src/BufferParams.cpp (Günter Milde   2019-02-03 
22:04:17 +0100 3293)

> Manually replacing the "or" with "||" seems to fix the problem. But next 
> I get:
> 
>   Error   C2672
>   'std::isalnum': no matching overloaded function found   
>   LyX (applications\LyX\LyX)  
>   C:\Users\Daniel\lyx\devel\lyx\src\lyxfind.cpp
>   2866
> 
> The line in question reads:
> 
>   if (std::isalnum(t[pos+1])) {

Probably missing
#include 
Could you please test?

> Any idea what is going?

Yes, you are not fast enough in compiling :)

> Daniel
> 

Kornel


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