Re: [LyX/master] User Guide: add quotes to a PackageOptions command

2022-05-23 Thread Scott Kostyshak
On Mon, May 23, 2022 at 06:58:10AM +0200, Jürgen Spitzmüller wrote:
> Am Sonntag, dem 22.05.2022 um 15:41 -0400 schrieb Scott Kostyshak:
> > On Sun, May 22, 2022 at 06:17:32PM +0200, Daniel wrote:
> > > On 2022-05-19 10:32, Jürgen Spitzmüller wrote:
> > > > Am Do., 19. Mai 2022 um 08:45 Uhr schrieb Daniel  > > > >:
> > > > 
> > > >     Did you mean "replacing lexrc.next with lex.eatLine"?
> > > > 
> > > > 
> > > > yes. I went ahead and fixed it.
> > > 
> > > So, should the change in the docs be reverted then or what is the
> > > more
> > > natural way?
> > 
> > I'm fine either way. I think without quotes is a bit more natural.
> > However, I think I would lean towards keeping the quotes just because
> > it's backwards compatible, and if I remember correctly, when we
> > export
> > to older formats, we do not have backwards conversion for layouts. If
> > that's correct, then I would recommend users to use the quoted
> > version.
> 
> On the other hand the quotes are inconsistent, and they have not been
> documented in the earlier versions.

I'm really fine either way. Should I revert (by the way I also don't
mind if others revert my commits)?

Scott


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


Re: Advanced find and quote styles

2022-05-23 Thread Kornel Benko
Am Mon, 23 May 2022 14:33:50 +0200
schrieb Jürgen Spitzmüller :

> Am Montag, dem 23.05.2022 um 14:21 +0200 schrieb Kornel Benko:
> > Thanks Jürgen. That is exactly what I was after. Please commit.  
> 
> Done.

Thanks.

> > > > but because of not able to set the quote-style in
> > > > replace_work_area,
> > > > findadv is not able to correct the quotes.    
> > > 
> > > The most elegant way to change the quotes there, currently, is
> > > probably
> > > to use the context menu of a quote inset.  
> > 
> > Works too, but your patch is better :)  
> 
> Except that this requires reopening the F pane, which is awkward if
> you want one style in find and another one in replace.
> 

True. Would be nice if we could use document settings for _this_ internal 
buffer.
(Only for replace_work_area, not for the search area)

Kornel

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


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


Re: Advanced find and quote styles

2022-05-23 Thread Jürgen Spitzmüller
Am Montag, dem 23.05.2022 um 14:21 +0200 schrieb Kornel Benko:
> Thanks Jürgen. That is exactly what I was after. Please commit.

Done.

> > > but because of not able to set the quote-style in
> > > replace_work_area,
> > > findadv is not able to correct the quotes.  
> > 
> > The most elegant way to change the quotes there, currently, is
> > probably
> > to use the context menu of a quote inset.
> 
> Works too, but your patch is better :)

Except that this requires reopening the F pane, which is awkward if
you want one style in find and another one in replace.

-- 
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: Advanced find and quote styles

2022-05-23 Thread Kornel Benko
Am Mon, 23 May 2022 14:03:56 +0200
schrieb Jürgen Spitzmüller :

> Am Montag, dem 23.05.2022 um 10:35 +0200 schrieb Kornel Benko:
> > 
> > Setting quote-style does not work in the replace_work_area.
> > The setting
> >     Dokument->Settings->Language->Quote-style
> > has no effect.  
> 
> The embedded buffers in F are "internal", so changes in the document
> settings have no effect on them. This also applies to main language,
> for instance.
> 
> When opening the F pane, some document params (such as language) are
> copied, though not quote style. The attached patch changes that.

Thanks Jürgen. That is exactly what I was after. Please commit.

> > but because of not able to set the quote-style in replace_work_area,
> > findadv is not able to correct the quotes.  
> 
> The most elegant way to change the quotes there, currently, is probably
> to use the context menu of a quote inset.

Works too, but your patch is better :)

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


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


Re: Advanced find and quote styles

2022-05-23 Thread Jürgen Spitzmüller
Am Montag, dem 23.05.2022 um 10:35 +0200 schrieb Kornel Benko:
> 
> Setting quote-style does not work in the replace_work_area.
> The setting
>     Dokument->Settings->Language->Quote-style
> has no effect.

The embedded buffers in F are "internal", so changes in the document
settings have no effect on them. This also applies to main language,
for instance.

When opening the F pane, some document params (such as language) are
copied, though not quote style. The attached patch changes that.

> but because of not able to set the quote-style in replace_work_area,
> findadv is not able to correct the quotes.

The most elegant way to change the quotes there, currently, is probably
to use the context menu of a quote inset.

> 
> Kornel

-- 
Jürgen
diff --git a/src/BufferParams.cpp b/src/BufferParams.cpp
index 95aa9136d2..e62d0100c8 100644
--- a/src/BufferParams.cpp
+++ b/src/BufferParams.cpp
@@ -3805,6 +3805,7 @@ void BufferParams::copyForAdvFR(const BufferParams & bp)
 {
 	string const & lang = bp.language->lang();
 	setLanguage(lang);
+	quotes_style = bp.quotes_style;
 	layout_modules_ = bp.layout_modules_;
 	string const & doc_class = bp.documentClass().name();
 	setBaseClass(doc_class);


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


Advanced find and quote styles

2022-05-23 Thread Kornel Benko

Setting quote-style does not work in the replace_work_area.
The setting
Dokument->Settings->Language->Quote-style
has no effect.

Inserting quotes I always see (in View->Code Preview Pane->Format:->LyX)
\begin_layout Standard
\begin_inset Quotes eld
\end_inset

\begin_inset Quotes erd
\end_inset

while (for instance) I expected
\begin_layout Standard
\begin_inset Quotes gld
\end_inset

\begin_inset Quotes grd
\end_inset

Jürgen or Jean-Marc, could you please have a look?

The command to change all quotes around words would otherwise be (in regex 
mode):
"(\w+)"
with the replace buffer containing
"$$1"

but because of not able to set the quote-style in replace_work_area, findadv is 
not able
to correct the quotes.

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


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