Re: [LyX/master] Amend bea7ef04e (find's auto-wrap by default)

2021-12-15 Thread Scott Kostyshak
On Thu, Dec 16, 2021 at 02:26:13AM +0100, Scott Kostyshak wrote:
> commit 056ab33f4892d522a154273324dafda08f674bfd
> Author: Scott Kostyshak 
> Date:   Wed Dec 15 20:48:20 2021 -0500
> 
> Amend bea7ef04e (find's auto-wrap by default)
> 
> The default in the .ui is not considered in
> GuiSearchWidget::restoreSession(), which sets a hard-coded default
> if the stored setting is not found in the session file.
> 
> I'll start an ML discussion for whether the code in restoreSession()
> should use the ui's default if the setting is not found in the
> session.
> ---
>  src/frontends/qt/GuiSearch.cpp |4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/frontends/qt/GuiSearch.cpp b/src/frontends/qt/GuiSearch.cpp
> index b071d61..e387ce8 100644
> --- a/src/frontends/qt/GuiSearch.cpp
> +++ b/src/frontends/qt/GuiSearch.cpp
> @@ -555,8 +555,8 @@ void GuiSearchWidget::restoreSession(QString const & 
> session_key)
>   act_wholewords_->setChecked(settings.value(session_key + "/words", 
> false).toBool());
>   instantSearchCB->setChecked(settings.value(session_key + "/instant", 
> false).toBool());
>   act_immediate_->setChecked(settings.value(session_key + "/instant", 
> false).toBool());
> - wrapCB->setChecked(settings.value(session_key + "/wrap", 
> false).toBool());
> - act_wrap_->setChecked(settings.value(session_key + "/wrap", 
> false).toBool());
> + wrapCB->setChecked(settings.value(session_key + "/wrap", 
> true).toBool());
> + act_wrap_->setChecked(settings.value(session_key + "/wrap", 
> true).toBool());
>   selectionCB->setChecked(settings.value(session_key + "/selection", 
> false).toBool());
>   act_selection_->setChecked(settings.value(session_key + "/selection", 
> false).toBool());
>   minimized_ = settings.value(session_key + "/minimized", false).toBool();

If this code does not find an entry in the session file, it then uses
the hard-coded setting here (this is what the commit changes from false
to true). Would it make sense to instead just use the default that is
set in the .ui file?

On the one hand, it took me a while to figure why the .ui file's
settings were ignored. On the other hand, I suppose it is nice to have
all of the defaults here now that I know where to look.

Scott


signature.asc
Description: PGP signature
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Enable editing in preview pane for "LyX" format?

2021-12-15 Thread Scott Kostyshak
On Wed, Dec 15, 2021 at 04:53:37PM -0500, Richard Kimberly Heck wrote:
> On 12/15/21 12:05, Pavel Sanda wrote:
> > On Wed, Dec 15, 2021 at 10:13:33AM -0500, Scott Kostyshak wrote:
> > > We have the option to show the LyX format in the preview window. We also
> > > have the functionality to reload a LyX document (e.g., if it is changed
> > > externally). Would it be reasonable to allow editing of the LyX format
> > > in the preview window?
> > > 
> > > It seems feasible to implement, but I think the main question is whether
> > > it would actually be useful and I'm not sure.
> > How are you going to guard against crashes when reloading wrong data?
> 
> Yes, this looks dangerous to me, and I'm not sure how useful it would be,
> for the reasons Thibaut gave.

Good points, everyone. Thank you for the feedback! Indeed I did not
think through it well, and there are not any strong use cases that I
know of.

Scott


signature.asc
Description: PGP signature
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Enable editing in preview pane for "LyX" format?

2021-12-15 Thread Richard Kimberly Heck

On 12/15/21 12:05, Pavel Sanda wrote:

On Wed, Dec 15, 2021 at 10:13:33AM -0500, Scott Kostyshak wrote:

We have the option to show the LyX format in the preview window. We also
have the functionality to reload a LyX document (e.g., if it is changed
externally). Would it be reasonable to allow editing of the LyX format
in the preview window?

It seems feasible to implement, but I think the main question is whether
it would actually be useful and I'm not sure.

How are you going to guard against crashes when reloading wrong data?


Yes, this looks dangerous to me, and I'm not sure how useful it would 
be, for the reasons Thibaut gave.



Riki


--
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Enable editing in preview pane for "LyX" format?

2021-12-15 Thread Richard Kimberly Heck

On 12/15/21 10:24, Thibaut Cuvelier wrote:



In terms of reloading, I think it would be better to have the 
possibility to reload layouts when they are changed,


This can be done already: LFUN_LAYOUT_RELOAD.

Riki

-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Line Breaking Bug

2021-12-15 Thread Richard Kimberly Heck

On 12/15/21 05:25, Jean-Marc Lasgouttes wrote:

Le 14/12/2021 à 09:24, Richard Kimberly Heck a écrit :
In the attached file, the word "arithmetic" at the very end of the 
body, gets repeated. You may need to adjust the width of the window 
to see it.


Amusing bug :)

Should be fixed after 62ad205dbf9.


Looks fixed.

Riki


--
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Enable editing in preview pane for "LyX" format?

2021-12-15 Thread Pavel Sanda
On Wed, Dec 15, 2021 at 10:13:33AM -0500, Scott Kostyshak wrote:
> We have the option to show the LyX format in the preview window. We also
> have the functionality to reload a LyX document (e.g., if it is changed
> externally). Would it be reasonable to allow editing of the LyX format
> in the preview window?
> 
> It seems feasible to implement, but I think the main question is whether
> it would actually be useful and I'm not sure.

How are you going to guard against crashes when reloading wrong data?
Pavel

-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Enable editing in preview pane for "LyX" format?

2021-12-15 Thread Thibaut Cuvelier
On Wed, 15 Dec 2021 at 16:14, Scott Kostyshak  wrote:

> We have the option to show the LyX format in the preview window. We also
> have the functionality to reload a LyX document (e.g., if it is changed
> externally). Would it be reasonable to allow editing of the LyX format
> in the preview window?
>
> It seems feasible to implement, but I think the main question is whether
> it would actually be useful and I'm not sure.
>

If you start going in that direction, why wouldn't you allow editing the
generated LaTeX code (or HTML, or DocBook, or whatever is supported in the
preview window) to have an impact on the LyX document? That would seem to
be a reasonable expectation from users. However, from an implementation
perspective, that would be much harder... Moreover, I don't really see the
added value. It's not like Microsoft Word & co, where the GUI doesn't give
a full and easy access to the possibilities of the file format.

In terms of reloading, I think it would be better to have the possibility
to reload layouts when they are changed, but the benefit would mostly be
for developers (and some power users).

However, as you mention it, I would find a related feature much more
interesting to implement, as it would help people collaborating on the same
document (with tools like Dropbox) --- or you happen to forget you already
have opened the same document on your computer within another instance of
LyX (that happens quite often to me): when reloading a LyX document, if the
current version has changes, propose to merge both documents, so that you
have the new changes from the reloaded document and the ones you made
before saving. Git already implements the same scenario: you pull a remote
commit while you have a local change committed separately, you must merge
both (or create a branch).
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Enable editing in preview pane for "LyX" format?

2021-12-15 Thread Scott Kostyshak
We have the option to show the LyX format in the preview window. We also
have the functionality to reload a LyX document (e.g., if it is changed
externally). Would it be reasonable to allow editing of the LyX format
in the preview window?

It seems feasible to implement, but I think the main question is whether
it would actually be useful and I'm not sure.

Scott


signature.asc
Description: PGP signature
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Cursor stuck ahead of footnote in 2.4

2021-12-15 Thread Pavel Sanda
On Wed, Dec 15, 2021 at 11:33:11AM +0100, Jean-Marc Lasgouttes wrote:
> This seems fixed by the fix to the other problem. Can you confirm?

Looks good here. Pavel
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Text entered at different place than cursor

2021-12-15 Thread Scott Kostyshak
In the attached example, there is a space between the main text and the
note inset. If I put the cursor at the end of the second visual line
(see the screenshot for what I refer to visual lines), it appears to be
after the space, but if I enter text it is entered before the space.

JMarc, I'm guessing this is for you?


cursor-diff-from-entry.23.lyx
Description: application/lyx


signature.asc
Description: PGP signature
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Cursor stuck ahead of footnote in 2.4

2021-12-15 Thread Kornel Benko
Am Wed, 15 Dec 2021 11:33:11 +0100
schrieb Jean-Marc Lasgouttes :

> Le 13/12/2021 à 23:38, Pavel Sanda a écrit :
> > Hi,
> > 
> > - open user guide in 2.4
> > - go to the beginning of the document
> > - hold arrow down on your keyboard
> > 
> > Cursor gets stuck at the line ahead of footnote 1 and does not move
> > downwards anymore.  
> 
> This seems fixed by the fix to the other problem. Can you confirm?
> 
> JMarc

Yes, but the cursor is now stepping behind the footnote. Using arrow up, the 
cursor
enters the footnote. Feels not consistent to me.

Kornel


pgpu9eChp58fK.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Footnote size is larger on master (\normalsize is prepended)

2021-12-15 Thread Jean-Marc Lasgouttes

Le 09/12/2021 à 05:14, Scott Kostyshak a écrit :

I did some brief tests on other documents and it works fine from what I
can see. Small typo: "an non" -> "a non".


Thanks.


What else could I try to be convinced that it works? Do we have font torture
tests?


What would font torture tests do? Do you mean different font families,
or documents with things like \textbf{\textit{...{blah}}}?


More like insets that inherit outside fonts in the wrong way (like the 
footnote example).



We do have documents with lots of different languages (and thus
scripts). If this is what you're looking for, look at the files
autotests/export/latex/languages/supported-languages*.lyx


More like nesting of insets in weird situations.

Jürgen, could you take a look at the patch and tell me what you think of 
the approach at least? I have this feeling that we disagree about the 
meaning of all this.


JMarc
--
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Cursor stuck ahead of footnote in 2.4

2021-12-15 Thread Jean-Marc Lasgouttes

Le 13/12/2021 à 23:38, Pavel Sanda a écrit :

Hi,

- open user guide in 2.4
- go to the beginning of the document
- hold arrow down on your keyboard

Cursor gets stuck at the line ahead of footnote 1 and does not move
downwards anymore.


This seems fixed by the fix to the other problem. Can you confirm?

JMarc
--
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Line Breaking Bug

2021-12-15 Thread Jean-Marc Lasgouttes

Le 14/12/2021 à 09:24, Richard Kimberly Heck a écrit :
In the attached file, the word "arithmetic" at the very end of the body, 
gets repeated. You may need to adjust the width of the window to see it.


Amusing bug :)

Should be fixed after 62ad205dbf9.

I suspects this will also fix the "cursor stuck" issue, but I have to check.

JMarc
--
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel