Re: [LyX/master] Add shell wrapper for Maxima on MacOSX The command line utility of Maxima is inside the Maxima.app bundle and isn't named "maxima"

2016-10-19 Thread Stephan Witt
Am 20.10.2016 um 06:35 schrieb Stephan Witt :
> 
> commit b37d6c9e941068bbf29281ca854687c7717e0d4d
> Author: Stephan Witt 
> Date:   Thu Oct 20 06:35:13 2016 +0200
> 
>Add shell wrapper for Maxima on MacOSX
>The command line utility of Maxima is inside the Maxima.app bundle and 
> isn't named "maxima"
> ---
> development/MacOSX/Makefile.am |2 +-
> development/MacOSX/maxima  |   13 +
> 2 files changed, 14 insertions(+), 1 deletions(-)

I tried to check my change with "make dist" and failed with:

make[2]: *** No rule to make target `export/ja/wrong_auto_encoding.lyx', needed 
by `distdir'.  Stop.
make[1]: *** [distdir] Error 1
make: *** [dist] Error 2


There is only a export/latex/ja_wrong_auto_encoding.lyx file - how should this 
be solved?

Stephan



Re: [PATCH] Re: Return + Return in nested environments

2016-10-19 Thread Pavel Sanda
Enrico Forestieri wrote:
> On Wed, Oct 19, 2016 at 03:09:53PM -0700, Pavel Sanda wrote:
> > 
> > Funny thing is that my mutt read the previous message without doing
> > what you describe...
> 
> I guess you are using the maildir format for your mailbox.

mbox here. but mutt version is somewhat archaic, that might be the cause.
p


Re: missing glyphs with title of chapter

2016-10-19 Thread Uwe Stöhr

Am 18.10.2016 um 17:43 schrieb edu Gpl:


"What is your error message?"



the error msg:
\AtBeginEnvironment

{ }{\selectlanguage{}}

The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it


This error is because you have these 2 lines in your document preamble:

\AtBeginEnvironment{ }{\selectlanguage{english}}
\AtBeginEnvironment{ }{\selectlanguage{}}

This is wrong LaTeX. \AtBeginEnvironment only makes sense if you specify 
the environment you are referring to. For example


\AtBeginEnvironment{appendices}

if you want to change the appendices environment.

\selectlanguage{} is also incorrect because you need to specify a valid 
babel language name. For example

\selectlanguage{english}
as you have done it above.

regards Uwe

p.s. please always CC the mailing list in replies so that everybody 
could follow the discussion and help you


Re: [PATCH] Re: Return + Return in nested environments

2016-10-19 Thread Enrico Forestieri
On Wed, Oct 19, 2016 at 03:09:53PM -0700, Pavel Sanda wrote:
> 
> Funny thing is that my mutt read the previous message without doing
> what you describe...

I guess you are using the maildir format for your mailbox.

-- 
Enrico


Re: Feature: open pdf from right click on citation inset ?

2016-10-19 Thread Pavel Sanda
Scott Kostyshak wrote:
> On Sun, May 03, 2015 at 07:14:47PM -0400, Scott Kostyshak wrote:
> > On Wed, May 7, 2014 at 2:34 AM, Scott Kostyshak  wrote:
> > 
> > > I would like to be able to right click on a citation and be able to
> > > click on "open pdf". The filenames of the papers I cite are all stored
> > > with the author field of the BibTeX (followed by the extension
> > > ".pdf"). Thus, I would just need to input the folder location into a
> > > LyX document setting, and the feature would work.
> > 
> > Apparently there is already an enhancement request:
> > http://www.lyx.org/trac/ticket/6487
> 
> I'm still thinking about this possible feature. I'm still not sure whether we
> should rely on BibTeX entries such as "file" or "pdf" for locating the file, 
> or
> just assuming that the name of the PDF is the same as the citation key. For
> example, we could allow a directory path to be specified in Document > 
> Settings
> > Bibliography or in the BibTeX inset that would give the location of the
> directory where all the files are stored.
> 
> Rainer brings up a good point about URLs and other supplementary files.
> 
> The context menu entry would be "see document", or if we want to generalize,
> "see supplementary file(s)". For example, we could have it where if "file" is 
> a
> directory, then "see supplementary file(s)" has a submenu that lists the
> contents of the directory. Then the file is just opened with xdg-open, or
> AutoOpen on Mac and Win. For example, you could put a .url file.
> 
> As for xdg-open, there used to be some issues [1] but it looks like on many
> distros they use an xdg-open patch for LyX [2]. Perhaps those issues are 
> solved
> now?
> 
> We still need to address potential security concerns, as Richard pointed
> out [3], but before getting into complicated discussions I like thinking
> about the ideal interface.
> 
> Any thoughts?

I would start with implementing lfun, which would just take the citation
and try to
1. if pdf file found, trigger pdf viewer with file path (doc dir as a base)
2. if url found, trigger browser with url
3. otherwise take author & title & year and trigger browser with url like
  
https://scholar.google.com/scholar?as_q=title_sauthors=author_ylo=year_yhi=year
  (this sounds cool:)

Then you could just add to context menu this lfun and it would work for single 
citations.
There could be even more advanced version of automatically filled submenu with
all papers in the case citation inset contains more citations. But I would first
start with the simple lfun, how far it gets.

I don't think that the security issue is really problem, you just need proper
launcher which has as first arg binary name for the executable and second arg 
for
params and not our homebrew startscript.
Since we know what the executable is (we go either html or pdf) this should
be quite straightforward.

Pavel


[PATCH] Cache Exportable Format Info

2016-10-19 Thread Richard Heck
As discussed recently, we seem to spend a lot of time figuring out what
formats are exportable. The first of the attached patches introduces
caching of this information, in a very simple way. The second and third
use this to clean up a few things elsewhere: We can just sort this list
the first time we build it now, and not have to keep sorting it later.
The last just introduces a typedef, to make things more intelligible.

Comments welcome. What testing I've done shows it works. It'd be nice to
know if it actually shows a difference in how much time we're spending
in this method.

Richard


>From a6eaf99011504bf4626a992dcad353537116cf17 Mon Sep 17 00:00:00 2001
From: Richard Heck 
Date: Wed, 19 Oct 2016 17:22:58 -0400
Subject: [PATCH 1/4] Simple cache for information on exportable formats, since
 we seem to access this information a lot.

---
 src/BufferParams.cpp | 30 --
 src/BufferParams.h   |  4 ++--
 2 files changed, 26 insertions(+), 8 deletions(-)

diff --git a/src/BufferParams.cpp b/src/BufferParams.cpp
index 85a8cbb..4290430 100644
--- a/src/BufferParams.cpp
+++ b/src/BufferParams.cpp
@@ -355,11 +355,17 @@ public:
 	VSpace defskip;
 	PDFOptions pdfoptions;
 	LayoutFileIndex baseClass_;
