Re: [LyX/master] Clarify debug message

2022-03-01 Thread Thibaut Cuvelier
On Tue, 1 Mar 2022 at 13:52, Jürgen Spitzmüller  wrote:

> Am Di., 1. März 2022 um 13:51 Uhr schrieb Jürgen Spitzmüller <
> sp...@lyx.org>:
>
>> Am Di., 1. März 2022 um 04:19 Uhr schrieb Thibaut Cuvelier <
>> tcuvel...@lyx.org>:
>>
>>> On Tue, 1 Mar 2022 at 03:58, Thibaut Cuvelier  wrote:
>>>
 On Mon, 28 Feb 2022 at 08:04, Jürgen Spitzmüller  wrote:

> Am Sonntag, dem 27.02.2022 um 20:48 +0100 schrieb Thibaut Cuvelier:
> > I'm doing this in the attached patches (also for HTML, XML being the
> > common part between the two). I would like some feedback more
> > specifically for the typing of the enum: as I could find, it's never
> > sure that enums are coded with enough bits to add a code (there are
> > already enough codes to fill 32 bits). I thus forced the types to be
> > unsigned long long, to have 64 available bits
> > (https://en.cppreference.com/w/cpp/language/types).
> >
> > I also tried to change as many occurrences I could find, but there
> > were not many (or my searching skills are not on par).
>
> Thinking more about it, another option would be to rename LATEX to
> something more generic (e.g. OUTFILE), maybe keeping "latex" as an
> alias on the command line. After all, only one of these is used at a
> given time, and depending on the output chain, it might not even be
> clear which one. Also, we do not have a PLAINTEXT mode.
>

 What do you think about this new iteration?

>>>
>>> I forgot to include the changes to debug.cpp in the previous patch, here
>>> is a new complete patch.
>>>
>>
>> Looks good. I would probably rephrase the help text as "Output source
>> file generation/processing"
>>
>
> ... and add an alias "latex" for backwards compatibility, like we have for
> "any" and "all".
>

I've pushed the updated patch, thanks :)!
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: [LyX/master] Clarify debug message

2022-03-01 Thread Jürgen Spitzmüller
Am Di., 1. März 2022 um 13:51 Uhr schrieb Jürgen Spitzmüller :

> Am Di., 1. März 2022 um 04:19 Uhr schrieb Thibaut Cuvelier <
> tcuvel...@lyx.org>:
>
>> On Tue, 1 Mar 2022 at 03:58, Thibaut Cuvelier  wrote:
>>
>>> On Mon, 28 Feb 2022 at 08:04, Jürgen Spitzmüller  wrote:
>>>
 Am Sonntag, dem 27.02.2022 um 20:48 +0100 schrieb Thibaut Cuvelier:
 > I'm doing this in the attached patches (also for HTML, XML being the
 > common part between the two). I would like some feedback more
 > specifically for the typing of the enum: as I could find, it's never
 > sure that enums are coded with enough bits to add a code (there are
 > already enough codes to fill 32 bits). I thus forced the types to be
 > unsigned long long, to have 64 available bits
 > (https://en.cppreference.com/w/cpp/language/types).
 >
 > I also tried to change as many occurrences I could find, but there
 > were not many (or my searching skills are not on par).

 Thinking more about it, another option would be to rename LATEX to
 something more generic (e.g. OUTFILE), maybe keeping "latex" as an
 alias on the command line. After all, only one of these is used at a
 given time, and depending on the output chain, it might not even be
 clear which one. Also, we do not have a PLAINTEXT mode.

>>>
>>> What do you think about this new iteration?
>>>
>>
>> I forgot to include the changes to debug.cpp in the previous patch, here
>> is a new complete patch.
>>
>
> Looks good. I would probably rephrase the help text as "Output source file
> generation/processing"
>

... and add an alias "latex" for backwards compatibility, like we have for
"any" and "all".

Jürgen


>
> Thanks,
> Jürgen
>
>
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: [LyX/master] Clarify debug message

2022-03-01 Thread Jürgen Spitzmüller
Am Di., 1. März 2022 um 04:19 Uhr schrieb Thibaut Cuvelier <
tcuvel...@lyx.org>:

> On Tue, 1 Mar 2022 at 03:58, Thibaut Cuvelier  wrote:
>
>> On Mon, 28 Feb 2022 at 08:04, Jürgen Spitzmüller  wrote:
>>
>>> Am Sonntag, dem 27.02.2022 um 20:48 +0100 schrieb Thibaut Cuvelier:
>>> > I'm doing this in the attached patches (also for HTML, XML being the
>>> > common part between the two). I would like some feedback more
>>> > specifically for the typing of the enum: as I could find, it's never
>>> > sure that enums are coded with enough bits to add a code (there are
>>> > already enough codes to fill 32 bits). I thus forced the types to be
>>> > unsigned long long, to have 64 available bits
>>> > (https://en.cppreference.com/w/cpp/language/types).
>>> >
>>> > I also tried to change as many occurrences I could find, but there
>>> > were not many (or my searching skills are not on par).
>>>
>>> Thinking more about it, another option would be to rename LATEX to
>>> something more generic (e.g. OUTFILE), maybe keeping "latex" as an
>>> alias on the command line. After all, only one of these is used at a
>>> given time, and depending on the output chain, it might not even be
>>> clear which one. Also, we do not have a PLAINTEXT mode.
>>>
>>
>> What do you think about this new iteration?
>>
>
> I forgot to include the changes to debug.cpp in the previous patch, here
> is a new complete patch.
>

Looks good. I would probably rephrase the help text as "Output source file
generation/processing"

Thanks,
Jürgen
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: [LyX/master] Clarify debug message

2022-02-28 Thread Thibaut Cuvelier
On Tue, 1 Mar 2022 at 03:58, Thibaut Cuvelier  wrote:

> On Mon, 28 Feb 2022 at 08:04, Jürgen Spitzmüller  wrote:
>
>> Am Sonntag, dem 27.02.2022 um 20:48 +0100 schrieb Thibaut Cuvelier:
>> > I'm doing this in the attached patches (also for HTML, XML being the
>> > common part between the two). I would like some feedback more
>> > specifically for the typing of the enum: as I could find, it's never
>> > sure that enums are coded with enough bits to add a code (there are
>> > already enough codes to fill 32 bits). I thus forced the types to be
>> > unsigned long long, to have 64 available bits
>> > (https://en.cppreference.com/w/cpp/language/types).
>> >
>> > I also tried to change as many occurrences I could find, but there
>> > were not many (or my searching skills are not on par).
>>
>> Thinking more about it, another option would be to rename LATEX to
>> something more generic (e.g. OUTFILE), maybe keeping "latex" as an
>> alias on the command line. After all, only one of these is used at a
>> given time, and depending on the output chain, it might not even be
>> clear which one. Also, we do not have a PLAINTEXT mode.
>>
>
> What do you think about this new iteration?
>

I forgot to include the changes to debug.cpp in the previous patch, here is
a new complete patch.


0001-Rename-LATEX-debug-level-to-OUTFILE-and-use-it-for-D.patch
Description: Binary data
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: [LyX/master] Clarify debug message

2022-02-28 Thread Thibaut Cuvelier
On Mon, 28 Feb 2022 at 08:04, Jürgen Spitzmüller  wrote:

> Am Sonntag, dem 27.02.2022 um 20:48 +0100 schrieb Thibaut Cuvelier:
> > I'm doing this in the attached patches (also for HTML, XML being the
> > common part between the two). I would like some feedback more
> > specifically for the typing of the enum: as I could find, it's never
> > sure that enums are coded with enough bits to add a code (there are
> > already enough codes to fill 32 bits). I thus forced the types to be
> > unsigned long long, to have 64 available bits
> > (https://en.cppreference.com/w/cpp/language/types).
> >
> > I also tried to change as many occurrences I could find, but there
> > were not many (or my searching skills are not on par).
>
> Thinking more about it, another option would be to rename LATEX to
> something more generic (e.g. OUTFILE), maybe keeping "latex" as an
> alias on the command line. After all, only one of these is used at a
> given time, and depending on the output chain, it might not even be
> clear which one. Also, we do not have a PLAINTEXT mode.
>

What do you think about this new iteration?


0001-Rename-LATEX-debug-level-to-OUTFILE-and-use-it-for-D.patch
Description: Binary data
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: [LyX/master] Clarify debug message

2022-02-27 Thread Jürgen Spitzmüller
Am Sonntag, dem 27.02.2022 um 20:48 +0100 schrieb Thibaut Cuvelier:
> I'm doing this in the attached patches (also for HTML, XML being the
> common part between the two). I would like some feedback more
> specifically for the typing of the enum: as I could find, it's never
> sure that enums are coded with enough bits to add a code (there are
> already enough codes to fill 32 bits). I thus forced the types to be
> unsigned long long, to have 64 available bits
> (https://en.cppreference.com/w/cpp/language/types).
> 
> I also tried to change as many occurrences I could find, but there
> were not many (or my searching skills are not on par).

Thinking more about it, another option would be to rename LATEX to
something more generic (e.g. OUTFILE), maybe keeping "latex" as an
alias on the command line. After all, only one of these is used at a
given time, and depending on the output chain, it might not even be
clear which one. Also, we do not have a PLAINTEXT mode.

Jürgen



signature.asc
Description: This is a digitally signed message part
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: [LyX/master] Clarify debug message

2022-02-27 Thread Thibaut Cuvelier
On Sun, 27 Feb 2022 at 15:16, Jürgen Spitzmüller  wrote:

> Thibaut, you might want to introduce a Debug::DOCBOOK mode rather than
> sending these messages over all channels (also, in other cases, the
> docbook chain uses Debug::LATEX which strikes me odd).
>

I'm doing this in the attached patches (also for HTML, XML being the common
part between the two). I would like some feedback more specifically for the
typing of the enum: as I could find, it's never sure that enums are coded
with enough bits to add a code (there are already enough codes to fill 32
bits). I thus forced the types to be unsigned long long, to have 64
available bits (https://en.cppreference.com/w/cpp/language/types).

I also tried to change as many occurrences I could find, but there were not
many (or my searching skills are not on par).


0001-Introduce-DocBook-and-HTML-debug-levels.patch
Description: Binary data


0002-Output-DocBook-HTML-and-XML-errors-to-their-correspo.patch
Description: Binary data
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: [LyX/master] Clarify debug message

2022-02-27 Thread Jürgen Spitzmüller
Thibaut, you might want to introduce a Debug::DOCBOOK mode rather than
sending these messages over all channels (also, in other cases, the
docbook chain uses Debug::LATEX which strikes me odd).

Jürgen


Am Sonntag, dem 27.02.2022 um 14:39 +0100 schrieb Juergen Spitzmueller:
> commit 9cd479a044e76601d3ad625181918c26c4e551b0
> Author: Juergen Spitzmueller 
> Date:   Sun Feb 27 15:12:33 2022 +0100
> 
>     Clarify debug message
> ---
>  src/Floating.cpp |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/Floating.cpp b/src/Floating.cpp
> index 6a14708..8554503 100644
> --- a/src/Floating.cpp
> +++ b/src/Floating.cpp
> @@ -69,7 +69,7 @@ Floating::Floating(string const & type, string
> const & placement,
> docbook_float_type_ = "video";
> } else {
> // If nothing matches, return something that
> will not be valid.
> -   LYXERR0("Unrecognised float type: " +
> floattype_);
> +   LYXERR0("Float type '" + floattype_ + "'
> unknown to DocBook!");
> docbook_float_type_ = "unknown";
> }
> }
> @@ -159,7 +159,7 @@ string Floating::docbookTag(bool hasTitle) const
> return hasTitle ? "table" : "informaltable";
> } else {
> // If nothing matches, return something that will not
> be valid.
> -   LYXERR0("Unrecognised float type: " + floattype());
> +   LYXERR0("Float type '" + floattype() + "' unknown to
> DocBook!");
> return "float";
> }
>  }



signature.asc
Description: This is a digitally signed message part
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel