[LyX features/features/indexmacros] Merge branch 'master' into features/indexmacros

Juergen Spitzmueller spitz at lyx.org
Wed Apr 20 06:17:34 UTC 2022


The branch, features/indexmacros, has been updated.

- Log -----------------------------------------------------------------

commit 891731992484202e40d4fd67dab2672510070145
Merge: 5093e39 40a331a
Author: Juergen Spitzmueller <spitz at lyx.org>
Date:   Wed Apr 20 08:38:12 2022 +0200

    Merge branch 'master' into features/indexmacros


commit 40a331abfdf9c774fd767d53dcdb578afd14da51
Author: Juergen Spitzmueller <spitz at lyx.org>
Date:   Wed Apr 20 08:04:15 2022 +0200

    de.po

diff --git a/po/de.po b/po/de.po
index 44e5e09..76e0a0b 100644
--- a/po/de.po
+++ b/po/de.po
@@ -94,8 +94,8 @@ msgid ""
 msgstr ""
 "Project-Id-Version: LyX 2.4git\n"
 "Report-Msgid-Bugs-To: lyx-devel at lists.lyx.org\n"
-"POT-Creation-Date: 2022-04-14 10:20+0200\n"
-"PO-Revision-Date: 2022-04-14 10:26+0200\n"
+"POT-Creation-Date: 2022-04-20 08:01+0200\n"
+"PO-Revision-Date: 2022-04-20 08:03+0200\n"
 "Last-Translator: Jürgen Spitzmüller <spitz at lyx.org>\n"
 "Language-Team: Deutsch <lyx-docs at lists.lyx.org>\n"
 "Language: de\n"
@@ -29131,15 +29131,15 @@ msgstr "Die Ausgabe ist leer"
 msgid "No output file was generated."
 msgstr "Es wurde keine Ausgabedatei erzeugt."
 
-#: src/Cursor.cpp:416 src/Text.cpp:2141
+#: src/Cursor.cpp:417 src/Text.cpp:2141
 msgid ", Inset: "
 msgstr ", Einfügung: "
 
-#: src/Cursor.cpp:417 src/Text.cpp:2143
+#: src/Cursor.cpp:418 src/Text.cpp:2143
 msgid ", Cell: "
 msgstr ", Zelle: "
 
-#: src/Cursor.cpp:418 src/Text.cpp:2146
+#: src/Cursor.cpp:419 src/Text.cpp:2146
 msgid ", Position: "
 msgstr ", Position: "
 
@@ -37170,28 +37170,28 @@ msgstr "%1$d Zeichenketten wurden in der Auswahl ersetzt."
 msgid "%1$d strings have been replaced."
 msgstr "%1$d Zeichenketten wurden ersetzt."
 
-#: src/lyxfind.cpp:4683
+#: src/lyxfind.cpp:4679
 msgid "One match has been replaced."
 msgstr "Ein Treffer wurde ersetzt."
 
-#: src/lyxfind.cpp:4686
+#: src/lyxfind.cpp:4682
 msgid "Two matches have been replaced."
 msgstr "Zwei Treffer wurden ersetzt."
 
-#: src/lyxfind.cpp:4689
+#: src/lyxfind.cpp:4685
 #, c-format
 msgid "%1$d matches have been replaced."
 msgstr "%1$d Treffer wurden ersetzt."
 
-#: src/lyxfind.cpp:4695
+#: src/lyxfind.cpp:4691
 msgid "Match not found."
 msgstr "Die Zeichenkette wurde nicht gefunden!"
 
-#: src/lyxfind.cpp:4701
+#: src/lyxfind.cpp:4697
 msgid "Match has been replaced."
 msgstr "Die Zeichenkette wurde ersetzt."
 
-#: src/lyxfind.cpp:4703
+#: src/lyxfind.cpp:4699
 msgid "Match found."
 msgstr "Die Zeichenkette wurde gefunden!"
 
@@ -37632,18 +37632,22 @@ msgid "Selection copy/paste mechanism"
 msgstr "Auswahl kopieren/einfügen Mechanismus"
 
 #: src/support/debug.cpp:74
-msgid "Find and replace mechanism"
-msgstr "Mechanismus für Suchen und Ersetzen"
+msgid "Find and replace mechanism, terse version"
+msgstr "Mechanismus für Suchen und Ersetzen (knapp)"
 
 #: src/support/debug.cpp:75
+msgid "Find and replace mechanism, verbose version"
+msgstr "Mechanismus für Suchen und Ersetzen (ausführlich)"
+
+#: src/support/debug.cpp:76
 msgid "Developers' general debug messages"
 msgstr "Allgemeine Testmeldungen der Entwickler"
 
-#: src/support/debug.cpp:76 src/support/debug.cpp:77
+#: src/support/debug.cpp:77 src/support/debug.cpp:78
 msgid "All debugging messages"
 msgstr "Alle Testmeldungen"
 
-#: src/support/debug.cpp:184
+#: src/support/debug.cpp:185
 #, c-format
 msgid "Debugging `%1$s' (%2$s)"
 msgstr "Testen von ,%1$s` (%2$s)"

commit eb3e40ca6eea01817d821ce9b32fb0b14766051b
Author: Kornel Benko <kornel at lyx.org>
Date:   Tue Apr 19 23:35:31 2022 +0200

    Update sk.po

diff --git a/po/sk.po b/po/sk.po
index 723da0b..9f6c938 100644
--- a/po/sk.po
+++ b/po/sk.po
@@ -8,8 +8,8 @@ msgid ""
 msgstr ""
 "Project-Id-Version: LyX-2.4\n"
 "Report-Msgid-Bugs-To: lyx-devel at lists.lyx.org\n"
-"POT-Creation-Date: 2022-04-19 13:31+0200\n"
-"PO-Revision-Date: 2022-04-19 11:39+0000\n"
+"POT-Creation-Date: 2022-04-19 16:14+0200\n"
+"PO-Revision-Date: 2022-04-19 14:15+0000\n"
 "Last-Translator: Kornel Benko <kornel at lyx.org>\n"
 "Language-Team: Slovak <kornel at lyx.org>\n"
 "Language: sk\n"
@@ -37161,8 +37161,8 @@ msgid "Selection copy/paste mechanism"
 msgstr "Výber kopírovania/vlepenia z/do schránky"
 
 #: src/support/debug.cpp:74
-msgid "Find and replace mechanism, short version"
-msgstr "Mechanizmus hľadať a nahradiť, krátka verzia"
+msgid "Find and replace mechanism, terse version"
+msgstr "Mechanizmus hľadať a nahradiť, lapidárna verzia"
 
 #: src/support/debug.cpp:75
 msgid "Find and replace mechanism, verbose version"

commit e774ec18760e93cf2eaa0118d246f3f475857976
Author: Kornel Benko <kornel at lyx.org>
Date:   Tue Apr 19 23:28:27 2022 +0200

    FindAdv: Fix search for '}'
    
    Problem occured if
    1.) not using regex and
    2.) search without format and
    3.) the search pattern ended with '}'.
    
    then this last char '}' in the search pattern was discarded.

diff --git a/src/lyxfind.cpp b/src/lyxfind.cpp
index 69e740d..6fead6b 100644
--- a/src/lyxfind.cpp
+++ b/src/lyxfind.cpp
@@ -3420,24 +3420,23 @@ static string correctlanguagesetting(string par, bool isPatternString, bool with
 
 
 // Remove trailing closure of math, macros and environments, so to catch parts of them.
-static int identifyClosing(string & t)
+static void identifyClosing(string & t, bool ignoreformat)
 {
-	int open_braces = 0;
 	do {
 		LYXERR(Debug::FINDVERBOSE, "identifyClosing(): t now is '" << t << "'");
 		if (regex_replace(t, t, "(.*[^\\\\])\\$$", "$1"))
 			continue;
 		if (regex_replace(t, t, "(.*[^\\\\])\\\\\\]$", "$1"))
 			continue;
-		if (regex_replace(t, t, "(.*[^\\\\])\\\\end\\{[a-zA-Z_]*\\*?\\}$", "$1"))
-			continue;
-		if (regex_replace(t, t, "(.*[^\\\\])\\}$", "$1")) {
-			++open_braces;
+		if (regex_replace(t, t, "(.*[^\\\\])\\\\end\\{[a-zA-Z_]+\\*?\\}$", "$1"))
 			continue;
+		if (! ignoreformat) {
+			if (regex_replace(t, t, "(.*[^\\\\])\\}$", "$1"))
+				continue;
 		}
 		break;
 	} while (true);
-	return open_braces;
+	return;
 }
 
 static int num_replaced = 0;
@@ -3564,7 +3563,7 @@ MatchStringAdv::MatchStringAdv(lyx::Buffer & buf, FindAndReplaceOptions & opt)
 	}
 	opt.matchAtStart = false;
 	if (!use_regexp) {
-		identifyClosing(par_as_string); // Removes math closings ($, ], ...) at end of string
+		identifyClosing(par_as_string, opt.ignoreformat); // Removes math closings ($, ], ...) at end of string
 		if (opt.ignoreformat) {
 			lead_size = 0;
 		}

commit 0aa462e27f7b766f15a0e238fc5157cb06ab93b1
Author: jpc <jpc at lyx.org>
Date:   Tue Apr 19 18:22:53 2022 +0200

               Update fr.po

diff --git a/po/fr.gmo b/po/fr.gmo
index 59bfefa..930c04f 100644
Binary files a/po/fr.gmo and b/po/fr.gmo differ
diff --git a/po/fr.po b/po/fr.po
index 4862d8e..19c7d47 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -362,8 +362,8 @@ msgid ""
 msgstr ""
 "Project-Id-Version: LyX 2.4\n"
 "Report-Msgid-Bugs-To: lyx-devel at lists.lyx.org\n"
-"POT-Creation-Date: 2022-03-17 18:13+0100\n"
-"PO-Revision-Date: 2022-03-17 18:23+0100\n"
+"POT-Creation-Date: 2022-04-19 18:17+0200\n"
+"PO-Revision-Date: 2022-04-19 18:20+0200\n"
 "Last-Translator: Jean-Pierre Chrétien <jeanpierre.chretien at free.fr>\n"
 "Language-Team: lyxfr\n"
 "Language: fr\n"
@@ -17388,8 +17388,8 @@ msgstr "Marge"
 msgid "Greyedout"
 msgstr "Grisée"
 
-#: lib/layouts/stdinsets.inc:208 src/insets/InsetERT.cpp:253
-#: src/insets/InsetERT.cpp:254
+#: lib/layouts/stdinsets.inc:208 src/insets/InsetERT.cpp:251
+#: src/insets/InsetERT.cpp:252
 msgid "ERT"
 msgstr "TeX"
 
@@ -19954,7 +19954,7 @@ msgstr "Copier comme référence|C"
 
 #: lib/ui/stdcontext.inc:61 lib/ui/stdcontext.inc:375 lib/ui/stdmenus.inc:108
 #: lib/ui/stdtoolbars.inc:86 src/Text3.cpp:1584
-#: src/mathed/InsetMathNest.cpp:555
+#: src/mathed/InsetMathNest.cpp:561
 msgid "Cut"
 msgstr "Couper"
 
@@ -19966,7 +19966,7 @@ msgstr "Copier"
 #: lib/ui/stdcontext.inc:63 lib/ui/stdcontext.inc:377 lib/ui/stdmenus.inc:110
 #: lib/ui/stdtoolbars.inc:88 src/Text3.cpp:1528
 #: src/frontends/qt/GuiToolbar.cpp:441 src/mathed/InsetMathGrid.cpp:1565
-#: src/mathed/InsetMathNest.cpp:533
+#: src/mathed/InsetMathNest.cpp:539
 msgid "Paste"
 msgstr "Coller"
 
@@ -28336,8 +28336,8 @@ msgstr "texte d'insert grisé"
 #: src/insets/InsetCommandParams.cpp:508 src/insets/InsetCommandParams.cpp:516
 #: src/insets/InsetGraphics.cpp:900 src/insets/InsetGraphics.cpp:908
 #: src/insets/InsetListings.cpp:299 src/insets/InsetListings.cpp:307
-#: src/insets/InsetListings.cpp:332 src/mathed/MathExtern.cpp:1440
-#: src/mathed/MathExtern.cpp:1514
+#: src/insets/InsetListings.cpp:332 src/mathed/MathExtern.cpp:1444
+#: src/mathed/MathExtern.cpp:1518
 msgid "LyX Warning: "
 msgstr "Avertissement LyX : "
 
@@ -28346,7 +28346,7 @@ msgstr "Avertissement LyX : "
 #: src/insets/InsetCommandParams.cpp:509 src/insets/InsetCommandParams.cpp:517
 #: src/insets/InsetGraphics.cpp:901 src/insets/InsetGraphics.cpp:909
 #: src/insets/InsetListings.cpp:300 src/insets/InsetListings.cpp:308
-#: src/mathed/MathExtern.cpp:1441 src/mathed/MathExtern.cpp:1515
+#: src/mathed/MathExtern.cpp:1445 src/mathed/MathExtern.cpp:1519
 msgid "uncodable character"
 msgstr "caractère incodable"
 
@@ -29440,15 +29440,15 @@ msgstr "La sortie est vide"
 msgid "No output file was generated."
 msgstr "Aucun fichier imprimable créé."
 
-#: src/Cursor.cpp:416 src/Text.cpp:2141
+#: src/Cursor.cpp:417 src/Text.cpp:2141
 msgid ", Inset: "
 msgstr ", insert : "
 
-#: src/Cursor.cpp:417 src/Text.cpp:2143
+#: src/Cursor.cpp:418 src/Text.cpp:2143
 msgid ", Cell: "
 msgstr ", cellule : "
 
-#: src/Cursor.cpp:418 src/Text.cpp:2146
+#: src/Cursor.cpp:419 src/Text.cpp:2146
 msgid ", Position: "
 msgstr ", position : "
 
@@ -30865,7 +30865,7 @@ msgstr "Mode éditeur mathématique"
 msgid "No valid math formula"
 msgstr "Pas de formule mathématique valide"
 
-#: src/Text3.cpp:210 src/mathed/InsetMathNest.cpp:1032
+#: src/Text3.cpp:210 src/mathed/InsetMathNest.cpp:1038
 msgid "Already in regular expression mode"
 msgstr "Déjà en mode « expression régulière »"
 
@@ -37072,7 +37072,7 @@ msgstr "Description : "
 msgid "Sorting: "
 msgstr "Tri : "
 
-#: src/insets/InsetNote.cpp:252
+#: src/insets/InsetNote.cpp:269
 msgid "note"
 msgstr "note"
 
@@ -37250,20 +37250,20 @@ msgstr ""
 "L'information de suivi de modifications pour les lignes/colonnes de tableau "
 "est incomplète. Elle sera ignorée."
 
-#: src/insets/InsetTabular.cpp:5680
+#: src/insets/InsetTabular.cpp:5636
 msgid "Column movement not supported with multi-columns."
 msgstr "Déplacement de colonne non implanté pour les colonnes multiples."
 
-#: src/insets/InsetTabular.cpp:5698
+#: src/insets/InsetTabular.cpp:5654
 msgid "Row movement not supported with multi-rows."
 msgstr "Déplacement de ligne non implanté pour les lignes multiples."
 
-#: src/insets/InsetTabular.cpp:6219
+#: src/insets/InsetTabular.cpp:6175
 msgid "Selection size should match clipboard content."
 msgstr ""
 "La taille de la sélection doit correspondre au contenu du presse-papier."
 
-#: src/insets/InsetText.cpp:1380
+#: src/insets/InsetText.cpp:1381
 msgid "[contains tracked changes]"
 msgstr "[contient les modifications suivies]"
 
@@ -37412,28 +37412,28 @@ msgstr "%1$d chaînes remplacées dans le sélection."
 msgid "%1$d strings have been replaced."
 msgstr "%1$d chaînes remplacées."
 
-#: src/lyxfind.cpp:4584
+#: src/lyxfind.cpp:4680
 msgid "One match has been replaced."
 msgstr "Une correspondance a été remplacée."
 
-#: src/lyxfind.cpp:4587
+#: src/lyxfind.cpp:4683
 msgid "Two matches have been replaced."
 msgstr "Deux correspondances ont été remplacées."
 
-#: src/lyxfind.cpp:4590
+#: src/lyxfind.cpp:4686
 #, c-format
 msgid "%1$d matches have been replaced."
 msgstr "%1$d correspondances ont été remplacées."
 
-#: src/lyxfind.cpp:4596
+#: src/lyxfind.cpp:4692
 msgid "Match not found."
 msgstr "Chaîne de caractères introuvable."
 
-#: src/lyxfind.cpp:4602
+#: src/lyxfind.cpp:4698
 msgid "Match has been replaced."
 msgstr "Chaîne de caractères remplacée."
 
-#: src/lyxfind.cpp:4604
+#: src/lyxfind.cpp:4700
 msgid "Match found."
 msgstr "Chaîne de caractères reconnue."
 
@@ -37556,19 +37556,19 @@ msgstr "Macros mathématique : \\%1$s"
 msgid "Invalid macro! \\%1$s"
 msgstr "Macro mathématique invalide ! \\%1$s"
 
-#: src/mathed/InsetMathNest.cpp:1018
+#: src/mathed/InsetMathNest.cpp:1024
 msgid "create new math text environment ($...$)"
 msgstr "créé un nouvel environnement texte math ($...$)"
 
-#: src/mathed/InsetMathNest.cpp:1021
+#: src/mathed/InsetMathNest.cpp:1027
 msgid "entered math text mode (textrm)"
 msgstr "entré en mode texte math (textrm)"
 
-#: src/mathed/InsetMathNest.cpp:1043
+#: src/mathed/InsetMathNest.cpp:1049
 msgid "Regular expression editor mode"
 msgstr "Mode d'édition « expression régulière »"
 
-#: src/mathed/InsetMathNest.cpp:1948
+#: src/mathed/InsetMathNest.cpp:1954
 #, c-format
 msgid "Cannot apply %1$s here."
 msgstr "Impossible d'appliquer %1$s ici."
@@ -37875,18 +37875,22 @@ msgid "Selection copy/paste mechanism"
 msgstr "Mécanisme de sélection copier/coller"
 
 #: src/support/debug.cpp:74
-msgid "Find and replace mechanism"
-msgstr "Rechercher et remplacer"
+msgid "Find and replace mechanism, terse version"
+msgstr "Rechercher et remplacer, version laconique du moteur"
 
 #: src/support/debug.cpp:75
+msgid "Find and replace mechanism, verbose version"
+msgstr "Rechercher et remplacer, version bavarde du moteur"
+
+#: src/support/debug.cpp:76
 msgid "Developers' general debug messages"
 msgstr "Messages de débogage généraux pour les développeurs"
 
-#: src/support/debug.cpp:76 src/support/debug.cpp:77
+#: src/support/debug.cpp:77 src/support/debug.cpp:78
 msgid "All debugging messages"
 msgstr "Tous les messages de débogage"
 
-#: src/support/debug.cpp:184
+#: src/support/debug.cpp:185
 #, c-format
 msgid "Debugging `%1$s' (%2$s)"
 msgstr "Débogage de '%1$s' (%2$s)"

commit 9318f1b338f6844324a529b4d2322dc7fee03ea2
Author: Juergen Spitzmueller <spitz at lyx.org>
Date:   Tue Apr 19 15:12:56 2022 +0200

    Improve string

diff --git a/src/support/debug.cpp b/src/support/debug.cpp
index 63e9abd..04485be 100644
--- a/src/support/debug.cpp
+++ b/src/support/debug.cpp
@@ -71,7 +71,7 @@ DebugErrorItem errorTags[] = {
 	{ Debug::RTL,       "rtl",       N_("RTL/Bidi")},
 	{ Debug::LOCALE,    "locale",    N_("Locale/Internationalisation")},
 	{ Debug::SELECTION, "selection", N_("Selection copy/paste mechanism")},
-	{ Debug::FIND,      "find",      N_("Find and replace mechanism, short version")},
+	{ Debug::FIND,      "find",      N_("Find and replace mechanism, terse version")},
 	{ Debug::FINDVERBOSE,"findverbose", N_("Find and replace mechanism, verbose version")},
 	{ Debug::DEBUG,     "debug",     N_("Developers' general debug messages")},
 	{ Debug::ANY,       "any",       N_("All debugging messages")},

commit 1f902cc8c6d8506036ac836ad2b2ec420ea14f94
Author: Kornel Benko <kornel at lyx.org>
Date:   Tue Apr 19 13:53:44 2022 +0200

    Update sk.po

diff --git a/po/sk.po b/po/sk.po
index 73afca3..723da0b 100644
--- a/po/sk.po
+++ b/po/sk.po
@@ -8,8 +8,8 @@ msgid ""
 msgstr ""
 "Project-Id-Version: LyX-2.4\n"
 "Report-Msgid-Bugs-To: lyx-devel at lists.lyx.org\n"
-"POT-Creation-Date: 2022-03-22 11:42+0100\n"
-"PO-Revision-Date: 2022-03-24 10:17+0000\n"
+"POT-Creation-Date: 2022-04-19 13:31+0200\n"
+"PO-Revision-Date: 2022-04-19 11:39+0000\n"
 "Last-Translator: Kornel Benko <kornel at lyx.org>\n"
 "Language-Team: Slovak <kornel at lyx.org>\n"
 "Language: sk\n"
@@ -37160,9 +37160,13 @@ msgstr "Lokalizácia/Nastavenie jazyka"
 msgid "Selection copy/paste mechanism"
 msgstr "Výber kopírovania/vlepenia z/do schránky"
 
-#: src/support/debug.cpp:73
-msgid "Find and replace mechanism"
-msgstr "Mechanizmus hľadať a nahradiť"
+#: src/support/debug.cpp:74
+msgid "Find and replace mechanism, short version"
+msgstr "Mechanizmus hľadať a nahradiť, krátka verzia"
+
+#: src/support/debug.cpp:75
+msgid "Find and replace mechanism, verbose version"
+msgstr "Mechanizmus hľadať a nahradiť, táravá verzia"
 
 #: src/support/debug.cpp:74
 msgid "Developers' general debug messages"
@@ -37310,6 +37314,9 @@ msgstr ""
 msgid "Unknown user"
 msgstr "Neznámy používateľ"
 
+#~ msgid "Find and replace mechanism"
+#~ msgstr "Mechanizmus hľadať a nahradiť"
+
 #~ msgid "Set all lines"
 #~ msgstr "Nastaviť všetky čiary"
 

commit d09f5ce1d065173d19fc2a990770561e807487fa
Author: Kornel Benko <kornel at lyx.org>
Date:   Tue Apr 19 13:41:38 2022 +0200

    FindAdv, Debug: Added new debug level :findverbose
    
    With the debug-level 'find' there are now less output.
    The original output can be received now with debig-level 'findverbose'
    
    Also constructions like
     LYXERR(Debug::FIND|Debug::FINDVERBOSE, "...");
    are now possible.

diff --git a/src/frontends/qt/FindAndReplace.cpp b/src/frontends/qt/FindAndReplace.cpp
index 300c291..ab61e1a 100644
--- a/src/frontends/qt/FindAndReplace.cpp
+++ b/src/frontends/qt/FindAndReplace.cpp
@@ -115,9 +115,9 @@ bool FindAndReplaceWidget::eventFilter(QObject * obj, QEvent * event)
 	case Qt::Key_Tab:
 		if (e->modifiers() == Qt::NoModifier) {
 			if (obj == find_work_area_){
-				LYXERR(Debug::FIND, "Focusing replace WA");
+				LYXERR(Debug::FINDVERBOSE, "Focusing replace WA");
 				replace_work_area_->setFocus();
-				LYXERR(Debug::FIND, "Selecting entire replace buffer");
+				LYXERR(Debug::FINDVERBOSE, "Selecting entire replace buffer");
 				dispatch(FuncRequest(LFUN_BUFFER_BEGIN));
 				dispatch(FuncRequest(LFUN_BUFFER_END_SELECT));
 				return true;
@@ -127,9 +127,9 @@ bool FindAndReplaceWidget::eventFilter(QObject * obj, QEvent * event)
 
 	case Qt::Key_Backtab:
 		if (obj == replace_work_area_) {
-			LYXERR(Debug::FIND, "Focusing find WA");
+			LYXERR(Debug::FINDVERBOSE, "Focusing find WA");
 			find_work_area_->setFocus();
-			LYXERR(Debug::FIND, "Selecting entire find buffer");
+			LYXERR(Debug::FINDVERBOSE, "Selecting entire find buffer");
 			dispatch(FuncRequest(LFUN_BUFFER_BEGIN));
 			dispatch(FuncRequest(LFUN_BUFFER_END_SELECT));
 			return true;
@@ -172,7 +172,7 @@ static vector<string> const & allManualsFiles()
 static bool nextDocumentBuffer(Buffer * & buf)
 {
 	ListOfBuffers const children = buf->allRelatives();
-	LYXERR(Debug::FIND, "children.size()=" << children.size());
+	LYXERR(Debug::FINDVERBOSE, "children.size()=" << children.size());
 	ListOfBuffers::const_iterator it =
 		find(children.begin(), children.end(), buf);
 	LASSERT(it != children.end(), return false);
@@ -193,7 +193,7 @@ static bool nextDocumentBuffer(Buffer * & buf)
 static bool prevDocumentBuffer(Buffer * & buf)
 {
 	ListOfBuffers const children = buf->allRelatives();
-	LYXERR(Debug::FIND, "children.size()=" << children.size());
+	LYXERR(Debug::FINDVERBOSE, "children.size()=" << children.size());
 	ListOfBuffers::const_iterator it =
 		find(children.begin(), children.end(), buf);
 	LASSERT(it != children.end(), return false)
@@ -344,9 +344,9 @@ bool FindAndReplaceWidget::findAndReplaceScope(FindAndReplaceOptions & opt, bool
 	UndoGroupHelper helper(buf);
 
 	do {
-		LYXERR(Debug::FIND, "Dispatching LFUN_WORD_FINDADV");
+		LYXERR(Debug::FINDVERBOSE, "Dispatching LFUN_WORD_FINDADV");
 		dispatch(cmd);
-		LYXERR(Debug::FIND, "dispatched");
+		LYXERR(Debug::FINDVERBOSE, "dispatched");
 		if (bv->cursor().result().dispatched()) {
 			// New match found and selected (old selection replaced if needed)
 			if (replace_all)
@@ -398,7 +398,7 @@ bool FindAndReplaceWidget::findAndReplaceScope(FindAndReplaceOptions & opt, bool
 			//lyx::dispatch(FuncRequest(LFUN_BUFFER_END));
 			bv->cursor().setCursor(doc_iterator_end(buf));
 			bv->cursor().backwardPos();
-			LYXERR(Debug::FIND, "findBackAdv5: cur: "
+			LYXERR(Debug::FINDVERBOSE, "findBackAdv5: cur: "
 				<< bv->cursor());
 		}
 		bv->clearSelection();
@@ -454,7 +454,7 @@ bool FindAndReplaceWidget::findAndReplace(
 			? FindAndReplaceOptions::R_ONLY_MATHS
 			: FindAndReplaceOptions::R_EVERYTHING;
 
-	LYXERR(Debug::FIND, "FindAndReplaceOptions: "
+	LYXERR(Debug::FINDVERBOSE, "FindAndReplaceOptions: "
 	       << "find_buf_name=" << find_buf_name
 	       << ", casesensitiv=" << casesensitive
 	       << ", matchword=" << matchword
@@ -556,7 +556,7 @@ void FindAndReplaceWidget::showEvent(QShowEvent * /* ev */)
 	replace_work_area_->installEventFilter(this);
 
 	view_.setCurrentWorkArea(find_work_area_);
-	LYXERR(Debug::FIND, "Selecting entire find buffer");
+	LYXERR(Debug::FINDVERBOSE, "Selecting entire find buffer");
 	dispatch(FuncRequest(LFUN_BUFFER_BEGIN));
 	dispatch(FuncRequest(LFUN_BUFFER_END_SELECT));
 }
diff --git a/src/lyxfind.cpp b/src/lyxfind.cpp
index 2ea1e88..69e740d 100644
--- a/src/lyxfind.cpp
+++ b/src/lyxfind.cpp
@@ -875,7 +875,7 @@ string correctRegex(string t, bool withformat)
 						replace = accents["braceright"];
 					else {
 						// else part should not exist
-						LASSERT(1, /**/);
+						LASSERT(0, /**/);
 					}
 				}
 				else {
@@ -885,7 +885,7 @@ string correctRegex(string t, bool withformat)
 						replace = "\\}";
 					else {
 						// else part should not exist
-						LASSERT(1, /**/);
+						LASSERT(0, /**/);
 					}
 				}
 			}
@@ -1109,7 +1109,7 @@ static docstring buffer_to_latex(Buffer & buffer)
 	pit_type const endpit = buffer.paragraphs().size();
 	for (pit_type pit = 0; pit != endpit; ++pit) {
 		TeXOnePar(buffer, buffer.text(), pit, os, runparams);
-		LYXERR(Debug::FIND, "searchString up to here: " << ods.str());
+		LYXERR(Debug::FINDVERBOSE, "searchString up to here: " << ods.str());
 	}
 	return ods.str();
 }
@@ -1156,7 +1156,7 @@ static string latexNamesToUtf8(docstring strIn)
 		add = addtmp;
 	else if (addtmp.length() > lastpos)
 		add += addtmp.substr(lastpos, addtmp.length() - lastpos);
-	LYXERR(Debug::FIND, "Adding to search string: '"
+	LYXERR(Debug::FINDVERBOSE, "Adding to search string: '"
 			<< add << "'");
 	return add;
 }
@@ -1190,7 +1190,7 @@ static docstring stringifySearchBuffer(Buffer & buffer, FindAndReplaceOptions co
 			string add = latexNamesToUtf8(par.asString(pos_type(0), par.size(),
 								option,
 								&runparams));
-			LYXERR(Debug::FIND, "Adding to search string: '"
+			LYXERR(Debug::FINDVERBOSE, "Adding to search string: '"
 				<< add << "'");
 			t += add;
 		}
@@ -1221,7 +1221,7 @@ static size_t identifyLeading(string const & s)
 	       || regex_replace(t, t, "^ ?\\\\item\\{[a-z]+\\}", "")
 	       || regex_replace(t, t, "^\\\\begin\\{[a-zA-Z_]*\\*?\\}", ""))
 	       ;
-	LYXERR(Debug::FIND, "  after removing leading $, \\[ , \\emph{, \\textbf{, etc.: '" << t << "'");
+	LYXERR(Debug::FINDVERBOSE, "  after removing leading $, \\[ , \\emph{, \\textbf{, etc.: '" << t << "'");
 	return s.find(t);
 }
 
@@ -2025,7 +2025,7 @@ void Intervall::handleCloseP(int i, bool closingAllowed)
 {
 	if (actualdeptindex <= 0) {
 		if (! closingAllowed)
-			LYXERR(Debug::FIND, "Bad closing parenthesis in latex");  /* should not happen, but the latex input may be wrong */
+			LYXERR(Debug::FINDVERBOSE, "Bad closing parenthesis in latex");  /* should not happen, but the latex input may be wrong */
 		// if we are at the very end
 		addIntervall(i, i+1);
 	}
@@ -3363,7 +3363,7 @@ static string correctlanguagesetting(string par, bool isPatternString, bool with
 	if (withformat) {
 		// Split the latex input into pieces which
 		// can be digested by our search engine
-		LYXERR(Debug::FIND, "input: \"" << par << "\"");
+		LYXERR(Debug::FINDVERBOSE, "input: \"" << par << "\"");
 		if (isPatternString && (pbuf != nullptr)) { // Check if we should disable/enable test for language
 			// We check for polyglossia, because in runparams.flavor we use Flavor::XeTeX
 			string doclang = pbuf->params().language->polyglossia();
@@ -3381,7 +3381,7 @@ static string correctlanguagesetting(string par, bool isPatternString, bool with
 
 		}
 		result = splitOnKnownMacros(par.substr(0,parlen), isPatternString);
-		LYXERR(Debug::FIND, "After splitOnKnownMacros:\n\"" << result << "\"");
+		LYXERR(Debug::FINDVERBOSE, "After splitOnKnownMacros:\n\"" << result << "\"");
 	}
 	else
 		result = par.substr(0, parlen);
@@ -3396,7 +3396,7 @@ static string correctlanguagesetting(string par, bool isPatternString, bool with
 				features += " " + a;
 				// LYXERR(Debug::INFO, "Identified regex format:" << a);
 			}
-			LYXERR(Debug::FIND, "Identified Features" << features);
+			LYXERR(Debug::FINDVERBOSE, "Identified Features" << features);
 
 		}
 	} else if (regex_with_format) {
@@ -3406,7 +3406,7 @@ static string correctlanguagesetting(string par, bool isPatternString, bool with
 			bool b = it->second;
 			if (b && ! info[a]) {
 				missed++;
-				LYXERR(Debug::FIND, "Missed(" << missed << " " << a <<", srclen = " << parlen );
+				LYXERR(Debug::FINDVERBOSE, "Missed(" << missed << " " << a <<", srclen = " << parlen );
 				return "";
 			}
 		}
@@ -3424,7 +3424,7 @@ static int identifyClosing(string & t)
 {
 	int open_braces = 0;
 	do {
-		LYXERR(Debug::FIND, "identifyClosing(): t now is '" << t << "'");
+		LYXERR(Debug::FINDVERBOSE, "identifyClosing(): t now is '" << t << "'");
 		if (regex_replace(t, t, "(.*[^\\\\])\\$$", "$1"))
 			continue;
 		if (regex_replace(t, t, "(.*[^\\\\])\\\\\\]$", "$1"))
@@ -3585,14 +3585,14 @@ MatchStringAdv::MatchStringAdv(lyx::Buffer & buf, FindAndReplaceOptions & opt)
 		string regexp2_str = "(" + lead_as_regex_string + ")(.*?)" + par_as_regex_string_nolead;
 		CreateRegexp(opt, regexp_str, regexp2_str);
 		use_regexp = true;
-		LYXERR(Debug::FIND, "Setting regexp to : '" << regexp_str << "'");
-		LYXERR(Debug::FIND, "Setting regexp2 to: '" << regexp2_str << "'");
+		LYXERR(Debug::FINDVERBOSE|Debug::FIND, "Setting regexp to : '" << regexp_str << "'");
+		LYXERR(Debug::FINDVERBOSE|Debug::FIND, "Setting regexp2 to: '" << regexp2_str << "'");
 		return;
 	}
 
 	if (!opt.ignoreformat) {
 		lead_size = identifyLeading(par_as_string);
-		LYXERR(Debug::FIND, "Lead_size: " << lead_size);
+		LYXERR(Debug::FINDVERBOSE, "Lead_size: " << lead_size);
 		lead_as_string = par_as_string.substr(0, lead_size);
 		par_as_string_nolead = par_as_string.substr(lead_size, par_as_string.size() - lead_size);
 	}
@@ -3606,13 +3606,13 @@ MatchStringAdv::MatchStringAdv(lyx::Buffer & buf, FindAndReplaceOptions & opt)
 			(void)regex_replace(par_as_string_nolead, par_as_string_nolead, "\\$$", "");
 			(void)regex_replace(par_as_string_nolead, par_as_string_nolead, "}$", "");
 			par_as_string = par_as_string_nolead;
-			LYXERR(Debug::FIND, "lead_as_regexp is '" << lead_as_regexp << "'");
-			LYXERR(Debug::FIND, "par_as_string now is '" << par_as_string << "'");
+			LYXERR(Debug::FINDVERBOSE, "lead_as_regexp is '" << lead_as_regexp << "'");
+			LYXERR(Debug::FINDVERBOSE, "par_as_string now is '" << par_as_string << "'");
 		}
-		// LYXERR(Debug::FIND, "par_as_string before escape_for_regex() is '" << par_as_string << "'");
+		// LYXERR(Debug::FINDVERBOSE, "par_as_string before escape_for_regex() is '" << par_as_string << "'");
 		par_as_string = escape_for_regex(par_as_string, !opt.ignoreformat);
 		// Insert (.*?) before trailing closure of math, macros and environments, so to catch parts of them.
-		// LYXERR(Debug::FIND, "par_as_string now is '" << par_as_string << "'");
+		// LYXERR(Debug::FINDVERBOSE, "par_as_string now is '" << par_as_string << "'");
 		++close_wildcards;
 		size_t lng = par_as_string.size();
 		if (!opt.ignoreformat) {
@@ -3632,15 +3632,15 @@ MatchStringAdv::MatchStringAdv(lyx::Buffer & buf, FindAndReplaceOptions & opt)
 			if (lng < par_as_string.size())
 				par_as_string = par_as_string.substr(0,lng);
 		}
-		LYXERR(Debug::FIND, "par_as_string after correctRegex is '" << par_as_string << "'");
+		LYXERR(Debug::FINDVERBOSE, "par_as_string after correctRegex is '" << par_as_string << "'");
 		if ((lng > 0) && (par_as_string[0] == '^')) {
 			par_as_string = par_as_string.substr(1);
 			--lng;
 			opt.matchAtStart = true;
 		}
-		// LYXERR(Debug::FIND, "par_as_string now is '" << par_as_string << "'");
-		// LYXERR(Debug::FIND, "Open braces: " << open_braces);
-		// LYXERR(Debug::FIND, "Replaced text (to be used as regex): " << par_as_string);
+		// LYXERR(Debug::FINDVERBOSE, "par_as_string now is '" << par_as_string << "'");
+		// LYXERR(Debug::FINDVERBOSE, "Open braces: " << open_braces);
+		// LYXERR(Debug::FINDVERBOSE, "Replaced text (to be used as regex): " << par_as_string);
 
 		// If entered regexp must match at begin of searched string buffer
 		// Kornel: Added parentheses to use $1 for size of the leading string
@@ -3662,8 +3662,8 @@ MatchStringAdv::MatchStringAdv(lyx::Buffer & buf, FindAndReplaceOptions & opt)
 			regexp_str = "(" + lead_as_regexp + ")()" + par_as_string;
 			regexp2_str = "(" + lead_as_regexp + ")(.*?)" + par_as_string;
 		}
-		LYXERR(Debug::FIND, "Setting regexp to : '" << regexp_str << "'");
-		LYXERR(Debug::FIND, "Setting regexp2 to: '" << regexp2_str << "'");
+		LYXERR(Debug::FINDVERBOSE|Debug::FIND, "Setting regexp to : '" << regexp_str << "'");
+		LYXERR(Debug::FINDVERBOSE|Debug::FIND, "Setting regexp2 to: '" << regexp2_str << "'");
 		CreateRegexp(opt, regexp_str, regexp2_str, par_as_string);
 	}
 }
@@ -3694,12 +3694,12 @@ MatchResult MatchStringAdv::findAux(DocIterator const & cur, int len, bool at_be
 		mres.match_len = -1;
 		return mres;
 	}
-	LYXERR(Debug::FIND, "After normalization: Matching against:\n'" << str << "'");
+	LYXERR(Debug::FINDVERBOSE, "After normalization: Matching against:\n'" << str << "'");
 
 	LASSERT(use_regexp, /**/);
 	{
 		// use_regexp always true
-		LYXERR(Debug::FIND, "Searching in regexp mode: at_begin=" << at_begin);
+		LYXERR(Debug::FINDVERBOSE, "Searching in regexp mode: at_begin=" << at_begin);
 #if QTSEARCH
 		QString qstr = QString::fromStdString(str);
 		QRegularExpression const *p_regexp;
@@ -3833,7 +3833,7 @@ MatchResult MatchStringAdv::operator()(DocIterator const & cur, int len, bool at
 {
 	MatchResult mres = findAux(cur, len, at_begin);
 	int res = mres.match_len;
-	LYXERR(Debug::FIND,
+	LYXERR(Debug::FINDVERBOSE,
 	       "res=" << res << ", at_begin=" << at_begin
 	       << ", matchAtStart=" << opt.matchAtStart
 	       << ", inTexted=" << cur.inTexted());
@@ -3919,11 +3919,11 @@ string MatchStringAdv::normalize(docstring const & s, bool ignore_format) const
 	// Remove stale empty \emph{}, \textbf{} and similar blocks from latexify
 	// Kornel: Added textsl, textsf, textit, texttt and noun
 	// + allow to seach for colored text too
-	LYXERR(Debug::FIND, "Removing stale empty macros from: " << t);
+	LYXERR(Debug::FINDVERBOSE, "Removing stale empty macros from: " << t);
 	while (regex_replace(t, t, "\\\\(emph|noun|text(bf|sl|sf|it|tt)|(u|uu)line|(s|x)out|uwave)(\\{(\\{\\})?\\})+", ""))
-		LYXERR(Debug::FIND, "  further removing stale empty \\emph{}, \\textbf{} macros from: " << t);
+		LYXERR(Debug::FINDVERBOSE, "  further removing stale empty \\emph{}, \\textbf{} macros from: " << t);
 	while (regex_replace(t, t, "\\\\((sub)?(((sub)?section)|paragraph)|part)\\*?(\\{(\\{\\})?\\})+", ""))
-		LYXERR(Debug::FIND, "  further removing stale empty \\emph{}, \\textbf{} macros from: " << t);
+		LYXERR(Debug::FINDVERBOSE, "  further removing stale empty \\emph{}, \\textbf{} macros from: " << t);
 	while (regex_replace(t, t, "\\\\(foreignlanguage|textcolor|item)\\{[a-z]+\\}(\\{(\\{\\})?\\})+", ""));
 
 	return t;
@@ -3932,7 +3932,7 @@ string MatchStringAdv::normalize(docstring const & s, bool ignore_format) const
 
 docstring stringifyFromCursor(DocIterator const & cur, int len)
 {
-	LYXERR(Debug::FIND, "Stringifying with len=" << len << " from cursor at pos: " << cur);
+	LYXERR(Debug::FINDVERBOSE, "Stringifying with len=" << len << " from cursor at pos: " << cur);
 	if (cur.inTexted()) {
 		Paragraph const & par = cur.paragraph();
 		// TODO what about searching beyond/across paragraph breaks ?
@@ -3957,11 +3957,13 @@ docstring stringifyFromCursor(DocIterator const & cur, int len)
 		if (ignoreFormats.getNonContent()) {
 			runparams.for_search |= OutputParams::SearchNonOutput;
 		}
-		LYXERR(Debug::FIND, "Stringifying with cur: "
+		LYXERR(Debug::FINDVERBOSE, "Stringifying with cur: "
 		       << cur << ", from pos: " << cur.pos() << ", end: " << end);
-		return from_utf8(latexNamesToUtf8(par.asString(cur.pos(), end,
-							       option,
-							       &runparams)));
+		docstring res = from_utf8(latexNamesToUtf8(par.asString(cur.pos(), end,
+								        option,
+								        &runparams)));
+		LYXERR(Debug::FIND, "Stringified text from pos(" << cur.pos() << ") len(" << len << "): " << res);
+		return res;
 	} else if (cur.inMathed()) {
 		CursorSlice cs = cur.top();
 		MathData md = cs.cell();
@@ -3972,11 +3974,11 @@ docstring stringifyFromCursor(DocIterator const & cur, int len)
 		MathData md2;
 		for (MathData::const_iterator it = md.begin() + cs.pos(); it != it_end; ++it)
 			md2.push_back(*it);
-		docstring s = from_utf8(latexNamesToUtf8(asString(md2)));
-		LYXERR(Debug::FIND, "Stringified math: '" << s << "'");
-		return s;
+		docstring res = from_utf8(latexNamesToUtf8(asString(md2)));
+		LYXERR(Debug::FINDVERBOSE|Debug::FIND, "Stringified math from pos(" << cur.pos() << ") len(" << len << "): " << res);
+		return res;
 	}
-	LYXERR(Debug::FIND, "Don't know how to stringify from here: " << cur);
+	LYXERR(Debug::FINDVERBOSE|Debug::FIND, "Don't know how to stringify from here: " << cur);
 	return docstring();
 }
 
@@ -3987,8 +3989,8 @@ docstring stringifyFromCursor(DocIterator const & cur, int len)
 docstring latexifyFromCursor(DocIterator const & cur, int len)
 {
 	/*
-	LYXERR(Debug::FIND, "Latexifying with len=" << len << " from cursor at pos: " << cur);
-	LYXERR(Debug::FIND, "  with cur.lastpost=" << cur.lastpos() << ", cur.lastrow="
+	LYXERR(Debug::FINDVERBOSE, "Latexifying with len=" << len << " from cursor at pos: " << cur);
+	LYXERR(Debug::FINDVERBOSE, "  with cur.lastpost=" << cur.lastpos() << ", cur.lastrow="
 	       << cur.lastrow() << ", cur.lastcol=" << cur.lastcol());
 	*/
 	Buffer const & buf = *cur.buffer();
@@ -4019,9 +4021,8 @@ docstring latexifyFromCursor(DocIterator const & cur, int len)
 			endpos = cur.pos() + len;
 		TeXOnePar(buf, *cur.innerText(), cur.pit(), os, runparams,
 			  string(), cur.pos(), endpos);
-		string s = lyx::to_utf8(ods.str());
-		LYXERR(Debug::FIND, "Latexified +modified text: '" << s << "'");
-		return(lyx::from_utf8(s));
+		LYXERR(Debug::FIND, "Latexified text from pos(" << cur.pos() << ") len(" << len << "): " << ods.str());
+		return(ods.str());
 	} else if (cur.inMathed()) {
 		// Retrieve the math environment type, and add '$' or '$[' or others (\begin{equation}) accordingly
 		for (int s = cur.depth() - 1; s >= 0; --s) {
@@ -4056,9 +4057,9 @@ docstring latexifyFromCursor(DocIterator const & cur, int len)
 				break;
 			}
 		}
-		LYXERR(Debug::FIND, "Latexified math: '" << lyx::to_utf8(ods.str()) << "'");
+		LYXERR(Debug::FINDVERBOSE|Debug::FIND, "Latexified math from pos(" << cur.pos() << ") len(" << len << "): " << ods.str());
 	} else {
-		LYXERR(Debug::FIND, "Don't know how to stringify from here: " << cur);
+		LYXERR(Debug::FINDVERBOSE|Debug::FIND, "Don't know how to stringify from here: " << cur);
 	}
 	return ods.str();
 }
@@ -4158,7 +4159,7 @@ MatchResult findAdvFinalize(DocIterator & cur, MatchStringAdv const & match, Mat
 		max_match = mres;
 	}
 	if (max_match.match_len <= 0) return fail;
-	LYXERR(Debug::FIND, "Ok");
+	LYXERR(Debug::FINDVERBOSE, "Ok");
 
 	// Compute the match length
 	int len = 1;
@@ -4254,7 +4255,7 @@ int findForwardAdv(DocIterator & cur, MatchStringAdv & match)
 	MatchResult orig_mres;
 	while (!theApp()->longOperationCancelled() && cur) {
 		//(void) findAdvForwardInnermost(cur);
-		LYXERR(Debug::FIND, "findForwardAdv() cur: " << cur);
+		LYXERR(Debug::FINDVERBOSE, "findForwardAdv() cur: " << cur);
 		MatchResult mres = match(cur, -1, false);
 		string msg = "Starting";
 		if (repeat)
@@ -4268,7 +4269,7 @@ int findForwardAdv(DocIterator & cur, MatchStringAdv & match)
 		if (match_len <= 0) {
 			// This should exit nested insets, if any, or otherwise undefine the currsor.
 			cur.pos() = cur.lastpos();
-			LYXERR(Debug::FIND, "Advancing pos: cur=" << cur);
+			LYXERR(Debug::FINDVERBOSE, "Advancing pos: cur=" << cur);
 			cur.forwardPos();
 		}
 		else {	// match_len > 0
@@ -4285,7 +4286,7 @@ int findForwardAdv(DocIterator & cur, MatchStringAdv & match)
 				if (increment < 1)
 					increment = 1;
 			}
-			LYXERR(Debug::FIND, "Set increment to " << increment);
+			LYXERR(Debug::FINDVERBOSE, "Set increment to " << increment);
 			while (increment > 0) {
 				DocIterator old_cur = cur;
 				if (cur.pos() + increment >= cur.lastpos()) {
@@ -4339,10 +4340,9 @@ int findForwardAdv(DocIterator & cur, MatchStringAdv & match)
 				mres = orig_mres;
 			}
 			// LYXERR0("Leaving first loop");
-			LYXERR(Debug::FIND, "Finalizing 1");
+			LYXERR(Debug::FINDVERBOSE, "Finalizing 1");
 			MatchResult found_match = findAdvFinalize(cur, match, mres);
 			if (found_match.match_len > 0) {
-				LASSERT(found_match.pos_len > 0, /**/);
 				match.FillResults(found_match);
 				return found_match.pos_len;
 			}
@@ -4367,7 +4367,7 @@ MatchResult findMostBackwards(DocIterator & cur, MatchStringAdv const & match, M
 	MatchResult mr = findAdvFinalize(tmp_cur, match, expected);
 	Inset & inset = cur.inset();
 	for (; cur != cur_begin; cur.backwardPos()) {
-		LYXERR(Debug::FIND, "findMostBackwards(): cur=" << cur);
+		LYXERR(Debug::FINDVERBOSE, "findMostBackwards(): cur=" << cur);
 		DocIterator new_cur = cur;
 		new_cur.backwardPos();
 		if (new_cur == cur || &new_cur.inset() != &inset || !match(new_cur).match_len)
@@ -4377,7 +4377,7 @@ MatchResult findMostBackwards(DocIterator & cur, MatchStringAdv const & match, M
 			break;
 		mr = new_mr;
 	}
-	LYXERR(Debug::FIND, "findMostBackwards(): exiting with cur=" << cur);
+	LYXERR(Debug::FINDVERBOSE, "findMostBackwards(): exiting with cur=" << cur);
 	return mr;
 }
 
@@ -4403,11 +4403,11 @@ int findBackwardsAdv(DocIterator & cur, MatchStringAdv & match)
 				cur.pos() = cur.lastpos();
 			else
 				cur.pos() = cur_orig.pos();
-			LYXERR(Debug::FIND, "findBackAdv2: cur: " << cur);
+			LYXERR(Debug::FINDVERBOSE, "findBackAdv2: cur: " << cur);
 			DocIterator cur_prev_iter;
 			do {
 				found_match = match(cur);
-				LYXERR(Debug::FIND, "findBackAdv3: found_match="
+				LYXERR(Debug::FINDVERBOSE, "findBackAdv3: found_match="
 				       << (found_match.match_len > 0) << ", cur: " << cur);
 				if (found_match.match_len > 0) {
 					MatchResult found_mr = findMostBackwards(cur, match, found_match);
@@ -4472,7 +4472,7 @@ static bool allNonLowercase(Cursor const & cur, int len)
 	pos_type beg_pos = cur.selectionBegin().pos();
 	pos_type end_pos = cur.selectionBegin().pos() + len;
 	if (len > cur.lastpos() + 1 - beg_pos) {
-		LYXERR(Debug::FIND, "This should not happen, more debug needed");
+		LYXERR(Debug::FINDVERBOSE, "This should not happen, more debug needed");
 		len = cur.lastpos() + 1 - beg_pos;
 		end_pos = beg_pos + len;
 	}
@@ -4489,13 +4489,13 @@ static bool firstUppercase(Cursor const & cur)
 	char_type ch1, ch2;
 	pos_type pos = cur.selectionBegin().pos();
 	if (pos >= cur.lastpos() - 1) {
-		LYXERR(Debug::FIND, "No upper-case at cur: " << cur);
+		LYXERR(Debug::FINDVERBOSE, "No upper-case at cur: " << cur);
 		return false;
 	}
 	ch1 = cur.paragraph().getChar(pos);
 	ch2 = cur.paragraph().getChar(pos + 1);
 	bool result = isUpperCase(ch1) && isLowerCase(ch2);
-	LYXERR(Debug::FIND, "firstUppercase(): "
+	LYXERR(Debug::FINDVERBOSE, "firstUppercase(): "
 	       << "ch1=" << ch1 << "(" << char(ch1) << "), ch2="
 	       << ch2 << "(" << char(ch2) << ")"
 	       << ", result=" << result << ", cur=" << cur);
@@ -4562,7 +4562,7 @@ static int findAdvReplace(BufferView * bv, FindAndReplaceOptions const & opt, Ma
 			|| sel_beg.idx() != sel_end.idx())
 		return 0;
 	int sel_len = sel_end.pos() - sel_beg.pos();
-	LYXERR(Debug::FIND, "sel_beg: " << sel_beg << ", sel_end: " << sel_end
+	LYXERR(Debug::FINDVERBOSE, "sel_beg: " << sel_beg << ", sel_end: " << sel_end
 	       << ", sel_len: " << sel_len << endl);
 	if (sel_len == 0)
 		return 0;
@@ -4583,7 +4583,7 @@ static int findAdvReplace(BufferView * bv, FindAndReplaceOptions const & opt, Ma
 	repl_buffer.setUnnamed(true);
 	LASSERT(repl_buffer.readString(lyx), return 0);
 	if (opt.keep_case && sel_len >= 2) {
-		LYXERR(Debug::FIND, "keep_case true: cur.pos()=" << cur.pos() << ", sel_len=" << sel_len);
+		LYXERR(Debug::FINDVERBOSE, "keep_case true: cur.pos()=" << cur.pos() << ", sel_len=" << sel_len);
 		if (cur.inTexted()) {
 			if (firstUppercase(cur))
 				changeFirstCase(repl_buffer, text_uppercase, text_lowercase);
@@ -4596,13 +4596,13 @@ static int findAdvReplace(BufferView * bv, FindAndReplaceOptions const & opt, Ma
 		repl_buffer.changeLanguage(
 					repl_buffer.language(),
 					cur.getFont().language());
-		LYXERR(Debug::FIND, "Replacing by pasteParagraphList()ing repl_buffer");
-		LYXERR(Debug::FIND, "Before pasteParagraphList() cur=" << cur << endl);
+		LYXERR(Debug::FINDVERBOSE, "Replacing by pasteParagraphList()ing repl_buffer");
+		LYXERR(Debug::FINDVERBOSE, "Before pasteParagraphList() cur=" << cur << endl);
 		cap::pasteParagraphList(cur, repl_buffer.paragraphs(),
 					repl_buffer.params().documentClassPtr(),
 					repl_buffer.params().authors(),
 					bv->buffer().errorList("Paste"));
-		LYXERR(Debug::FIND, "After pasteParagraphList() cur=" << cur << endl);
+		LYXERR(Debug::FINDVERBOSE, "After pasteParagraphList() cur=" << cur << endl);
 		sel_len = repl_buffer.paragraphs().begin()->size();
 	} else if (cur.inMathed()) {
 		odocstringstream ods;
@@ -4616,23 +4616,23 @@ static int findAdvReplace(BufferView * bv, FindAndReplaceOptions const & opt, Ma
 		TeXOnePar(repl_buffer, repl_buffer.text(), 0, os, runparams);
 		//repl_buffer.getSourceCode(ods, 0, repl_buffer.paragraphs().size(), false);
 		docstring repl_latex = ods.str();
-		LYXERR(Debug::FIND, "Latexified replace_buffer: '" << repl_latex << "'");
+		LYXERR(Debug::FINDVERBOSE, "Latexified replace_buffer: '" << repl_latex << "'");
 		string s;
 		(void)regex_replace(to_utf8(repl_latex), s, "\\$(.*)\\$", "$1");
 		(void)regex_replace(s, s, "\\\\\\[(.*)\\\\\\]", "$1");
 		repl_latex = from_utf8(s);
-		LYXERR(Debug::FIND, "Replacing by insert()ing latex: '" << repl_latex << "' cur=" << cur << " with depth=" << cur.depth());
+		LYXERR(Debug::FINDVERBOSE, "Replacing by insert()ing latex: '" << repl_latex << "' cur=" << cur << " with depth=" << cur.depth());
 		MathData ar(cur.buffer());
 		asArray(repl_latex, ar, Parse::NORMAL);
 		cur.insert(ar);
 		sel_len = ar.size();
-		LYXERR(Debug::FIND, "After insert() cur=" << cur << " with depth: " << cur.depth() << " and len: " << sel_len);
+		LYXERR(Debug::FINDVERBOSE, "After insert() cur=" << cur << " with depth: " << cur.depth() << " and len: " << sel_len);
 	}
 	if (cur.pos() >= sel_len)
 		cur.pos() -= sel_len;
 	else
 		cur.pos() = 0;
-	LYXERR(Debug::FIND, "After pos adj cur=" << cur << " with depth: " << cur.depth() << " and len: " << sel_len);
+	LYXERR(Debug::FINDVERBOSE, "After pos adj cur=" << cur << " with depth: " << cur.depth() << " and len: " << sel_len);
 	bv->putSelectionAt(DocIterator(cur), sel_len, !opt.forward);
 	bv->processUpdateFlags(Update::Force);
 	return 1;
@@ -4704,7 +4704,7 @@ bool findAdv(BufferView * bv, FindAndReplaceOptions & opt)
 		// Should never happen, maybe LASSERT() here?
 		pos_len = cur.lastpos() - cur.pos();
 	}
-	LYXERR(Debug::FIND, "Putting selection at cur=" << cur << " with len: " << pos_len);
+	LYXERR(Debug::FINDVERBOSE|Debug::FIND, "Putting selection at cur=" << cur << " with len: " << pos_len);
 	bv->putSelectionAt(cur, pos_len, !opt.forward);
 
 	return true;
@@ -4725,7 +4725,7 @@ ostringstream & operator<<(ostringstream & os, FindAndReplaceOptions const & opt
 	   << int(opt.scope) << ' '
 	   << int(opt.restr);
 
-	LYXERR(Debug::FIND, "built: " << os.str());
+	LYXERR(Debug::FINDVERBOSE, "built: " << os.str());
 
 	return os;
 }
@@ -4733,7 +4733,7 @@ ostringstream & operator<<(ostringstream & os, FindAndReplaceOptions const & opt
 
 istringstream & operator>>(istringstream & is, FindAndReplaceOptions & opt)
 {
-	// LYXERR(Debug::FIND, "parsing");
+	// LYXERR(Debug::FINDVERBOSE, "parsing");
 	string s;
 	string line;
 	getline(is, line);
@@ -4745,7 +4745,7 @@ istringstream & operator>>(istringstream & is, FindAndReplaceOptions & opt)
 			break;
 		getline(is, line);
 	}
-	// LYXERR(Debug::FIND, "file_buf_name: '" << s << "'");
+	// LYXERR(Debug::FINDVERBOSE, "file_buf_name: '" << s << "'");
 	opt.find_buf_name = from_utf8(s);
 	is >> opt.casesensitive >> opt.matchword >> opt.forward >> opt.expandmacros >> opt.ignoreformat >> opt.replace_all;
 	is.get();	// Waste space before replace string
@@ -4759,7 +4759,7 @@ istringstream & operator>>(istringstream & is, FindAndReplaceOptions & opt)
 			break;
 		getline(is, line);
 	}
-	// LYXERR(Debug::FIND, "repl_buf_name: '" << s << "'");
+	// LYXERR(Debug::FINDVERBOSE, "repl_buf_name: '" << s << "'");
 	opt.repl_buf_name = from_utf8(s);
 	is >> opt.keep_case;
 	int i;
@@ -4769,7 +4769,7 @@ istringstream & operator>>(istringstream & is, FindAndReplaceOptions & opt)
 	opt.restr = FindAndReplaceOptions::SearchRestriction(i);
 
 	/*
-	LYXERR(Debug::FIND, "parsed: " << opt.casesensitive << ' ' << opt.matchword << ' ' << opt.forward << ' '
+	LYXERR(Debug::FINDVERBOSE, "parsed: " << opt.casesensitive << ' ' << opt.matchword << ' ' << opt.forward << ' '
 	       << opt.expandmacros << ' ' << opt.ignoreformat << ' ' << opt.keep_case << ' '
 	       << opt.scope << ' ' << opt.restr);
 	*/
diff --git a/src/support/debug.cpp b/src/support/debug.cpp
index b890741..63e9abd 100644
--- a/src/support/debug.cpp
+++ b/src/support/debug.cpp
@@ -71,7 +71,8 @@ DebugErrorItem errorTags[] = {
 	{ Debug::RTL,       "rtl",       N_("RTL/Bidi")},
 	{ Debug::LOCALE,    "locale",    N_("Locale/Internationalisation")},
 	{ Debug::SELECTION, "selection", N_("Selection copy/paste mechanism")},
-	{ Debug::FIND,      "find",      N_("Find and replace mechanism")},
+	{ Debug::FIND,      "find",      N_("Find and replace mechanism, short version")},
+	{ Debug::FINDVERBOSE,"findverbose", N_("Find and replace mechanism, verbose version")},
 	{ Debug::DEBUG,     "debug",     N_("Developers' general debug messages")},
 	{ Debug::ANY,       "any",       N_("All debugging messages")},
 	{ Debug::ANY,       "all",       N_("All debugging messages")}
@@ -193,7 +194,7 @@ void Debug::showLevel(ostream & os, Debug::Type level)
 void Debug::showTags(ostream & os)
 {
 	for (DebugErrorItem const & item : errorTags)
-		os << setw(10) << static_cast<unsigned int>(item.level)
+		os << setw(12) << static_cast<Debug::base_type>(item.level)
 		   << setw(13) << item.name
 		   << "  " << to_utf8(_(item.desc)) << '\n';
 	os.flush();
@@ -212,7 +213,7 @@ void LyXErr::enable()
 }
 
 
-bool LyXErr::debugging(Debug::Type t) const
+bool LyXErr::debugging(Debug::base_type t) const
 {
 	return (dt_ & t);
 }
diff --git a/src/support/debug.h b/src/support/debug.h
index 18dd5fa..681ef3f 100644
--- a/src/support/debug.h
+++ b/src/support/debug.h
@@ -37,7 +37,8 @@ namespace lyx {
 ///  This is all the different debug levels that we have.
 namespace Debug {
 	///
-	enum Type {
+	typedef uint64_t base_type;
+	enum Type : base_type {
 		///
 		NONE = 0,
 		///
@@ -103,9 +104,11 @@ namespace Debug {
 		/// Find and Replace
 		FIND       = (1u << 30),
 		///
-		DEBUG      = (1u << 31),
+		FINDVERBOSE= (1u << 31),
 		///
-		ANY = 0xffffffff
+		DEBUG      = (1L << 32),
+		///
+		ANY = 0x1ffffffff
 	};
 
 	/// Return number of levels
@@ -179,7 +182,7 @@ public:
 	/// Returns the current debug level
 	Debug::Type level() const { return dt_; }
 	/// Returns true if t is part of the current debug level
-	bool debugging(Debug::Type t = Debug::ANY) const;
+	bool debugging(Debug::base_type t = Debug::ANY) const;
 
 	///
 	static char const * stripName(char const *);

-----------------------------------------------------------------------

Summary of changes:
 po/de.po                            |   34 ++++---
 po/fr.gmo                           |  Bin 627646 -> 627801 bytes
 po/fr.po                            |   68 ++++++++-------
 po/{fr.gmo => messages.mo}          |  Bin 627646 -> 627646 bytes
 po/sk.po                            |   17 +++-
 src/frontends/qt/FindAndReplace.cpp |   22 +++---
 src/lyxfind.cpp                     |  165 +++++++++++++++++------------------
 src/support/debug.cpp               |    7 +-
 src/support/debug.h                 |   11 ++-
 9 files changed, 171 insertions(+), 153 deletions(-)
 copy po/{fr.gmo => messages.mo} (100%)


hooks/post-receive
-- 
Repository for new features



More information about the lyx-cvs mailing list