Re: [PATCH] Semantic Linefeeds

2022-11-28 Thread Yuriy Skalko
.. and please add some note into https://wiki.lyx.org/LyX/NewInLyX24 .. Pavel Thanks for the reminder. Committed and documented. Yuriy -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel

Re: [PATCH] Semantic Linefeeds

2022-11-28 Thread Pavel Sanda
On Mon, Nov 28, 2022 at 09:56:39AM +0100, Pavel Sanda wrote: > On Sun, Nov 27, 2022 at 06:45:23PM +0200, Yuriy Skalko wrote: > > >This looks good to me. > > > > > >JMarc > > > > Ok, here is an updated patch with dummy format change. > > Thanks, Pavel .. and please add some note into https://wiki

Re: [PATCH] Semantic Linefeeds

2022-11-28 Thread Pavel Sanda
On Sun, Nov 27, 2022 at 06:45:23PM +0200, Yuriy Skalko wrote: > >This looks good to me. > > > >JMarc > > Ok, here is an updated patch with dummy format change. Thanks, Pavel -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel

Re: [PATCH] Semantic Linefeeds

2022-11-27 Thread Yuriy Skalko
This looks good to me. JMarc Ok, here is an updated patch with dummy format change. Yuriy From 945e020306df7ea595e792284c3e427f32682fb0 Mon Sep 17 00:00:00 2001 From: Yuriy Skalko Date: Sun, 27 Nov 2022 18:30:26 +0200 Subject: [PATCH] Add "semantic linefeeds" after punctuation

Re: [PATCH] Semantic Linefeeds

2022-11-27 Thread Yuriy Skalko
I haven't tested, but how does this work when those punctuation symbols are not used to end clauses? For example, in the case of: "e.g., some text..." How many lines would this produce? Scott Just 2 lines. There should be a space to have a linebreak. Yuriy -- lyx-devel mailing list lyx-d

Re: [PATCH] Semantic Linefeeds

2022-11-09 Thread Jean-Marc Lasgouttes
Le 08/11/2022 à 20:46, Pavel Sanda a écrit : On Sat, Nov 05, 2022 at 12:12:13PM -0400, Scott Kostyshak wrote: I know this change "shouldn't" matter when it comes to loading/storing of .lyx file - but given the severe consequences in case we overlooked something perhaps we should add fileformat i

Re: [PATCH] Semantic Linefeeds

2022-11-08 Thread Scott Kostyshak
On Tue, Nov 08, 2022 at 08:46:59PM +0100, Pavel Sanda wrote: > On Sat, Nov 05, 2022 at 12:12:13PM -0400, Scott Kostyshak wrote: > > > I know this change "shouldn't" matter when it comes to loading/storing of > > > .lyx > > > file - but given the severe consequences in case we overlooked something

Re: [PATCH] Semantic Linefeeds

2022-11-08 Thread Pavel Sanda
On Sat, Nov 05, 2022 at 12:12:13PM -0400, Scott Kostyshak wrote: > > I know this change "shouldn't" matter when it comes to loading/storing of > > .lyx > > file - but given the severe consequences in case we overlooked something > > perhaps we should add fileformat increase & empty lyx2lyx convers

Re: [PATCH] Semantic Linefeeds

2022-11-05 Thread Scott Kostyshak
On Fri, Nov 04, 2022 at 04:53:36PM +0100, Pavel Sanda wrote: > On Fri, Nov 04, 2022 at 10:09:24AM +0200, Yuriy Skalko wrote: > > Now the patch also contains most punctuation marks for non-European > > languages after which it is worth to put a linebreak. > > > > Is it ready to commit now? > > I k

Re: [PATCH] Semantic Linefeeds

2022-11-05 Thread Scott Kostyshak
On Fri, Nov 04, 2022 at 10:09:24AM +0200, Yuriy Skalko wrote: > Now the patch also contains most punctuation marks for non-European > languages after which it is worth to put a linebreak. > > Is it ready to commit now? I haven't tested, but how does this work when those punctuation symbols are no

Re: [PATCH] Semantic Linefeeds

2022-11-04 Thread Pavel Sanda
On Fri, Nov 04, 2022 at 10:09:24AM +0200, Yuriy Skalko wrote: > Now the patch also contains most punctuation marks for non-European > languages after which it is worth to put a linebreak. > > Is it ready to commit now? I know this change "shouldn't" matter when it comes to loading/storing of .lyx

[PATCH] Semantic Linefeeds

2022-11-04 Thread Yuriy Skalko
Now the patch also contains most punctuation marks for non-European languages after which it is worth to put a linebreak. Is it ready to commit now? Yuriy diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp index 4ce94415f7..7b3d5bd4f7 100644 --- a/src/Paragraph.cpp +++ b/src/Paragraph.cpp @@ -

[PATCH] Semantic Linefeeds

2022-11-03 Thread Yuriy Skalko
Here is an updated patch with Chinese punctuation marks. Also now linebreak is added after em-dash even without next space (for English). Yuriy diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp index 4ce94415f7..7156d442bf 100644 --- a/src/Paragraph.cpp +++ b/src/Paragraph.cpp @@ -1746,16 +174

Re: Semantic Linefeeds

2022-10-25 Thread Yuriy Skalko
So from your patch I see that we already did that for '.'? And in this case the \n counts as a space ? I thought our semantics was that \n did not count at all. Yes, it was already done for "." and semantics of \n (ignoring it) is the same here. Space after the "." is still added to the next l

Re: Semantic Linefeeds

2022-10-18 Thread Jean-Marc Lasgouttes
Le 17/10/2022 à 12:21, Yuriy Skalko a écrit : Thanks all for the feedback! Here is a patch to try. Should we also have minimal line length? So from your patch I see that we already did that for '.'? And in this case the \n counts as a space ? I thought our semantics was that \n did not count

Re: Semantic Linefeeds

2022-10-18 Thread Scott Kostyshak
On Tue, Oct 18, 2022 at 03:17:46PM +0300, Yuriy Skalko wrote: > On User Guide the difference in file size is ~2%, so yes, it can be called > negligible. And after looking through User Guide, I agree with Joel that we > can go without minimal line length. Thanks for checking! I was expecting even l

Re: Semantic Linefeeds

2022-10-18 Thread Yuriy Skalko
On User Guide the difference in file size is ~2%, so yes, it can be called negligible. And after looking through User Guide, I agree with Joel that we can go without minimal line length. Also I exported User Guide to LyX 2.3 format and then successfully opened it in LyX 2.3.6. Yuriy -- lyx-d

Re: Semantic Linefeeds

2022-10-17 Thread Joel Kulesza
On Mon, Oct 17, 2022 at 08:14 Scott Kostyshak wrote: > On Mon, Oct 17, 2022 at 01:21:40PM +0300, Yuriy Skalko wrote: > > Thanks all for the feedback! > > Thanks for working on this, Yuriy. What is the difference in file sizes? > e.g., of the User Guide? I'm guessing it's negligible, but still cur

Re: Semantic Linefeeds

2022-10-17 Thread Scott Kostyshak
On Mon, Oct 17, 2022 at 01:21:40PM +0300, Yuriy Skalko wrote: > Thanks all for the feedback! Thanks for working on this, Yuriy. What is the difference in file sizes? e.g., of the User Guide? I'm guessing it's negligible, but still curious enough to ask. > Here is a patch to try. > Should we also

Re: Semantic Linefeeds

2022-10-17 Thread Yuriy Skalko
Thanks all for the feedback! Here is a patch to try. Should we also have minimal line length? Yuriy diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp index 4ce94415f7..61a9e23c61 100644 --- a/src/Paragraph.cpp +++ b/src/Paragraph.cpp @@ -1746,16 +1746,21 @@ void Paragraph::write(ostream & os,

Re: Semantic Linefeeds

2022-10-16 Thread Jean-Marc Lasgouttes
Le 15/10/2022 à 16:04, Joel Kulesza a écrit : There was some discussion on this in 2020 (https://www.mail-archive.com/search?l=lyx-devel%40lists.lyx.org&q=Significant+.lyx+EOL+White+Space+Inquiry&submit.x=15&submit.y=15

Re: Semantic Linefeeds

2022-10-15 Thread Scott Kostyshak
On Sat, Oct 15, 2022 at 12:17:15PM +0300, Yuriy Skalko wrote: > Hello all, > > What do you think about adapting semantic linefeeds > (https://rhodesmill.org/brandon/2012/one-sentence-per-line/) for stored > paragraph text in LyX files? Mainly to breaks lines only after the >

Re: Semantic Linefeeds

2022-10-15 Thread Joel Kulesza
On Sat, Oct 15, 2022 at 3:17 AM Yuriy Skalko wrote: > Hello all, > > What do you think about adapting semantic linefeeds > (https://rhodesmill.org/brandon/2012/one-sentence-per-line/) for stored > paragraph text in LyX files? Mainly to breaks lines only after the > punctuati

Semantic Linefeeds

2022-10-15 Thread Yuriy Skalko
Hello all, What do you think about adapting semantic linefeeds (https://rhodesmill.org/brandon/2012/one-sentence-per-line/) for stored paragraph text in LyX files? Mainly to breaks lines only after the punctuation marks. Then the diffs in Git for edited documents can be much more readable