Re: [LyX/master] Meet per-document spelling dictionaries (fixes #86 [sic!])

2021-03-07 Thread Jürgen Spitzmüller
Am Sonntag, dem 07.03.2021 um 20:55 +0100 schrieb Stephan Witt:
> To reproduce I
> 
> 1. Open the Help -> Intro.
> 2. Boom.

Is it related to the darkmode runtime switch we recently added? You
backtrace points towards that code region.

In any case, you can try bisecting.

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] Fix bug #12181

2021-03-07 Thread Enrico Forestieri
On Sun, Mar 07, 2021 at 01:05:09PM -0500, Richard Kimberly Heck wrote:
> On 3/6/21 5:34 PM, Enrico Forestieri wrote:
> > commit 7545698380fa4d0203109d340404574c20aad1bc
> > Author: Enrico Forestieri 
> > Date:   Sat Mar 6 23:36:58 2021 +0100
> >
> > Fix bug #12181
> > 
> > The context menu for InsetMathRef is now usable.
> > InsetMathRef still misses support for RefStyle and thus the
> > corresponding entries are omitted from the menu. But this would
> > be a different bug.
> 
> I thought I fixed that?

Sorry, this is not my league. I didn't succeed in accessing the refstyle
parameters in order to be able to activate or not the corresponding menu
entries. I have no idea what was fixed and I would be grateful if
someone in the know helps with this.

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


Re: [LyX/master] Meet per-document spelling dictionaries (fixes #86 [sic!])

2021-03-07 Thread Stephan Witt
Am 07.03.2021 um 20:08 schrieb Stephan Witt :
> 
>> Am 07.03.2021 um 19:09 schrieb Jürgen Spitzmüller :
>> 
>> Am Sonntag, dem 07.03.2021 um 18:58 +0100 schrieb Stephan Witt:
>>> From the dictionary.
>> 
>> Thanks. Cannot reproduce. Can you try to dig in deeper?
> 
> How? The exception comes from „outer space“ …

I can say it’s absolutely unrelated.

To reproduce I

1. Open the Help -> Intro.
2. Boom.

Stephan

> 
> This is the program output:
> 
> ==
> LyX hat einen Fehler (Exception) entdeckt. Das Programm wird jetzt versuchen, 
> alle ungespeicherten Dateien zu speichern, und dann beendet.
> 
> Exception: basic_string
> ==
> 
> Stephan

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


Re: [LyX/master] Meet per-document spelling dictionaries (fixes #86 [sic!])

2021-03-07 Thread Stephan Witt


> Am 07.03.2021 um 19:09 schrieb Jürgen Spitzmüller :
> 
> Am Sonntag, dem 07.03.2021 um 18:58 +0100 schrieb Stephan Witt:
>> From the dictionary.
> 
> Thanks. Cannot reproduce. Can you try to dig in deeper?

How? The exception comes from „outer space“ …

This is the program output:

==
LyX hat einen Fehler (Exception) entdeckt. Das Programm wird jetzt versuchen, 
alle ungespeicherten Dateien zu speichern, und dann beendet.

Exception: basic_string
==

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


Re: [LyX/master] Meet per-document spelling dictionaries (fixes #86 [sic!])

2021-03-07 Thread Jürgen Spitzmüller
Am Sonntag, dem 07.03.2021 um 18:58 +0100 schrieb Stephan Witt:
> From the dictionary.

Thanks. Cannot reproduce. Can you try to dig in deeper?

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] Fix bug #12181

2021-03-07 Thread Richard Kimberly Heck
On 3/6/21 5:34 PM, Enrico Forestieri wrote:
> commit 7545698380fa4d0203109d340404574c20aad1bc
> Author: Enrico Forestieri 
> Date:   Sat Mar 6 23:36:58 2021 +0100
>
> Fix bug #12181
> 
> The context menu for InsetMathRef is now usable.
> InsetMathRef still misses support for RefStyle and thus the
> corresponding entries are omitted from the menu. But this would
> be a different bug.

I thought I fixed that?

Riki


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


Re: [LyX/master] Show zoom value in statusbar

2021-03-07 Thread Kornel Benko
Am Sun, 07 Mar 2021 18:37:10 +0100
schrieb Jürgen Spitzmüller :

> Am Sonntag, dem 07.03.2021 um 17:48 +0100 schrieb Kornel Benko:
> > Status bar shows it OK, but the slider is not updating if changing
> > zoom with the mouse.  
> 
> Fixed.
> 
> Jürgen
> 

Works nice. Thanks.

Kornel


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


Re: [LyX/master] Meet per-document spelling dictionaries (fixes #86 [sic!])

2021-03-07 Thread Stephan Witt
Am 07.03.2021 um 18:50 schrieb Jürgen Spitzmüller :
> 
> Am Sonntag, dem 07.03.2021 um 18:48 +0100 schrieb Stephan Witt:
>> To reproduce I do:
>> 
>> 1. Open the attached document.
>> 2. Remove the second unrrund.
>> 3. Navigate and type some text. Boom.
> 
> What do you mean by "remove"? Remove from the dictionary or delete the
> word in the document?

From the dictionary.

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


Re: [LyX/master] Meet per-document spelling dictionaries (fixes #86 [sic!])

2021-03-07 Thread Jürgen Spitzmüller
Am Sonntag, dem 07.03.2021 um 18:48 +0100 schrieb Stephan Witt:
> To reproduce I do:
> 
> 1. Open the attached document.
> 2. Remove the second unrrund.
> 3. Navigate and type some text. Boom.

What do you mean by "remove"? Remove from the dictionary or delete the
word in the document?

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] Meet per-document spelling dictionaries (fixes #86 [sic!])

2021-03-07 Thread Stephan Witt
Am 07.03.2021 um 18:24 schrieb Jürgen Spitzmüller :
> 
> Am Sonntag, dem 07.03.2021 um 17:55 +0100 schrieb Jürgen Spitzmüller:
>> But I'll implement another lfun along this way.
> 
> Done.
> 
> Jürgen

Thanks.

Is this crash related? Hard to say…

(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
frame #0: 0x7fff6dc5d2c2 libsystem_kernel.dylib`__pthread_kill + 10
frame #1: 0x000105abe80d libsystem_pthread.dylib`pthread_kill + 284
frame #2: 0x7fff6dbc76a6 libsystem_c.dylib`abort + 127
  * frame #3: 0x00010039d8ff LyX`lyx::lyx_exit(exit_code=1) at LyX.cpp:272:2
frame #4: 0x000100be9918 
LyX`lyx::frontend::GuiApplication::notify(this=0x000107b417d0, 
receiver=0x000126c6cd90, event=0x7ffeefbfce10) at 
GuiApplication.cpp:2946:3
frame #5: 0x0001055bdb44 
QtCore`QCoreApplication::notifyInternal2(QObject*, QEvent*) + 212
frame #6: 0x000104812b1d 
QtWidgets`QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint 
const&, int, QPainter*, QWidgetBackingStore*) + 2989
frame #7: 0x0001047ec738 QtWidgets`QWidgetBackingStore::doSync() + 4616
frame #8: 0x000104819ceb QtWidgets`QWidget::event(QEvent*) + 1643
frame #9: 0x000104929304 QtWidgets`QMainWindow::event(QEvent*) + 276
frame #10: 0x000100f0b051 
LyX`lyx::frontend::GuiView::event(this=0x00012441ab60, 
e=0x0001078c7d50) at GuiView.cpp:1533:23
frame #11: 0x0001047dee60 
QtWidgets`QApplicationPrivate::notify_helper(QObject*, QEvent*) + 272
frame #12: 0x0001047e0215 QtWidgets`QApplication::notify(QObject*, 
QEvent*) + 581
frame #13: 0x000100be9763 
LyX`lyx::frontend::GuiApplication::notify(this=0x000107b417d0, 
receiver=0x00012441ab60, event=0x0001078c7d50) at 
GuiApplication.cpp:2907:24
frame #14: 0x0001055bdb44 
QtCore`QCoreApplication::notifyInternal2(QObject*, QEvent*) + 212
frame #15: 0x0001055bec56 
QtCore`QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) + 
774
frame #16: 0x000107cbeba2 
libqcocoa.dylib`QCocoaEventDispatcherPrivate::processPostedEvents() + 322
frame #17: 0x000107cbf2a8 
libqcocoa.dylib`QCocoaEventDispatcherPrivate::postedEventsSourceCallback(void*) 
+ 40
frame #18: 0x7fff41b5ad13 
CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
frame #19: 0x7fff41b5acb9 CoreFoundation`__CFRunLoopDoSource0 + 108
frame #20: 0x7fff41b3e5af CoreFoundation`__CFRunLoopDoSources0 + 195
frame #21: 0x7fff41b3db79 CoreFoundation`__CFRunLoopRun + 1189
frame #22: 0x7fff41b3d482 CoreFoundation`CFRunLoopRunSpecific + 455
frame #23: 0x7fff40d9c1ab HIToolbox`RunCurrentEventLoopInMode + 292
frame #24: 0x7fff40d9bee5 HIToolbox`ReceiveNextEventCommon + 603
frame #25: 0x7fff40d9bc76 
HIToolbox`_BlockUntilNextEventMatchingListInModeWithFilter + 64
frame #26: 0x7fff3f13377d AppKit`_DPSNextEvent + 1135
frame #27: 0x7fff3f13246b AppKit`-[NSApplication(NSEvent) 
_nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1361
frame #28: 0x7fff3f12c588 AppKit`-[NSApplication run] + 699
frame #29: 0x000107cbe108 
libqcocoa.dylib`QCocoaEventDispatcher::processEvents(QFlags)
 + 2648
frame #30: 0x0001055b928f 
QtCore`QEventLoop::exec(QFlags) + 431
frame #31: 0x0001055be192 QtCore`QCoreApplication::exec() + 130
frame #32: 0x000100be7b36 
LyX`lyx::frontend::GuiApplication::exec(this=0x000107b417d0) at 
GuiApplication.cpp:2666:9
frame #33: 0x00010039e512 LyX`lyx::LyX::exec(this=0x7ffeefbff390, 
argc=0x7ffeefbff3a8, argv=0x7ffeefbff3d0) at LyX.cpp:397:39
frame #34: 0x0001006179d6 LyX`main(argc=1, argv=0x7ffeefbff3d0) at 
main.cpp:42:26
frame #35: 0x7fff6db223d5 libdyld.dylib`start + 1
(lldb) 

To reproduce I do:

1. Open the attached document.
2. Remove the second unrrund.
3. Navigate and type some text. Boom.

Stephan



Spellcheck-1.lyx
Description: Binary data
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: [LyX/master] French User Guide: fix file paths

2021-03-07 Thread Scott Kostyshak
On Sun, Mar 07, 2021 at 09:26:50AM +0100, JP wrote:
> Le 7 mars 2021 06:06:23 Scott Kostyshak  a écrit :
> 
> > On Sun, Mar 07, 2021 at 05:35:58AM +0100, JP wrote:
> > > Dear Scott
> > > 
> > > Thanks for the fix.
> > 
> > Sure!
> > 
> > > What should I do to avoid such file path errors?
> > 
> > It depends on how those path changes got in there. How did you write the
> > file to the master repository location? If you did "save as" then I
> > think that would explain it because in that case LyX would preserve the
> > paths to the 2.3.x files. In that case, the fix is simple: just copy the
> > file outside of LyX from the 2.3.x directory to the master directory.
> > 
> > If you didn't do "save as", then I'm not sure how the paths got changed.
> > If we can't figure it out, it's easy enough to give you some "sed"
> > commands that would take care of fixing the paths, but that is annoying
> > and we'd have to remember to run them each time 2.3.x docs are ported
> > over to master.
> > 
> 
> I guess I opened the file from the master dir like
> lyx-2.4.0dev ../2.3.x/lib/doc/fr/UserGuide.lyx

Ah yes, that explains it. 

> 
> I should open it from its own dir and then copy the file to master,  I'll
> remember it for Additional.

Yes, copy using your file browser, not using LyX. LyX does not know that you 
want to change which images are used, so it makes sense that LyX tries to 
preserve the original image paths.

Scott


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


Re: tex2lyx roundtrip tests broken on master

2021-03-07 Thread Scott Kostyshak
On Sun, Mar 07, 2021 at 08:24:38AM +0100, Jürgen Spitzmüller wrote:
> Am Samstag, dem 06.03.2021 um 14:28 -0500 schrieb Scott Kostyshak:
> > The tex2lyx roundtrip tests are broken on master.
> 
> Fixed. As so often, forgot to update the tests after file format bump.

Thanks for the fix. Indeed, it is hard to remember all the steps when updating 
the format.

Scott


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


Re: [LyX/master] Show zoom value in statusbar

2021-03-07 Thread Jürgen Spitzmüller
Am Sonntag, dem 07.03.2021 um 17:48 +0100 schrieb Kornel Benko:
> Status bar shows it OK, but the slider is not updating if changing
> zoom with the mouse.

Fixed.

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] Meet per-document spelling dictionaries (fixes #86 [sic!])

2021-03-07 Thread Jürgen Spitzmüller
Am Sonntag, dem 07.03.2021 um 17:55 +0100 schrieb Jürgen Spitzmüller:
> But I'll implement another lfun along this way.

Done.

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] Meet per-document spelling dictionaries (fixes #86 [sic!])

2021-03-07 Thread Jürgen Spitzmüller
Am Sonntag, dem 07.03.2021 um 17:56 +0100 schrieb Stephan Witt:
> Or add it to LFUN_SPELLING_REMOVE implementation?

I would rather keep the diverse dictionaries separated.

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] Meet per-document spelling dictionaries (fixes #86 [sic!])

2021-03-07 Thread Stephan Witt
Am 07.03.2021 um 17:55 schrieb Jürgen Spitzmüller :
> 
> Am Sonntag, dem 07.03.2021 um 17:47 +0100 schrieb Stephan Witt:
>> Yes, there is LFUN_SPELLING_REMOVE already.
> 
> I find this rather odd, as you have to know a word is in the dictionary
> in order to remove it.
> 
> But I'll implement another lfun along this way.

Or add it to LFUN_SPELLING_REMOVE implementation?

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


Re: [LyX/master] Meet per-document spelling dictionaries (fixes #86 [sic!])

2021-03-07 Thread Jürgen Spitzmüller
Am Sonntag, dem 07.03.2021 um 17:47 +0100 schrieb Stephan Witt:
> Yes, there is LFUN_SPELLING_REMOVE already.

I find this rather odd, as you have to know a word is in the dictionary
in order to remove it.

But I'll implement another lfun along this way.

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] Meet per-document spelling dictionaries (fixes #86 [sic!])

2021-03-07 Thread Jürgen Spitzmüller
Am Sonntag, dem 07.03.2021 um 17:51 +0100 schrieb Stephan Witt:
> > It did not come yet AFAIR.
> 
> Yes, it was not announced yet.

So we are not in feature freeze.

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] Meet per-document spelling dictionaries (fixes #86 [sic!])

2021-03-07 Thread Stephan Witt
Am 07.03.2021 um 17:36 schrieb Jürgen Spitzmüller :
> 
> Am Sonntag, dem 07.03.2021 um 17:32 +0100 schrieb Stephan Witt:
>>> Are we? I must have missed the announcement. Can you point me to
>>> it?
>> 
>> https://wiki.lyx.org/Devel/Meeting2021-01-11
> 
> This only says "A feature and format freeze is coming soon."
> 
> It did not come yet AFAIR.

Yes, it was not announced yet.

Stephan

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


Re: [LyX/master] Show zoom value in statusbar

2021-03-07 Thread Kornel Benko
Am Sun,  7 Mar 2021 17:16:58 +0100 (CET)
schrieb Juergen Spitzmueller :

> commit be6dc7dd5dc10f79ef2525b2ba77d0b02c46
> Author: Juergen Spitzmueller 
> Date:   Sun Mar 7 17:21:52 2021 +0100
> 
> Show zoom value in statusbar
> ---
>  src/frontends/qt/GuiView.cpp |7 +--
>  src/frontends/qt/GuiView.h   |2 ++
>  2 files changed, 7 insertions(+), 2 deletions(-)

Status bar shows it OK, but the slider is not updating if changing zoom with 
the mouse.

Kornel


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


Re: [LyX/master] Meet per-document spelling dictionaries (fixes #86 [sic!])

2021-03-07 Thread Stephan Witt
Am 07.03.2021 um 17:24 schrieb Jürgen Spitzmüller :
> 
> Am Sonntag, dem 07.03.2021 um 16:53 +0100 schrieb Stephan Witt:
>> No I don’t want to enhance it *now*. We are in feature-freeze IMO.
> 
> Are we? I must have missed the announcement. Can you point me to it?
> 
> (I agree that we should enter feature freeze soon, though).
> 
>> 
>>> I see. Can you try (and maybe play with) the attached patch?
>> 
>> This is better now.
> 
> Goof. Will commit, then.

I did some play before. I’ve commit it.

>> Next problem: I cannot remove the learned word from document
>> dictionary?
>> Should this work?
> 
> No, I haven't implemented this yet. My idea was to allow this via
> document > settings > language. Or do you want and lfun instead/as
> well?

Yes, there is LFUN_SPELLING_REMOVE already.

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


Re: [LyX/master] Meet per-document spelling dictionaries (fixes #86 [sic!])

2021-03-07 Thread Jürgen Spitzmüller
Am Sonntag, dem 07.03.2021 um 17:32 +0100 schrieb Stephan Witt:
> > Are we? I must have missed the announcement. Can you point me to
> > it?
> 
> https://wiki.lyx.org/Devel/Meeting2021-01-11

This only says "A feature and format freeze is coming soon."

It did not come yet AFAIR.

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] Meet per-document spelling dictionaries (fixes #86 [sic!])

2021-03-07 Thread Stephan Witt
Am 07.03.2021 um 17:24 schrieb Jürgen Spitzmüller :
> 
> Am Sonntag, dem 07.03.2021 um 16:53 +0100 schrieb Stephan Witt:
>> No I don’t want to enhance it *now*. We are in feature-freeze IMO.
> 
> Are we? I must have missed the announcement. Can you point me to it?

https://wiki.lyx.org/Devel/Meeting2021-01-11

> (I agree that we should enter feature freeze soon, though).
> 
>> 
>>> I see. Can you try (and maybe play with) the attached patch?
>> 
>> This is better now.
> 
> Goof. Will commit, then.

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


Re: [LyX/master] Meet per-document spelling dictionaries (fixes #86 [sic!])

2021-03-07 Thread Jürgen Spitzmüller
Am Sonntag, dem 07.03.2021 um 16:53 +0100 schrieb Stephan Witt:
> No I don’t want to enhance it *now*. We are in feature-freeze IMO.

Are we? I must have missed the announcement. Can you point me to it?

(I agree that we should enter feature freeze soon, though).

> > > > > 
> > I see. Can you try (and maybe play with) the attached patch?
> 
> This is better now.

Goof. Will commit, then.

> Next problem: I cannot remove the learned word from document
> dictionary?
> Should this work?

No, I haven't implemented this yet. My idea was to allow this via
document > settings > language. Or do you want and lfun instead/as
well?

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] Zoom slider

2021-03-07 Thread Jürgen Spitzmüller
Am Sonntag, dem 07.03.2021 um 13:53 +0100 schrieb Jean-Marc Lasgouttes:
> In libreoffice I see two difference that are IMO very useful:
> 1/ the zoom value is shown beside the slider. Seeing the zoom is very
> useful. At the very least, the tool tip should show the value instead
> of 
> explaining what it does.
> 
> 2/ having a small vertical line at the default level is nice.

This is now both done.

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] Meet per-document spelling dictionaries (fixes #86 [sic!])

2021-03-07 Thread Stephan Witt
Am 07.03.2021 um 14:36 schrieb Jürgen Spitzmüller :
> 
> Am Sonntag, dem 07.03.2021 um 14:04 +0100 schrieb Stephan Witt:
>>> I can't follow you here. Sure it is.
>> 
>> IMO it is a new feature.
> 
> Where did I claim it isn't?
> 
> If you want to enhance it: be invited.

No I don’t want to enhance it *now*. We are in feature-freeze IMO.

> Also, as you say it is marked correctly after context menu
> action,
> there is probably only some call missing here.
 
 Yes, probably.
>>> 
>>> I have just looked again at AppleSpellChecker and really do not see
>>> how
>>> this is so special. Maybe you just need to debug a bit
>>> Paragraph::spellCheck() (the routine which is in if (speller-
 canCheckParagraph())). Well likely just a simple oversight. Check
 for
>>> the return values of speller->check() gathered here. It should be
>>> LEARNED_WORD for the cases in question.
>> 
>> The difference is made by the canCheckParagraph() method of spellers.
> 
> Yes, I know (see my comment above).
> 
>> Paragraph::spellCheck() has different code paths for it.
>> 
>> With paragraph check enabled - see AppleSpellChecker.h - the speller
>> sees the whole sentence as a word and marks one or more words as mis-
>> spelled at once.
> 
> I see. Can you try (and maybe play with) the attached patch?

This is better now.

Next problem: I cannot remove the learned word from document dictionary?
Should this work?

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


Re: [LyX/master] Zoom slider

2021-03-07 Thread Kornel Benko
Am Sun, 07 Mar 2021 14:33:50 +0100
schrieb Jürgen Spitzmüller :

> Am Sonntag, dem 07.03.2021 um 14:18 +0100 schrieb Kornel Benko:
> > I get
> >   
> > > ---/usr2/src/lyx/lyx-git/src/frontends/qt/GuiView.cpp:633:31:
> > > error:  
> > ‘const class  
> > > QFontMetrics’ has no member named ‘horizontalAdvance’  
> >   zoomslider->setFixedWidth(fm.horizontalAdvance('x') * 15);  
> 
> Fixed.
> 
> Jürgen
> 

Yes, thanks.

Kornel


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


Re: [LyX/master] Meet per-document spelling dictionaries (fixes #86 [sic!])

2021-03-07 Thread Jürgen Spitzmüller
Am Sonntag, dem 07.03.2021 um 14:04 +0100 schrieb Stephan Witt:
> > I can't follow you here. Sure it is.
> 
> IMO it is a new feature.

Where did I claim it isn't?

If you want to enhance it: be invited.

> > > > Also, as you say it is marked correctly after context menu
> > > > action,
> > > > there is probably only some call missing here.
> > > 
> > > Yes, probably.
> > 
> > I have just looked again at AppleSpellChecker and really do not see
> > how
> > this is so special. Maybe you just need to debug a bit
> > Paragraph::spellCheck() (the routine which is in if (speller-
> > > canCheckParagraph())). Well likely just a simple oversight. Check
> > > for
> > the return values of speller->check() gathered here. It should be
> > LEARNED_WORD for the cases in question.
> 
> The difference is made by the canCheckParagraph() method of spellers.

Yes, I know (see my comment above).

> Paragraph::spellCheck() has different code paths for it.
> 
> With paragraph check enabled - see AppleSpellChecker.h - the speller
> sees the whole sentence as a word and marks one or more words as mis-
> spelled at once.

I see. Can you try (and maybe play with) the attached patch?

Jürgen
diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp
index 008ed0e461..00d9dc1de4 100644
--- a/src/Paragraph.cpp
+++ b/src/Paragraph.cpp
@@ -460,10 +460,12 @@ public:
 		return numskips;
 	}
 
-	void markMisspelledWords(pos_type const & first, pos_type const & last,
-			 SpellChecker::Result result,
-			 docstring const & word,
-			 SkipPositions const & skips);
+	void markMisspelledWords(Language const * lang,
+ pos_type const & first, pos_type const & last,
+ SpellChecker::Result result,
+ docstring const & word,
+ SkipPositions const & skips,
+ vector const & docdic);
 
 	InsetCode ownerCode() const
 	{
@@ -4924,10 +4926,12 @@ void Paragraph::anonymize()
 
 
 void Paragraph::Private::markMisspelledWords(
+	Language const * lang,
 	pos_type const & first, pos_type const & last,
 	SpellChecker::Result result,
 	docstring const & word,
-	SkipPositions const & skips)
+	SkipPositions const & skips,
+	vector const & docdict)
 {
 	if (!SpellChecker::misspelled(result)) {
 		setMisspelled(first, last, SpellChecker::WORD_OK);
@@ -4945,7 +4949,8 @@ void Paragraph::Private::markMisspelledWords(
 		int wlen = 0;
 		speller->misspelledWord(index, wstart, wlen);
 		/// should not happen if speller supports range checks
-		if (!wlen) continue;
+		if (!wlen)
+			continue;
 		docstring const misspelled = word.substr(wstart, wlen);
 		wstart += first + numskipped;
 		if (snext < wstart) {
@@ -4955,12 +4960,27 @@ void Paragraph::Private::markMisspelledWords(
 wstart - 1, SpellChecker::WORD_OK);
 		}
 		snext = wstart + wlen;
+		vector::const_iterator iit = docdict.begin();
+		SpellChecker::Result actresult = result;
+		for (; iit != docdict.end(); ++iit) {
+			if (iit->lang()->code() != lang->code())
+continue;
+			if (iit->word() == misspelled) {
+actresult = SpellChecker::WORD_OK;
+break;
+			}
+		}
 		numskipped += countSkips(it, et, snext);
 		/// mark the range of misspelling
-		setMisspelled(wstart, snext, result);
-		LYXERR(Debug::GUI, "misspelled word: \"" <<
-			   misspelled << "\" [" <<
-			   wstart << ".." << (snext-1) << "]");
+		setMisspelled(wstart, snext, actresult);
+		if (actresult == SpellChecker::WORD_OK)
+			LYXERR(Debug::GUI, "local dictionary word: \"" <<
+   misspelled << "\" [" <<
+   wstart << ".." << (snext-1) << "]");
+		else
+			LYXERR(Debug::GUI, "misspelled word: \"" <<
+   misspelled << "\" [" <<
+   wstart << ".." << (snext-1) << "]");
 		++snext;
 	}
 	if (snext <= last) {
@@ -4992,7 +5012,7 @@ void Paragraph::spellCheck() const
 			BufferParams const & bparams = d->inset_owner_->buffer().params();
 			SpellChecker::Result result = !word.empty() ?
 speller->check(wl, bparams.spellignore()) : SpellChecker::WORD_OK;
-			d->markMisspelledWords(first, last, result, word, skips);
+			d->markMisspelledWords(lang, first, last, result, word, skips, bparams.spellignore());
 			first = ++last;
 		}
 	} else {


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] Zoom slider

2021-03-07 Thread Jürgen Spitzmüller
Am Sonntag, dem 07.03.2021 um 14:18 +0100 schrieb Kornel Benko:
> I get
> 
> > ---/usr2/src/lyx/lyx-git/src/frontends/qt/GuiView.cpp:633:31:
> > error:
> ‘const class
> > QFontMetrics’ has no member named ‘horizontalAdvance’
>   zoomslider->setFixedWidth(fm.horizontalAdvance('x') * 15);

Fixed.

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] Zoom slider

2021-03-07 Thread Kornel Benko
Am Sun,  7 Mar 2021 13:24:29 +0100 (CET)
schrieb Juergen Spitzmueller :

> commit bdb006543b43f71a06fc5b9915d0df19aae0ef68
> Author: Juergen Spitzmueller 
> Date:   Sun Mar 7 13:29:23 2021 +0100
> 
> Zoom slider

I get

> ---/usr2/src/lyx/lyx-git/src/frontends/qt/GuiView.cpp:633:31: error: ‘const 
> class
> QFontMetrics’ has no member named ‘horizontalAdvance’
  zoomslider->setFixedWidth(fm.horizontalAdvance('x') * 15);

This is with Qt5.9

Korneel


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


Re: [LyX/master] Zoom slider

2021-03-07 Thread Jürgen Spitzmüller
Am Sonntag, dem 07.03.2021 um 13:53 +0100 schrieb Jean-Marc Lasgouttes:
> Looks like nothing is stopping you! I thought we were supposed to
> calm down on features...

Sorry about that. I'll stop it now.

> In libreoffice I see two difference that are IMO very useful:
> useful. At the very least, the tool tip should show the value instead
> of explaining what it does.

I thought about it. Wouldn't it be overkill to display it all the time,
as in writer? (this is a real question, I am undecided on that).

> 2/ having a small vertical line at the default level is nice.

I'll see what I can do.

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] Meet per-document spelling dictionaries (fixes #86 [sic!])

2021-03-07 Thread Stephan Witt
Am 07.03.2021 um 13:54 schrieb Jürgen Spitzmüller :
> 
> Am Sonntag, dem 07.03.2021 um 13:45 +0100 schrieb Stephan Witt:
>> I see more than one problem.
>> 
>> 1. The spell checker on Mac is an OS service and there is support for
>> document scope too. Probably this collides with our implementation in
>> LyX.
> 
> Why is this a problem? The implementation I have done is OS-independent
> and should work on the Mac, too. AppleSpellChecker really does not
> strike me too different from the other spellers.
> 
>> 2. Document local dictionary is only one option to improve the
>> situation.
>> Imagine documents for specific context - e.g. medical or chemical
>> science -
>> there it would be better to associate the document with a dedicated
>> personal
>> dictionary and/or even share it with colleagues.
> 
> How does this relate to the problem we are just talking about? The
> feature request I addressed was about document local dictionaries,
> nothing else.

Yes, and I propose to do it in a more general way instead.

>> 3. IMO this wasn’t a bug fix - it’s an enhancement or a new feature.
> 
> I can't follow you here. Sure it is.

IMO it is a new feature.

>>> Also, as you say it is marked correctly after context menu action,
>>> there is probably only some call missing here.
>> 
>> Yes, probably.
> 
> I have just looked again at AppleSpellChecker and really do not see how
> this is so special. Maybe you just need to debug a bit
> Paragraph::spellCheck() (the routine which is in if (speller-
>> canCheckParagraph())). Well likely just a simple oversight. Check for
> the return values of speller->check() gathered here. It should be
> LEARNED_WORD for the cases in question.

The difference is made by the canCheckParagraph() method of spellers.

Paragraph::spellCheck() has different code paths for it.

With paragraph check enabled - see AppleSpellChecker.h - the speller
sees the whole sentence as a word and marks one or more words as mis-spelled
at once.

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


Re: [LyX/master] Meet per-document spelling dictionaries (fixes #86 [sic!])

2021-03-07 Thread Jürgen Spitzmüller
Am Sonntag, dem 07.03.2021 um 13:45 +0100 schrieb Stephan Witt:
> I see more than one problem.
> 
> 1. The spell checker on Mac is an OS service and there is support for
> document scope too. Probably this collides with our implementation in
> LyX.

Why is this a problem? The implementation I have done is OS-independent
and should work on the Mac, too. AppleSpellChecker really does not
strike me too different from the other spellers.

> 2. Document local dictionary is only one option to improve the
> situation.
> Imagine documents for specific context - e.g. medical or chemical
> science -
> there it would be better to associate the document with a dedicated
> personal
> dictionary and/or even share it with colleagues.

How does this relate to the problem we are just talking about? The
feature request I addressed was about document local dictionaries,
nothing else.

> 3. IMO this wasn’t a bug fix - it’s an enhancement or a new feature.

I can't follow you here. Sure it is.

> > Also, as you say it is marked correctly after context menu action,
> > there is probably only some call missing here.
> 
> Yes, probably.

I have just looked again at AppleSpellChecker and really do not see how
this is so special. Maybe you just need to debug a bit
Paragraph::spellCheck() (the routine which is in if (speller-
>canCheckParagraph())). Well likely just a simple oversight. Check for
the return values of speller->check() gathered here. It should be
LEARNED_WORD for the cases in question.

Best,
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] Zoom slider

2021-03-07 Thread Jean-Marc Lasgouttes

Le 07/03/2021 à 13:24, Juergen Spitzmueller a écrit :

commit bdb006543b43f71a06fc5b9915d0df19aae0ef68
Author: Juergen Spitzmueller 
Date:   Sun Mar 7 13:29:23 2021 +0100

 Zoom slider


Looks like nothing is stopping you! I thought we were supposed to calm 
down on features...


In libreoffice I see two difference that are IMO very useful:
1/ the zoom value is shown beside the slider. Seeing the zoom is very 
useful. At the very least, the tool tip should show the value instead of 
explaining what it does.


2/ having a small vertical line at the default level is nice.

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


Re: [LyX/master] Meet per-document spelling dictionaries (fixes #86 [sic!])

2021-03-07 Thread Stephan Witt
Am 07.03.2021 um 13:36 schrieb Jürgen Spitzmüller :
> 
> Am Sonntag, dem 07.03.2021 um 13:24 +0100 schrieb Stephan Witt:
>> The first document has „unrrund“ in local dictionary and therefore it
>> shouldn’t
>> marked as mis-spelled. On Mac the spellchecker doesn’t check words -
>> it checks
>> paragraphs and so it misses the entries in local dictionary.
>> 
>> That’s not easy to fix.
> 
> But isn't AppleSpellChecker::check() triggered on the paragraphs when a
> document is opened? And this does check for WordLangTuples, and we
> check for the existence of the word within the docdic before doing
> anything else.
> 
> So I really do not understand what the problem here is.
> 
> (It is possible that I missed something on implementation, as I
> couldn't test the Mac speller, but I fail to see a conceptual problem
> here).

I see more than one problem.

1. The spell checker on Mac is an OS service and there is support for 
document scope too. Probably this collides with our implementation in LyX.

2. Document local dictionary is only one option to improve the situation.
Imagine documents for specific context - e.g. medical or chemical science -
there it would be better to associate the document with a dedicated personal
dictionary and/or even share it with colleagues.

3. IMO this wasn’t a bug fix - it’s an enhancement or a new feature.

> Also, as you say it is marked correctly after context menu action,
> there is probably only some call missing here.

Yes, probably.

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


Re: [LyX/master] Meet per-document spelling dictionaries (fixes #86 [sic!])

2021-03-07 Thread Jürgen Spitzmüller
Am Sonntag, dem 07.03.2021 um 13:24 +0100 schrieb Stephan Witt:
> The first document has „unrrund“ in local dictionary and therefore it
> shouldn’t
> marked as mis-spelled. On Mac the spellchecker doesn’t check words -
> it checks
> paragraphs and so it misses the entries in local dictionary.
> 
> That’s not easy to fix.

But isn't AppleSpellChecker::check() triggered on the paragraphs when a
document is opened? And this does check for WordLangTuples, and we
check for the existence of the word within the docdic before doing
anything else.

So I really do not understand what the problem here is.

(It is possible that I missed something on implementation, as I
couldn't test the Mac speller, but I fail to see a conceptual problem
here).

Also, as you say it is marked correctly after context menu action,
there is probably only some call missing here.

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] Meet per-document spelling dictionaries (fixes #86 [sic!])

2021-03-07 Thread Stephan Witt
Am 07.03.2021 um 12:35 schrieb Jürgen Spitzmüller :
> 
> Am Sonntag, dem 07.03.2021 um 11:24 +0100 schrieb Stephan Witt:
>> On Mac it doesn’t work well.
>> 
>> 1. Mark a word as ignored per-document.
>> 2. Save it.
>> 3. Close it.
>> 4. Reopen it.
>> 5. The ignored word is misspelled.
>> 6. Open context-menu w/o doing any action and close it.
>> 7. Word is not misspelled anymore.
>> 
>> My example document is attached.
> 
> Did you update inbetween? I have changed the syntax of the buffer param
> today, so documents saved before 0b42f77551 lost their dictionaries.

Yes.

> As to the examples: I don't know how they are meant to be interpreted.
> Spellcheck-1.lyx has "unrrund" in the dictionary, and this does not get
> marked when I open it (as expected). Spellcheck-2.lyx doesn't have an
> item in the dictionary, and, as expected, "unrrund" is marked.

Yes, sorry. I’ve changed my mind what to attach after the mail text was 
finished.

The first document has local dictionary and the second document not. 
So it’s easy to test the effects of the change.

The second document has „unrrund“ mis-spelled all the time and this is ok.

The first document has „unrrund“ in local dictionary and therefore it shouldn’t
marked as mis-spelled. On Mac the spellchecker doesn’t check words - it checks
paragraphs and so it misses the entries in local dictionary.

That’s not easy to fix.

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


Re: [LyX/master] Meet per-document spelling dictionaries (fixes #86 [sic!])

2021-03-07 Thread Jürgen Spitzmüller
Am Sonntag, dem 07.03.2021 um 11:24 +0100 schrieb Stephan Witt:
> On Mac it doesn’t work well.
> 
> 1. Mark a word as ignored per-document.
> 2. Save it.
> 3. Close it.
> 4. Reopen it.
> 5. The ignored word is misspelled.
> 6. Open context-menu w/o doing any action and close it.
> 7. Word is not misspelled anymore.
> 
> My example document is attached.

Did you update inbetween? I have changed the syntax of the buffer param
today, so documents saved before 0b42f77551 lost their dictionaries.

As to the examples: I don't know how they are meant to be interpreted.
Spellcheck-1.lyx has "unrrund" in the dictionary, and this does not get
marked when I open it (as expected). Spellcheck-2.lyx doesn't have an
item in the dictionary, and, as expected, "unrrund" is marked.

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] Meet per-document spelling dictionaries (fixes #86 [sic!])

2021-03-07 Thread Stephan Witt
Am 06.03.2021 um 18:25 schrieb Scott Kostyshak :
> 
> On Sat, Mar 06, 2021 at 05:54:27PM +0100, Jean-Marc Lasgouttes wrote:
>> Le 06/03/2021 à 16:52, Juergen Spitzmueller a écrit :
>>> commit 07396ab2445720b21dc8195816eb1aee1f2ae3a7
>>> Author: Juergen Spitzmueller 
>>> Date:   Sat Mar 6 16:53:33 2021 +0100
>>> 
>>> Meet per-document spelling dictionaries (fixes #86 [sic!])
>> 
>> Great news!
> 
> Well done! I look forward to testing this feature.

On Mac it doesn’t work well.

1. Mark a word as ignored per-document.
2. Save it.
3. Close it.
4. Reopen it.
5. The ignored word is misspelled.
6. Open context-menu w/o doing any action and close it.
7. Word is not misspelled anymore.

My example document is attached.

Stephan



Spellcheck-1.lyx
Description: Binary data


Spellcheck-2.lyx
Description: Binary data
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: [LyX/master] French User Guide: fix file paths

2021-03-07 Thread JP

Le 7 mars 2021 06:06:23 Scott Kostyshak  a écrit :


On Sun, Mar 07, 2021 at 05:35:58AM +0100, JP wrote:

Dear Scott

Thanks for the fix.


Sure!


What should I do to avoid such file path errors?


It depends on how those path changes got in there. How did you write the
file to the master repository location? If you did "save as" then I
think that would explain it because in that case LyX would preserve the
paths to the 2.3.x files. In that case, the fix is simple: just copy the
file outside of LyX from the 2.3.x directory to the master directory.

If you didn't do "save as", then I'm not sure how the paths got changed.
If we can't figure it out, it's easy enough to give you some "sed"
commands that would take care of fixing the paths, but that is annoying
and we'd have to remember to run them each time 2.3.x docs are ported
over to master.



I guess I opened the file from the master dir like
lyx-2.4.0dev ../2.3.x/lib/doc/fr/UserGuide.lyx

I should open it from its own dir and then copy the file to master,  I'll 
remember it for Additional.


--
Jean-Pierre



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