+	/// Caching for exportableFormats, which seems to be slow.
+	std::vector exportableFormatList;
+	std::vector viewableFormatList;
+	bool isViewCacheValid;
+	bool isExportCacheValid;
 };
 
 
 BufferParams::Impl::Impl()
-	: defskip(VSpace::MEDSKIP), baseClass_(string(""))
+	: defskip(VSpace::MEDSKIP), baseClass_(string("")),
+	  isViewCacheValid(false), isExportCacheValid(false)
 {
 	// set initial author
 	// FIXME UNICODE
@@ -2251,6 +2257,8 @@ void BufferParams::setDocumentClass(DocumentClassConstPtr tc)
 {
 	// evil, but this function is evil
 	doc_class_ = const_pointer_cast(tc);
+	pimpl_->isExportCacheValid = false;
+	pimpl_->isViewCacheValid = false;
 }
 
 
@@ -2309,6 +2317,8 @@ void BufferParams::makeDocumentClass(bool const clone)
 	if (!baseClass())
 		return;
 
+	pimpl_->isExportCacheValid = false;
+	pimpl_->isViewCacheValid = false;
 	LayoutModuleList mods;
 	LayoutModuleList::iterator it = layout_modules_.begin();
 	LayoutModuleList::iterator en = layout_modules_.end();
@@ -2395,8 +2405,15 @@ bool BufferParams::isExportable(string const & format) const
 }
 
 
-vector BufferParams::exportableFormats(bool only_viewable) const
+vector const & BufferParams::exportableFormats(bool only_viewable) const
 {
+	vector & cached = only_viewable ?
+			pimpl_->viewableFormatList : pimpl_->exportableFormatList;
+	bool & valid = only_viewable ? 
+			pimpl_->isViewCacheValid : pimpl_->isExportCacheValid;
+	if (valid)
+		return cached;
+
 	vector const backs = backends();
 	set excludes;
 	if (useNonTeXFonts) {
@@ -2411,15 +2428,16 @@ vector BufferParams::exportableFormats(bool only_viewable) const
 			theConverters().getReachable(*it, only_viewable, false, excludes);
 		result.insert(result.end(), r.begin(), r.end());
 	}
-	return result;
+	cached = result;
+	valid = true;
+	return cached;
 }
 
 
 bool BufferParams::isExportableFormat(string const & format) const
 {
 	typedef vector Formats;
-	Formats formats;
-	formats = exportableFormats(true);
+	Formats const & formats = exportableFormats(true);
 	Formats::const_iterator fit = formats.begin();
 	Formats::const_iterator end = formats.end();
 	for (; fit != end ; ++fit) {
@@ -2516,7 +2534,7 @@ string BufferParams::getDefaultOutputFormat() const
 		return default_output_format;
 	if (isDocBook()
 	|| encoding().package() == Encoding::japanese) {
-		vector const formats = exportableFormats(true);
+		vector const & formats = exportableFormats(true);
 		if (formats.empty())
 			return string();
 		// return the first we find
diff --git a/src/BufferParams.h b/src/BufferParams.h
index 4efbe57..b18a7be 100644
--- a/src/BufferParams.h
+++ b/src/BufferParams.h
@@ -180,7 +180,7 @@ public:
 	///
 	bool isExportable(std::string const & format) const;
 	///
-	std::vector exportableFormats(bool only_viewable) const;
+	std::vector const & exportableFormats(bool only_viewable) const;
 	///
 	bool isExportableFormat(std::string const & format) const;
 	/// the backends appropriate for use with this document.
@@ -553,7 +553,7 @@ private:
 	 *  mathdots, stackrel, stmaryrd and undertilde.
 	 */
 	PackageMap use_packages;
-
+	
 	/** Use the Pimpl idiom to hide those member variables that would otherwise
 	 *  drag in other header files.
 	 */
-- 
2.7.4

>From dbe0c1377c0bba3cd32279045537afab58fed765 Mon Sep 17 00:00:00 2001
From: Richard Heck 
Date: Wed, 19 Oct 2016 17:28:51 -0400
Subject: [PATCH 2/4] Since we're now caching this, we can sort it once, rather
 than lots of times.

---
 src/BufferParams.cpp  | 1 +
 src/frontends/qt4/GuiDocument.cpp | 4 ++--
 src/frontends/qt4/Menus.cpp   | 1 -
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/BufferParams.cpp b/src/BufferParams.cpp
index 

Re: [PATCH] Re: Return + Return in nested environments

2016-10-19 Thread Pavel Sanda
Enrico Forestieri wrote:
> On Wed, Oct 19, 2016 at 06:20:51PM +0200, Jean-Marc Lasgouttes wrote:
> > 
> > Thanks, it seems to work well. Here is the combo commit, for reference.
> 
> Jean-Marc, please, can you use some kind of encoding (base64,
> quoted-printable or whatever) when attaching patches that start
> with the word "From"?
> 
> This is because mutt takes them to be separate emails placed somewhere
> else in the list of emails and I have to search for them or edit the
> mailbox file to add a ">" just before "From" in order to actually see
> them as attachments.

Funny thing is that my mutt read the previous message without doing
what you describe...
Pavel


Re: LyXRC - %%s/scripts

2016-10-19 Thread Tommaso Cucinotta

On 19/10/2016 23:10, Scott Kostyshak wrote:
See 8b66f9ce. Perhaps the commit introduced a bug? 


might be. AFAICS, the attempt to replace $$s centrally in 
filetools.cpp:commandPrep() fails because the string getting there, is NOT the 
converter command as from the \converter line, but rather a dynamically 
generated temp Python script, e.g., dumping a few vars from that method:

: python -tt "/tmp/lyx_tmpdir.kJLFtRT15943/lyxconvertQ15943.py" "disegno.gp" 
"png"
pos1: 18446744073709551615

(and the pos of $$s is NOT found)

Contents of that script are dumped with "-dbg any", and it's a Python ~2-page 
script containing:

  if os.system(r'$$s/scripts/gnuplot2pdf.sh ' + '"' + infile + '"' + ' ' + '"' + 
outfile + '"' + '') != 0:

Do you know when / under what condition, such a Python intermediate script is 
created and how to prevent that?

T.



Re: [patch] Increase precision of TexRow in captions

2016-10-19 Thread Enrico Forestieri
On Wed, Oct 19, 2016 at 10:31:50PM +0200, Guillaume Munch wrote:
> 
> Test-wise, is there anything to adapt? Are there tests specific to the
> non-nice export?

I don't know, but I don't think so.

-- 
Enrico


Re: [PATCH] Re: Return + Return in nested environments

2016-10-19 Thread Enrico Forestieri
On Wed, Oct 19, 2016 at 04:12:54PM -0400, Scott Kostyshak wrote:
> On Wed, Oct 19, 2016 at 07:03:32PM +0200, Enrico Forestieri wrote:
> 
> > This is because mutt takes them to be separate emails placed somewhere
> > else in the list of emails and I have to search for them or edit the
> > mailbox file to add a ">" just before "From" in order to actually see
> > them as attachments.
> 
> I wonder why all MUA's don't automatically escape the "From".

I think they do, but only when it is in the email body, otherwise they
would change the attachment, which is no go. Here is how an email from
JMarc looks like:

==
...
JMarc

--83A8A64D719F76B5A07C9640
Content-Type: text/x-patch;
 name="0001-When-breaking-an-empty-paragraph-reduces-depth-set-l.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename*0="0001-When-breaking-an-empty-paragraph-reduces-depth-set-l.pa";
 filename*1="tch"

From 43658068801ad9772728973103414e81373e5a75 Mon Sep 17 00:00:00 2001
From: Jean-Marc Lasgouttes 
Date: Thu, 13 Oct 2016 20:33:57 +0200
Subject: [PATCH] When breaking an empty paragraph reduces depth, set layout
 too
...
==

As you can see, the line "From 4365..." is the start of the attachment,
but all lines starting with "From " are, by the default, the start of
a new email in the mailbox format.

Instead, here is an email from you:

==
...
Scott

--5mCyUwZo2JvN/JJP
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; 
filename="0001-autotools-remove-duplicate-check-for-NLS.patch"
Content-Transfer-Encoding: quoted-printable

=46rom 6bfb47eadad68faa8be86506d56e888735f2c7c5 Mon Sep 17 00:00:00 2001
=46rom: Scott Kostyshak 
Date: Fri, 20 Nov 2015 22:15:34 -0500
Subject: [PATCH] autotools: remove duplicate check for NLS
...
==

Here the "From " line is encoded as "=46rom " and then later decoded
when displayed on screen. In this case you used quoted-printable, but
also base64 would do. No problem in this case with the mailbox format.

> Note that I don't have to do any manual configuration for JMarc's
> patches to show up in mutt, but I think this is due to different
> settings for storing messages (e.g. $mbox_type).

I guess you use the maildir format.

> P.S. By the way, the following is an exciting project to follow:
> https://github.com/neomutt/neomutt

Interesting. When NeoLyX? ;-)

-- 
Enrico


Re: [patch] Increase precision of TexRow in captions

2016-10-19 Thread Kornel Benko
Am Mittwoch, 19. Oktober 2016 um 22:31:50, schrieb Guillaume Munch 

> Le 19/10/2016 à 01:23, Enrico Forestieri a écrit :
> >
> > As always. But I don't understand. Given your goal, this is something
> > only useful for the non-nice export. So, why introducing a gratuitous
> > change? Note that readability is subjective. I find that this change
> > would reduce readability.
> >
> 
> You are right, I do not see a strong enough case, and it is better not
> to change things gratuitously.
> 
> Test-wise, is there anything to adapt? Are there tests specific to the
> non-nice export?

Not that I am aware of. There are tex2lyx tests, but this is in the other 
direction.

Kornel


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


Re: LyXRC - %%s/scripts

2016-10-19 Thread Scott Kostyshak
On Wed, Oct 19, 2016 at 10:57:05PM +0200, Tommaso Cucinotta wrote:
> Hi,
> 
> LyXRC specifies "%%s/scripts/" as converter command, but how/where is the 
> %%s/ expanded/processed, when running those commands?

See 8b66f9ce. Perhaps the commit introduced a bug?

Scott


signature.asc
Description: PGP signature


Redundant Methods?

2016-10-19 Thread Richard Heck
In BufferParams, we have both an isExportable method and an
isExportableFormat method. Is there actually any functional difference
between these? The latter may be slightly different, in that it passes
the only_viewable flag to exportableFormats. But that could be handled
quite differently, by just returning false if the format isn't viewable.

Richard

PS "git blame" will show these as mine, but I just moved them to
BufferParams from Buffer.



LyXRC - %%s/scripts

2016-10-19 Thread Tommaso Cucinotta

Hi,

LyXRC specifies "%%s/scripts/" as converter command, but how/where is the 
%%s/ expanded/processed, when running those commands?

Trying to add this in ~/.lyx/lyxrc.defaults

+\converter gnuplot  pdf6  "$$s/scripts/gnuplot2pdf.sh $$i $$o"
""''' ])

but it gives me this error when trying to convert an included .gp file

  sh: 1: 5995s/scripts/gnuplot2pdf.sh: not found

while it works OK if I use an abs path there. The syntax seems to me identical 
to other converter lines, any clue?


Thanks,

T.




Re: [patch] Increase precision of TexRow in captions

2016-10-19 Thread Guillaume Munch

Le 19/10/2016 à 01:23, Enrico Forestieri a écrit :


As always. But I don't understand. Given your goal, this is something
only useful for the non-nice export. So, why introducing a gratuitous
change? Note that readability is subjective. I find that this change
would reduce readability.



You are right, I do not see a strong enough case, and it is better not
to change things gratuitously.

Test-wise, is there anything to adapt? Are there tests specific to the
non-nice export?



Re: [PATCH] Re: Return + Return in nested environments

2016-10-19 Thread Scott Kostyshak
On Wed, Oct 19, 2016 at 07:03:32PM +0200, Enrico Forestieri wrote:

> This is because mutt takes them to be separate emails placed somewhere
> else in the list of emails and I have to search for them or edit the
> mailbox file to add a ">" just before "From" in order to actually see
> them as attachments.

I wonder why all MUA's don't automatically escape the "From".

Although the attachments show up by default for me, a convenient tool to
use is "ripmime". I have mutt configured so that if I press [a, the
attachments are all extracted to a temporary folder and then that folder
is opened in nautilus. Let me know if you would like to see the small
script that does that. Ah (after thinking for a minute), that would not
work for you because when you view JMarc's message the attachment is not
even in that message, so ripmime won't even be able to extract it.
Nevermind then.

Note that I don't have to do any manual configuration for JMarc's
patches to show up in mutt, but I think this is due to different
settings for storing messages (e.g. $mbox_type).

Scott

P.S. By the way, the following is an exciting project to follow:
https://github.com/neomutt/neomutt


signature.asc
Description: PGP signature


Re: [PATCH] Re: Return + Return in nested environments

2016-10-19 Thread Richard Heck
On 10/19/2016 12:20 PM, Jean-Marc Lasgouttes wrote:
> Le 19/10/2016 à 18:12, Enrico Forestieri a écrit :
>> I had a look and it turns out that the code dealing with separator
>> insets was specifically tailored to the old behaviour. If you change
>> that behaviour, you should also change the corresponding separator code.
>> This is what the attached patch does. It must be applied if your patch
>> is applied, otherwise not.
>>
>> Anyway, the previous behaviour was really strange and indeed also
>> the code to be changed for introducing a separator simplifies, as
>> you can see.
>
> Thanks, it seems to work well. Here is the combo commit, for
> reference. I propose to commit it to master and maybe branch
> (Richard?), so that we can evaluate whether we like it.

Yes, good for both. It will get much more testing in stable, and we are
presumably some ways from 2.2.3.

rh



Re: [LyX/master] Set window title according to platform UI

2016-10-19 Thread Richard Heck
On 10/19/2016 01:29 PM, Jean-Marc Lasgouttes wrote:
> 2.2.3. It was fresh from Monday, I think.

OK, great.

rh



>
> JMarc
>
> Le 19 octobre 2016 18:58:22 GMT+02:00, Richard Heck  a écrit :
 Richard, since I backported the window title feature to branch, I will
>>> backport this too.
>> OK. Was that done for 2.2.2? or just for 2.2.3?
>



Re: [LyX/master] Set window title according to platform UI

2016-10-19 Thread Jean-Marc Lasgouttes
2.2.3. It was fresh from Monday, I think.

JMarc

Le 19 octobre 2016 18:58:22 GMT+02:00, Richard Heck  a écrit :
>>> Richard, since I backported the window title feature to branch, I will
>> backport this too.
>
>OK. Was that done for 2.2.2? or just for 2.2.3?




Re: [PATCH] Re: Return + Return in nested environments

2016-10-19 Thread Enrico Forestieri
On Wed, Oct 19, 2016 at 06:20:51PM +0200, Jean-Marc Lasgouttes wrote:
> 
> Thanks, it seems to work well. Here is the combo commit, for reference.

Jean-Marc, please, can you use some kind of encoding (base64,
quoted-printable or whatever) when attaching patches that start
with the word "From"?

This is because mutt takes them to be separate emails placed somewhere
else in the list of emails and I have to search for them or edit the
mailbox file to add a ">" just before "From" in order to actually see
them as attachments.

Don't worry if this is not possible, but I see that Scott does it and
I have no problems with his attachments.

-- 
Enrico


Re: [LyX/master] Set window title according to platform UI

2016-10-19 Thread Richard Heck
On 10/19/2016 11:26 AM, Jean-Marc Lasgouttes wrote:
> Le 19/10/2016 à 17:06, Scott Kostyshak a écrit :
>> On Wed, Oct 19, 2016 at 01:48:13PM +0200, Kornel Benko wrote:
>>> Am Mittwoch, 19. Oktober 2016 um 12:03:01, schrieb Jean-Marc
>>> Lasgouttes 
>>
 It should be fixed now, and hopefully updateTabText should appear less
 heavily in Guillaume's callgrind logs.

 JMarc
>>>
>>> Confirmed.
>>
>> +1
>>
>> Thanks for the quick fix.
>
> Richard, since I backported the window title feature to branch, I will
> backport this too.

OK. Was that done for 2.2.2? or just for 2.2.3?

Richard



Re: [PATCH] Re: Return + Return in nested environments

2016-10-19 Thread Jean-Marc Lasgouttes

Le 19/10/2016 à 18:12, Enrico Forestieri a écrit :

I had a look and it turns out that the code dealing with separator
insets was specifically tailored to the old behaviour. If you change
that behaviour, you should also change the corresponding separator code.
This is what the attached patch does. It must be applied if your patch
is applied, otherwise not.

Anyway, the previous behaviour was really strange and indeed also
the code to be changed for introducing a separator simplifies, as
you can see.


Thanks, it seems to work well. Here is the combo commit, for reference. 
I propose to commit it to master and maybe branch (Richard?), so that we 
can evaluate whether we like it.


JMarc

>From 72f680d1d03acc52f57dd4873a676484a1927c49 Mon Sep 17 00:00:00 2001
From: Jean-Marc Lasgouttes 
Date: Thu, 13 Oct 2016 20:33:57 +0200
Subject: [PATCH] When breaking an empty paragraph reduces depth, set layout
 too

This requires an adaptation of the Separator inset insertion code,
which has been duly provided by Enrico.
---
 src/Text.cpp  |8 ++--
 src/Text3.cpp |8 +---
 2 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/src/Text.cpp b/src/Text.cpp
index 007271d..16bf899 100644
--- a/src/Text.cpp
+++ b/src/Text.cpp
@@ -738,9 +738,13 @@ void Text::breakParagraph(Cursor & cur, bool inverse_logic)
 	Layout const & layout = cpar.layout();
 
 	if (cur.lastpos() == 0 && !cpar.allowEmpty()) {
-		if (changeDepthAllowed(cur, DEC_DEPTH))
+		if (changeDepthAllowed(cur, DEC_DEPTH)) {
 			changeDepth(cur, DEC_DEPTH);
-		else {
+			pit_type const prev = depthHook(cpit, cpar.getDepth());
+			docstring const & lay = pars_[prev].layout().name();
+			if (lay != layout.name())
+setLayout(cur, lay);
+		} else {
 			docstring const & lay = cur.paragraph().usePlainLayout()
 			? tclass.plainLayoutName() : tclass.defaultLayoutName();
 			if (lay != layout.name())
diff --git a/src/Text3.cpp b/src/Text3.cpp
index eafce28..85d0c3c 100644
--- a/src/Text3.cpp
+++ b/src/Text3.cpp
@@ -1089,13 +1089,7 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
 		Paragraph const & par = pars_[pit];
 		bool lastpar = (pit == pit_type(pars_.size() - 1));
 		Paragraph const & nextpar = lastpar ? par : pars_[pit + 1];
-		pit_type prev = pit;
-		if (pit > 0) {
-			if (!pars_[pit - 1].layout().isEnvironment())
-prev = depthHook(pit, par.getDepth());
-			else if (pars_[pit - 1].getDepth() >= par.getDepth())
-prev = pit - 1;
-		}
+		pit_type prev = pit > 0 ? depthHook(pit, par.getDepth()) : pit;
 		if (prev < pit && cur.pos() == par.beginOfBody()
 		&& !par.size() && !par.isEnvSeparator(cur.pos())
 		&& !par.layout().isCommand()
-- 
1.7.9.5



Re: [PATCH] Re: Return + Return in nested environments

2016-10-19 Thread Enrico Forestieri
On Wed, Oct 19, 2016 at 02:53:43PM +0200, Jean-Marc Lasgouttes wrote:
> Le 19/10/2016 à 14:30, Jean-Marc Lasgouttes a écrit :
> >>Tested and I think there is a minor issue. In the attached .lyx file,
> >>put the cursor at the end of "hello". Press return three times. The
> >>first two times show that the issue initially reported is fixed (because
> >>it is itemize instead of enumerate), but the third return is unexpected
> >>for me. I expected it to go out of itemize, but instead it created an
> >>item with a separator.
> >>
> >>Can you reproduce the above with your patch?
> >
> >I see what you mean. I guess that I am colliding somehow with the logic
> >that introduces separator insets.
> 
> There is some kind of Clash beween the logic here and Enrico's logic wrt
> paragraph separators.
> 
> Here I am in a logic where using Return in an empty environment will signal
> that I want to close it and go to the uspper level.
> 
> Enrico's code, OTOH assumes that what is meant here is to split the
> environment in two but stay at the same level. I do not see why my patch
> made Enrico's code trigger. Well, I see it technically, but I do not see
> what sense it makes.
> 
> Enrico, do you have thoughts about what we really want there? What is the
> use case that we have in mind, especially when we are in a nested
> environment?

I had a look and it turns out that the code dealing with separator
insets was specifically tailored to the old behaviour. If you change
that behaviour, you should also change the corresponding separator code.
This is what the attached patch does. It must be applied if your patch
is applied, otherwise not.

Anyway, the previous behaviour was really strange and indeed also
the code to be changed for introducing a separator simplifies, as
you can see.

-- 
Enrico
diff --git a/src/Text3.cpp b/src/Text3.cpp
index eafce28..85d0c3c 100644
--- a/src/Text3.cpp
+++ b/src/Text3.cpp
@@ -1089,13 +1089,7 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
Paragraph const & par = pars_[pit];
bool lastpar = (pit == pit_type(pars_.size() - 1));
Paragraph const & nextpar = lastpar ? par : pars_[pit + 1];
-   pit_type prev = pit;
-   if (pit > 0) {
-   if (!pars_[pit - 1].layout().isEnvironment())
-   prev = depthHook(pit, par.getDepth());
-   else if (pars_[pit - 1].getDepth() >= par.getDepth())
-   prev = pit - 1;
-   }
+   pit_type prev = pit > 0 ? depthHook(pit, par.getDepth()) : pit;
if (prev < pit && cur.pos() == par.beginOfBody()
&& !par.size() && !par.isEnvSeparator(cur.pos())
&& !par.layout().isCommand()


Re: [LyX/master] Set window title according to platform UI

2016-10-19 Thread Jean-Marc Lasgouttes

Le 19/10/2016 à 17:06, Scott Kostyshak a écrit :

On Wed, Oct 19, 2016 at 01:48:13PM +0200, Kornel Benko wrote:

Am Mittwoch, 19. Oktober 2016 um 12:03:01, schrieb Jean-Marc Lasgouttes 




It should be fixed now, and hopefully updateTabText should appear less
heavily in Guillaume's callgrind logs.

JMarc


Confirmed.


+1

Thanks for the quick fix.


Richard, since I backported the window title feature to branch, I will 
backport this too.


JMarc



Re: [LyX/master] Set window title according to platform UI

2016-10-19 Thread Scott Kostyshak
On Wed, Oct 19, 2016 at 01:48:13PM +0200, Kornel Benko wrote:
> Am Mittwoch, 19. Oktober 2016 um 12:03:01, schrieb Jean-Marc Lasgouttes 
> 

> > It should be fixed now, and hopefully updateTabText should appear less 
> > heavily in Guillaume's callgrind logs.
> > 
> > JMarc
> 
> Confirmed.

+1

Thanks for the quick fix.

Scott


signature.asc
Description: PGP signature


Re: [LyX/master] Take into account font changes when striking out display math formulas

2016-10-19 Thread Enrico Forestieri
On Wed, Oct 19, 2016 at 03:39:53PM +0200, Jean-Marc Lasgouttes wrote:
> Le 19/10/2016 à 15:09, Enrico Forestieri a écrit :
> >Just checked and discovered that my building script has a --disable-warnigs
> >set as an unmodifiable read-only variable ;-)
> 
> No warnings, no trouble :)

;-)

> Why do you disable them, BTW? The build is quite clean these days (some
> warnings are disabled by hand in autoconf).

This is historical. Many years ago the sources were triggering many
unavoidable warnings on cygwin, where also concept checks could not
be used. So, I started to disable warnings in the build script without
any ill effects, and even forgot that I was doing that...

Almost same story on solaris, where I was initially using
--no-this-warning type of switches (for strange kind of exotic cases
that I now not even remember about but that were also unavoidable).
Then, some other warning of this kind was popping out and the list
of --no-this-warning switches was growing so much that I now use
--disable-warnings there, too.

When you are flooded with useless and unavoidable warnings, you start
not paying attention to them and thus can also miss important ones.
This defeats the purpose of having them enabled.

> I do not know whether we can manage to create this handful of math hull
> properties that cover most switch()es we may have, but it would give better
> semantics to our code. Rather than « I spend 20 minutes looking at all
> cases, this is the list in this case ».

Yes, I understand. However, this is also something that can be done
(or even is best done) later, when everything settles down. For example,
this kind of classification is most probably not going to be necessary.

> The best virtue of these lengthy switches is to entice to think about ways
> to avoid them...

Maybe.

-- 
Enrico


Re: [PATCH] Re: Return + Return in nested environments

2016-10-19 Thread Enrico Forestieri
On Wed, Oct 19, 2016 at 02:53:43PM +0200, Jean-Marc Lasgouttes wrote:
> 
> Enrico, do you have thoughts about what we really want there? What is the
> use case that we have in mind, especially when we are in a nested
> environment?

It does not seem to be something about nested environments. For example,
if you put the cursor after the "two" in the attached example and press 3
times return, everything works with or without your patch.
Moreover, the separator thing should trigger only when one is in a
standard environment when pressing return. I'll have a look.

-- 
Enrico
#LyX 2.2 created this file. For more info see http://www.lyx.org/
\lyxformat 508
\begin_document
\begin_header
\save_transient_properties true
\origin unavailable
\textclass article
\use_default_options true
\maintain_unincluded_children false
\language english
\language_package default
\inputencoding auto
\fontencoding global
\font_roman "default" "default"
\font_sans "default" "default"
\font_typewriter "default" "default"
\font_math "auto" "auto"
\font_default_family default
\use_non_tex_fonts false
\font_sc false
\font_osf false
\font_sf_scale 100 100
\font_tt_scale 100 100
\graphics default
\default_output_format default
\output_sync 0
\bibtex_command default
\index_command default
\paperfontsize default
\use_hyperref false
\papersize default
\use_geometry false
\use_package amsmath 1
\use_package amssymb 1
\use_package cancel 1
\use_package esint 1
\use_package mathdots 1
\use_package mathtools 1
\use_package mhchem 1
\use_package stackrel 1
\use_package stmaryrd 1
\use_package undertilde 1
\cite_engine basic
\cite_engine_type default
\biblio_style plain
\use_bibtopic false
\use_indices false
\paperorientation portrait
\suppress_date false
\justification true
\use_refstyle 1
\index Index
\shortcut idx
\color #008000
\end_index
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\paragraph_indentation default
\quotes_language english
\papercolumns 1
\papersides 1
\paperpagestyle default
\tracking_changes false
\output_changes false
\html_math_output 0
\html_css_as_file 0
\html_be_strict false
\end_header

\begin_body

\begin_layout Itemize
one
\end_layout

\begin_deeper
\begin_layout Enumerate
hello
\end_layout

\begin_deeper
\begin_layout Enumerate
two
\end_layout

\end_deeper
\end_deeper
\end_body
\end_document


Re: [LyX/master] Take into account font changes when striking out display math formulas

2016-10-19 Thread Jean-Marc Lasgouttes

Le 19/10/2016 à 15:09, Enrico Forestieri a écrit :

Just checked and discovered that my building script has a --disable-warnigs
set as an unmodifiable read-only variable ;-)


No warnings, no trouble :)

Why do you disable them, BTW? The build is quite clean these days (some 
warnings are disabled by hand in autoconf).



Look, I was being deliberately provocatory but did not want to start
a flame war about that. Anyway, the strategy above will fail when
--disable-warnings is used.


I understand, and I am not trying a flame ware either. Actually, I do 
not really know what is the right way to handle all these hull types.



For example, for what reason is the list here different from the list in
InsetMathHull::display()?


Because that list contains environments that are themselves nested in
outer environments and are redundant for the check in question.
This check is about whether the outer environment will be in display
mode. For example, "alignedat" can also be used in inline mode.

However, this last observation makes me aware that maybe I shouldn't
distinguish between display and inline modes, as math constructs for
which ulem fails can also appear in inline mode. So, either all math
insets are treated the same way, or inline ones should be inspected
to check for dangerous enviroments. Either way, this discussion is
going to be moot, as all cases have to be considered and I will
have to spend some more time on this :(


I do not know whether we can manage to create this handful of math hull 
properties that cover most switch()es we may have, but it would give 
better semantics to our code. Rather than « I spend 20 minutes looking 
at all cases, this is the list in this case ».


The best virtue of these lengthy switches is to entice to think about 
ways to avoid them...


JMarc



Re: LinuxDay @ Pisa - Oct 22nd

2016-10-19 Thread Tommaso Cucinotta

On 19/10/2016 12:39, CarLaTeX wrote:


Visto che è in italiano io metterei "ebraico" al posto di "Ebreo" e penso anche "arabo" 
al posto di "Arabico".
Ciao.
Carla



my poor (mother-tongue) language abilities :-P... thanks a million!
AFAIK, the event will be kind of a mix of IT/EN presentations...

T.



Re: ctests: 4 failing "Unicode-characters" tests

2016-10-19 Thread Jean-Pierre Chrétien

Le 18/10/2016 à 19:17, Guenter Milde a écrit :

On 2016-10-18, jeanpierre.chret...@free.fr wrote:





OK, I did it, and the failing tests (due to the userdir problem) now
pass. But I still have failing tests, this time because of missing
textalpha.sty package in my TeXLive distribution. This is a bit
surprising, as textalpha was put in CTAN early this year, and my
TeXLive 2016 was installed last June.


textalpha.sty is on CTAN since 2013 as part of "greek-fontenc".


Internet is back, so I will add "collection-langgreek" to my TexLive 
installation and I will update TeXMive as well.



You can also just ignore the test with "greek" and "greek-extended" Unicode
characters. This is what I do with Chinese and Japanese tests...

Alternatively, you can fix http://www.lyx.org/trac/ticket/9637
and remove \usepackage{textalpha} from the user-preamble of the "Greek" tests.


I may take a look when I'm finished with the math options stuff.

--
Jean-Pierre





Re: [LyX/master] Take into account font changes when striking out display math formulas

2016-10-19 Thread Enrico Forestieri
On Wed, Oct 19, 2016 at 02:38:24PM +0200, Jean-Marc Lasgouttes wrote:
> 
> I do get warnings with default compiler switches (which include -Wall here).

Just checked and discovered that my building script has a --disable-warnigs
set as an unmodifiable read-only variable ;-)

> I guess it is a fight between source fundamentalists and warning
> fundamentalists, then.

I guess you are right.

> The issue is not only about fundamentalism, it is also about what happens
> when one introduces a new hullType. How do you find out what should be
> changed and where?

Look, I was being deliberately provocatory but did not want to start
a flame war about that. Anyway, the strategy above will fail when
--disable-warnings is used.

> I agree though that the list is becoming lengthy. If it happens that we are
> often special-casing a special group oh hull types, then it is probably a
> good idea to create a new athod to give a name to this particular group of
> hulls.

That would be a good idea, but see below.

> For example, for what reason is the list here different from the list in
> InsetMathHull::display()?

Because that list contains environments that are themselves nested in
outer environments and are redundant for the check in question.
This check is about whether the outer environment will be in display
mode. For example, "alignedat" can also be used in inline mode.

However, this last observation makes me aware that maybe I shouldn't
distinguish between display and inline modes, as math constructs for
which ulem fails can also appear in inline mode. So, either all math
insets are treated the same way, or inline ones should be inspected
to check for dangerous enviroments. Either way, this discussion is
going to be moot, as all cases have to be considered and I will
have to spend some more time on this :(

-- 
Enrico


Re: [PATCH] Re: Return + Return in nested environments

2016-10-19 Thread Jean-Marc Lasgouttes

Le 19/10/2016 à 14:30, Jean-Marc Lasgouttes a écrit :

Tested and I think there is a minor issue. In the attached .lyx file,
put the cursor at the end of "hello". Press return three times. The
first two times show that the issue initially reported is fixed (because
it is itemize instead of enumerate), but the third return is unexpected
for me. I expected it to go out of itemize, but instead it created an
item with a separator.

Can you reproduce the above with your patch?


I see what you mean. I guess that I am colliding somehow with the logic
that introduces separator insets.


There is some kind of Clash beween the logic here and Enrico's logic wrt 
paragraph separators.


Here I am in a logic where using Return in an empty environment will 
signal that I want to close it and go to the uspper level.


Enrico's code, OTOH assumes that what is meant here is to split the 
environment in two but stay at the same level. I do not see why my patch 
made Enrico's code trigger. Well, I see it technically, but I do not see 
what sense it makes.


Enrico, do you have thoughts about what we really want there? What is 
the use case that we have in mind, especially when we are in a nested 
environment?


JMarc



Re: [LyX/master] Take into account font changes when striking out display math formulas

2016-10-19 Thread Jean-Marc Lasgouttes

Le 19/10/2016 à 14:29, Enrico Forestieri a écrit :

../../master/src/Paragraph.cpp: In member function ‘void
lyx::Paragraph::latex(const lyx::BufferParams&, const lyx::Font&,
lyx::otexstream&, const lyx::OutputParams&, int, int, bool) const’:
../../master/src/Paragraph.cpp:2409:13: attention : enumeration value
‘hullNone’ not handled in switch [-Wswitch]
../../master/src/Paragraph.cpp:2409:13: attention : enumeration value
‘hullSimple’ not handled in switch [-Wswitch]
../../master/src/Paragraph.cpp:2409:13: attention : enumeration value
‘hullAlignAt’ not handled in switch [-Wswitch]
../../master/src/Paragraph.cpp:2409:13: attention : enumeration value
‘hullXAlignAt’ not handled in switch [-Wswitch]
../../master/src/Paragraph.cpp:2409:13: attention : enumeration value
‘hullXXAlignAt’ not handled in switch [-Wswitch]
../../master/src/Paragraph.cpp:2409:13: attention : enumeration value
‘hullRegexp’ not handled in switch [-Wswitch]
../../master/src/Paragraph.cpp:2409:13: attention : enumeration value
‘hullUnknown’ not handled in switch [-Wswitch]


I thought about that and deliberately omitted the cases for which
nothing has to be done, because with default compiler switches I get
no warnings. Adding them would simply make the source less readable,
IMO. A "default:" case would silence the compiler, but does this
also silence fundamentalists? ;-)


I do get warnings with default compiler switches (which include -Wall here).

I guess it is a fight between source fundamentalists and warning 
fundamentalists, then.


The issue is not only about fundamentalism, it is also about what 
happens when one introduces a new hullType. How do you find out what 
should be changed and where?


I agree though that the list is becoming lengthy. If it happens that we 
are often special-casing a special group oh hull types, then it is 
probably a good idea to create a new athod to give a name to this 
particular group of hulls.


For example, for what reason is the list here different from the list in 
InsetMathHull::display()?


JMarc



Re: [PATCH] Re: Return + Return in nested environments

2016-10-19 Thread Jean-Marc Lasgouttes

Le 14/10/2016 à 17:16, Scott Kostyshak a écrit :

On Fri, Oct 14, 2016 at 03:22:09PM +0200, Jean-Marc Lasgouttes wrote:

Le 07/10/2016 à 03:48, Scott Kostyshak a écrit :

I don't know much about layout nesting, but my first reaction is that I
agree with you regarding the expected behavior.


Did we figure out what the correct behavior for this is?


Please try that and tell me whether it works for you.


Tested and I think there is a minor issue. In the attached .lyx file,
put the cursor at the end of "hello". Press return three times. The
first two times show that the issue initially reported is fixed (because
it is itemize instead of ennumerate), but the third return is unexpected
for me. I expected it to go out of itemize, but instead it created an
item with a separator.

Can you reproduce the above with your patch?


I see what you mean. I guess that I am colliding somehow with the logic 
that introduces separator insets.


JMarc



Re: [LyX/master] Take into account font changes when striking out display math formulas

2016-10-19 Thread Enrico Forestieri
On Wed, Oct 19, 2016 at 12:18:08PM +0200, Jean-Marc Lasgouttes wrote:
> Le 18/10/2016 à 03:49, Enrico Forestieri a écrit :
> >commit 129459a71b52babb1a8e5a1e3de986976c93bde6
> >Author: Enrico Forestieri 
> >Date:   Tue Oct 18 03:29:53 2016 +0200
> >
> >Take into account font changes when striking out display math formulas
> >
> >Font changes are brought inside the \lyxdeleted macro, just before
> >outputting the latex code for the math inset. The inset writes a
> >signature before itself and this is checked by \lyxsout for recognizing
> >a display math. So, the font changes confuse \lyxsout, which also
> >swallows the first macro at the very start of \lyxdeleted. The result
> >is that the font changing command is not seen by latex and \sout is also
> >used to further strike out the formula already striked out by tikz.
> >This commit makes sure that the expected signature actually appears
> >just after the opening brace of \lyxdeleted. It also accounts for a
> >paragraph break occurring just before the math inset, in order to not
> >introduce too much vertical space, which is noticeable when using
> >larger font sizes.
> 
> 
> This commit gives me new warnings:
> 
> ../../master/src/Paragraph.cpp: In member function ‘void
> lyx::Paragraph::latex(const lyx::BufferParams&, const lyx::Font&,
> lyx::otexstream&, const lyx::OutputParams&, int, int, bool) const’:
> ../../master/src/Paragraph.cpp:2409:13: attention : enumeration value
> ‘hullNone’ not handled in switch [-Wswitch]
> ../../master/src/Paragraph.cpp:2409:13: attention : enumeration value
> ‘hullSimple’ not handled in switch [-Wswitch]
> ../../master/src/Paragraph.cpp:2409:13: attention : enumeration value
> ‘hullAlignAt’ not handled in switch [-Wswitch]
> ../../master/src/Paragraph.cpp:2409:13: attention : enumeration value
> ‘hullXAlignAt’ not handled in switch [-Wswitch]
> ../../master/src/Paragraph.cpp:2409:13: attention : enumeration value
> ‘hullXXAlignAt’ not handled in switch [-Wswitch]
> ../../master/src/Paragraph.cpp:2409:13: attention : enumeration value
> ‘hullRegexp’ not handled in switch [-Wswitch]
> ../../master/src/Paragraph.cpp:2409:13: attention : enumeration value
> ‘hullUnknown’ not handled in switch [-Wswitch]

I thought about that and deliberately omitted the cases for which
nothing has to be done, because with default compiler switches I get
no warnings. Adding them would simply make the source less readable,
IMO. A "default:" case would silence the compiler, but does this
also silence fundamentalists? ;-)

-- 
Enrico


Re: [LyX/master] Do some caching of window title and related UI

2016-10-19 Thread Jean-Marc Lasgouttes

Le 19/10/2016 à 14:04, Jürgen Spitzmüller a écrit :

I suppose the latter 4 lines are not supposed to be indented.

GCC 6.2 issues a warning about this.


Definitely, thanks.

JMarc


Re: [LyX/master] Do some caching of window title and related UI

2016-10-19 Thread Jürgen Spitzmüller
2016-10-19 12:00 GMT+02:00 Jean-Marc Lasgouttes :

> -string LyXVC::vcname() const
> +docstring LyXVC::vcstatus() const
>  {
> -   return vcs->vcname();
> +   if (!vcs)
> +   return docstring();
> +   if (locking())
> +   return bformat(_("%1$s lock"),
> from_ascii(vcs->vcname()));
> +   else
> +   return from_ascii(vcs->vcname());
>  }
>

I suppose the latter 4 lines are not supposed to be indented.

GCC 6.2 issues a warning about this.

Jürgen


Re: [LyX/master] Set window title according to platform UI

2016-10-19 Thread Kornel Benko
Am Mittwoch, 19. Oktober 2016 um 12:03:01, schrieb Jean-Marc Lasgouttes 

> Le 19/10/2016 à 03:32, Scott Kostyshak a écrit :
> > I get a SIGSEGV starting from this commit from the following
> > reproducible steps:
> >
> > 1. open lib/examples/fr/beamer-article.lyx
> > 2. right-click on the include inset and go to "edit included
> > file"
> > 3. press ctrl+w to close the child doc.
> >
> > Backtrace is attached.
> 
> It should be fixed now, and hopefully updateTabText should appear less 
> heavily in Guillaume's callgrind logs.
> 
> JMarc

Confirmed.

Kornel

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


Re: LinuxDay @ Pisa - Oct 22nd

2016-10-19 Thread CarLaTeX
Visto che è in italiano io metterei "ebraico" al posto di "Ebreo" e penso
anche "arabo" al posto di "Arabico".
Ciao.
Carla

Il 19 Ott 2016 12:30 PM, "Tommaso Cucinotta"  ha scritto:

FYI, that's the few slides I prepared for Saturday

  http://retis.sssup.it/~tommaso/LinuxDay-2016.pdf

in case you have some feedback. These are to be inter-mixed
with a live demo, overall 15 mins, so it's just a few notes about
things not to forget.

You might be curious about the devel stats slide.

I'll let you know what feedback I get...

Thx,

T.


Re: LinuxDay @ Pisa - Oct 22nd

2016-10-19 Thread Tommaso Cucinotta

FYI, that's the few slides I prepared for Saturday

  http://retis.sssup.it/~tommaso/LinuxDay-2016.pdf

in case you have some feedback. These are to be inter-mixed
with a live demo, overall 15 mins, so it's just a few notes about
things not to forget.

You might be curious about the devel stats slide.

I'll let you know what feedback I get...

Thx,

T.



Re: [LyX/master] Take into account font changes when striking out display math formulas

2016-10-19 Thread Jean-Marc Lasgouttes

Le 18/10/2016 à 03:49, Enrico Forestieri a écrit :

commit 129459a71b52babb1a8e5a1e3de986976c93bde6
Author: Enrico Forestieri 
Date:   Tue Oct 18 03:29:53 2016 +0200

Take into account font changes when striking out display math formulas

Font changes are brought inside the \lyxdeleted macro, just before
outputting the latex code for the math inset. The inset writes a
signature before itself and this is checked by \lyxsout for recognizing
a display math. So, the font changes confuse \lyxsout, which also
swallows the first macro at the very start of \lyxdeleted. The result
is that the font changing command is not seen by latex and \sout is also
used to further strike out the formula already striked out by tikz.
This commit makes sure that the expected signature actually appears
just after the opening brace of \lyxdeleted. It also accounts for a
paragraph break occurring just before the math inset, in order to not
introduce too much vertical space, which is noticeable when using
larger font sizes.



This commit gives me new warnings:

../../master/src/Paragraph.cpp: In member function ‘void 
lyx::Paragraph::latex(const lyx::BufferParams&, const lyx::Font&, 
lyx::otexstream&, const lyx::OutputParams&, int, int, bool) const’:
../../master/src/Paragraph.cpp:2409:13: attention : enumeration value 
‘hullNone’ not handled in switch [-Wswitch]
../../master/src/Paragraph.cpp:2409:13: attention : enumeration value 
‘hullSimple’ not handled in switch [-Wswitch]
../../master/src/Paragraph.cpp:2409:13: attention : enumeration value 
‘hullAlignAt’ not handled in switch [-Wswitch]
../../master/src/Paragraph.cpp:2409:13: attention : enumeration value 
‘hullXAlignAt’ not handled in switch [-Wswitch]
../../master/src/Paragraph.cpp:2409:13: attention : enumeration value 
‘hullXXAlignAt’ not handled in switch [-Wswitch]
../../master/src/Paragraph.cpp:2409:13: attention : enumeration value 
‘hullRegexp’ not handled in switch [-Wswitch]
../../master/src/Paragraph.cpp:2409:13: attention : enumeration value 
‘hullUnknown’ not handled in switch [-Wswitch]


JMarc




Re: [LyX/master] Set window title according to platform UI

2016-10-19 Thread Jean-Marc Lasgouttes

Le 19/10/2016 à 03:32, Scott Kostyshak a écrit :

I get a SIGSEGV starting from this commit from the following
reproducible steps:

1. open lib/examples/fr/beamer-article.lyx
2. right-click on the include inset and go to "edit included
file"
3. press ctrl+w to close the child doc.

Backtrace is attached.


It should be fixed now, and hopefully updateTabText should appear less 
heavily in Guillaume's callgrind logs.


JMarc



Re: [LyX/master] Set window title according to platform UI

2016-10-19 Thread Kornel Benko
Am Dienstag, 18. Oktober 2016 um 21:32:06, schrieb Scott Kostyshak 

> On Thu, Sep 08, 2016 at 03:59:50PM +0200, Jean-Marc Lasgouttes wrote:
> > commit 82808fea04315fd323ec074e8ad7865d190987d4
> > Author: Jean-Marc Lasgouttes 
> > Date:   Tue Sep 6 11:17:10 2016 +0200
> > 
> > Set window title according to platform UI
> > 
> > The window title is built from the current file name and its
> > mofidication state. We use our own code instead of the automatic title
> > bar provided when windowFileName() is set because
> > 
> > 1/ Qt does not keep the full path name
> > 2/ Qt does not yield a nice application name
> > 
> > The "read only" and "version control" status are shown in the status 
> > bar:
> > 
> > * for read only we use the tab read only emblem (with the right size)
> > * for version control, we show the name of the backend (using a new
> >   vcname() method of the backend).
> > 
> > The iconText() of the view is not updated anymore, since this is
> > deprecated in Qt5.
> 
> I get a SIGSEGV starting from this commit from the following
> reproducible steps:
> 
> 1. open lib/examples/fr/beamer-article.lyx
> 2. right-click on the include inset and go to "edit included
> file"
> 3. press ctrl+w to close the child doc.
> 
> Backtrace is attached.
> 
> Can you reproduce?

Same here.

> Scott

Kornel

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