Re: Joining newlines in paste (was: Pasting latex in a lyx file)

2023-08-06 Thread Pavel Sanda
On Thu, Jul 27, 2023 at 06:45:44PM +0200, Pavel Sanda wrote:
> On Thu, Jul 27, 2023 at 06:07:30PM +0200, Pavel Sanda wrote:
> > current behaviour which joins the lines by default?
> 
> As it turns out, the current behaviour is more subtle:
> the newlines are actually preserved for some layouts
> (those having parbreakIsNewline set to 1).
> 
> The patch for newline preservation by default is trivial
> (see attachment). Let's wait for the feedback now. 

As I received no objections, this is now in.
Pavel
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Joining newlines in paste (was: Pasting latex in a lyx file)

2023-08-03 Thread Ricardo Berlasso
El jue, 27 jul 2023 a las 18:15, Pavel Sanda () escribió:

> On Thu, Apr 22, 2021 at 12:38:32PM -0400, Scott Kostyshak wrote:
> > On Tue, Apr 20, 2021 at 12:15:56AM +0200, Dr Eberhard W Lisse wrote:
> > > On 2021-04-19 14:47 , Christoph Schmitz wrote:
> > > >> Am 19.04.2021 um 14:43 schrieb Daniel :
> > > >>
> > > >> On 10/4/21 16:07, Mario D wrote:
> > > >>> Paul,
> > > >>> Ctrl+Shift+V works just fine for me, thanks!
> > > >>> My fault, and I beg your pardon for this, for not having tried the
> > > >>> relative option in "Edit -> Paste Special" : I just tried the
> "Paste
> > > >>> from LaTeX", which doesn't work in my case (I am pasting tikz
> > > >>> figures, so @rich: I was referring to the second option).  Thank
> you
> > > >>> everybody.  :)
> > > >>
> > > >> Actually, I am wondering whether preserving newlines should be the
> > > >> default.  I don't think one can expect that the default paste
> command
> > > >> changes the format that way.  Instead the "special" option should be
> > > >> paste with removing newlines, I think.
> > > >> --
> > > >> Daniel
> > > [...]
> > > >
> > > > I want to second this proposal!
> > > >
> > > > I do not know how much work it would be to create a new setting,
> which
> > > > would allow users to use whatever method they prefer.  If I have to
> > > > chose between the two options, Daniel's proposal is my preference.
> > > >
> > > > Chris
> > > >
> > > Me three :-)-O
> >
> > I also get confused by this and I think new LyX users are especially
> confused.
> > I also vote for considering a change of the default behavior.
>
> Dear all,
>
> this is one of my last items on the TODO list for the 2.4 release.
>
> Bunch of people expressed their opinion that our default for paste
> operation
> should preserve newlines. I do not have strong opinion but agree that in
> my
> experience I have to go to Paste Special sub menu quite often to preserve
> the newlines.
>
> Before looking what would need change, is there reasonable unanimous
> agreement
> that this should be the default or are there folks who prefer current
> behaviour
> which joins the lines by default?
>

>From my experience I think most people nowadays expect that a normal paste
preserve new lines, and I'm one of those peoples ;)

Regards,
Ricardo


>
> Pavel
> --
> lyx-users mailing list
> lyx-us...@lists.lyx.org
> http://lists.lyx.org/mailman/listinfo/lyx-users
>
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Joining newlines in paste

2023-07-29 Thread Daniel

On 2023-07-28 13:46, Scott Kostyshak wrote:

On Thu, Jul 27, 2023 at 10:28:51PM -0400, Richard Kimberly Heck wrote:


On 7/27/23 12:07, Pavel Sanda wrote:

On Thu, Apr 22, 2021 at 12:38:32PM -0400, Scott Kostyshak wrote:

On Tue, Apr 20, 2021 at 12:15:56AM +0200, Dr Eberhard W Lisse wrote:

On 2021-04-19 14:47 , Christoph Schmitz wrote:

Am 19.04.2021 um 14:43 schrieb Daniel :

On 10/4/21 16:07, Mario D wrote:

Paul,
Ctrl+Shift+V works just fine for me, thanks!
My fault, and I beg your pardon for this, for not having tried the
relative option in "Edit -> Paste Special" : I just tried the "Paste
from LaTeX", which doesn't work in my case (I am pasting tikz
figures, so @rich: I was referring to the second option).  Thank you
everybody.  :)

Actually, I am wondering whether preserving newlines should be the
default.  I don't think one can expect that the default paste command
changes the format that way.  Instead the "special" option should be
paste with removing newlines, I think.
--
Daniel

[...]

I want to second this proposal!

I do not know how much work it would be to create a new setting, which
would allow users to use whatever method they prefer.  If I have to
chose between the two options, Daniel's proposal is my preference.

Chris


Me three :-)-O

I also get confused by this and I think new LyX users are especially confused.
I also vote for considering a change of the default behavior.

Dear all,

this is one of my last items on the TODO list for the 2.4 release.

Bunch of people expressed their opinion that our default for paste operation
should preserve newlines. I do not have strong opinion but agree that in my
experience I have to go to Paste Special sub menu quite often to preserve
the newlines.

Before looking what would need change, is there reasonable unanimous agreement
that this should be the default or are there folks who prefer current behaviour
which joins the lines by default?


I agree that the default should be to preserve newlines.


+1

Scott


+1

One thing I am wondering about is whether if this change is made, the 
shortcut Ctrl+Shift+V should be re-assigned to pasting with joined lines 
(old behaviour).


Daniel

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


Re: Joining newlines in paste (was: Pasting latex in a lyx file)

2023-07-28 Thread Scott Kostyshak
On Thu, Jul 27, 2023 at 10:28:51PM -0400, Richard Kimberly Heck wrote:
> 
> On 7/27/23 12:07, Pavel Sanda wrote:
> > On Thu, Apr 22, 2021 at 12:38:32PM -0400, Scott Kostyshak wrote:
> > > On Tue, Apr 20, 2021 at 12:15:56AM +0200, Dr Eberhard W Lisse wrote:
> > > > On 2021-04-19 14:47 , Christoph Schmitz wrote:
> > > > > > Am 19.04.2021 um 14:43 schrieb Daniel :
> > > > > > 
> > > > > > On 10/4/21 16:07, Mario D wrote:
> > > > > > > Paul,
> > > > > > > Ctrl+Shift+V works just fine for me, thanks!
> > > > > > > My fault, and I beg your pardon for this, for not having tried the
> > > > > > > relative option in "Edit -> Paste Special" : I just tried the 
> > > > > > > "Paste
> > > > > > > from LaTeX", which doesn't work in my case (I am pasting tikz
> > > > > > > figures, so @rich: I was referring to the second option).  Thank 
> > > > > > > you
> > > > > > > everybody.  :)
> > > > > > Actually, I am wondering whether preserving newlines should be the
> > > > > > default.  I don't think one can expect that the default paste 
> > > > > > command
> > > > > > changes the format that way.  Instead the "special" option should be
> > > > > > paste with removing newlines, I think.
> > > > > > --
> > > > > > Daniel
> > > > [...]
> > > > > I want to second this proposal!
> > > > > 
> > > > > I do not know how much work it would be to create a new setting, which
> > > > > would allow users to use whatever method they prefer.  If I have to
> > > > > chose between the two options, Daniel's proposal is my preference.
> > > > > 
> > > > > Chris
> > > > > 
> > > > Me three :-)-O
> > > I also get confused by this and I think new LyX users are especially 
> > > confused.
> > > I also vote for considering a change of the default behavior.
> > Dear all,
> > 
> > this is one of my last items on the TODO list for the 2.4 release.
> > 
> > Bunch of people expressed their opinion that our default for paste operation
> > should preserve newlines. I do not have strong opinion but agree that in my
> > experience I have to go to Paste Special sub menu quite often to preserve
> > the newlines.
> > 
> > Before looking what would need change, is there reasonable unanimous 
> > agreement
> > that this should be the default or are there folks who prefer current 
> > behaviour
> > which joins the lines by default?
> 
> I agree that the default should be to preserve newlines.

+1

Scott


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


Re: Joining newlines in paste (was: Pasting latex in a lyx file)

2023-07-27 Thread Richard Kimberly Heck

On 7/27/23 12:07, Pavel Sanda wrote:

On Thu, Apr 22, 2021 at 12:38:32PM -0400, Scott Kostyshak wrote:

On Tue, Apr 20, 2021 at 12:15:56AM +0200, Dr Eberhard W Lisse wrote:

On 2021-04-19 14:47 , Christoph Schmitz wrote:

Am 19.04.2021 um 14:43 schrieb Daniel :

On 10/4/21 16:07, Mario D wrote:

Paul,
Ctrl+Shift+V works just fine for me, thanks!
My fault, and I beg your pardon for this, for not having tried the
relative option in "Edit -> Paste Special" : I just tried the "Paste
from LaTeX", which doesn't work in my case (I am pasting tikz
figures, so @rich: I was referring to the second option).  Thank you
everybody.  :)

Actually, I am wondering whether preserving newlines should be the
default.  I don't think one can expect that the default paste command
changes the format that way.  Instead the "special" option should be
paste with removing newlines, I think.
--
Daniel

[...]

I want to second this proposal!

I do not know how much work it would be to create a new setting, which
would allow users to use whatever method they prefer.  If I have to
chose between the two options, Daniel's proposal is my preference.

Chris


Me three :-)-O

I also get confused by this and I think new LyX users are especially confused.
I also vote for considering a change of the default behavior.

Dear all,

this is one of my last items on the TODO list for the 2.4 release.

Bunch of people expressed their opinion that our default for paste operation
should preserve newlines. I do not have strong opinion but agree that in my
experience I have to go to Paste Special sub menu quite often to preserve
the newlines.

Before looking what would need change, is there reasonable unanimous agreement
that this should be the default or are there folks who prefer current behaviour
which joins the lines by default?


I agree that the default should be to preserve newlines.

Riki


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


Re: Joining newlines in paste (was: Pasting latex in a lyx file)

2023-07-27 Thread Pavel Sanda
On Thu, Jul 27, 2023 at 06:07:30PM +0200, Pavel Sanda wrote:
> current behaviour which joins the lines by default?

As it turns out, the current behaviour is more subtle:
the newlines are actually preserved for some layouts
(those having parbreakIsNewline set to 1).

The patch for newline preservation by default is trivial
(see attachment). Let's wait for the feedback now. 

Pavel
diff --git a/src/Text.cpp b/src/Text.cpp
index 9dff2b37ab..9e5bf5ff75 100644
--- a/src/Text.cpp
+++ b/src/Text.cpp
@@ -4891,8 +4891,7 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
if (theClipboard().isInternal())
pasteFromStack(cur, 
bv->buffer().errorList("Paste"), 0);
else if (theClipboard().hasTextContents()) {
-   if (pasteClipboardText(cur, 
bv->buffer().errorList("Paste"),
-  
!cur.paragraph().parbreakIsNewline(),
+   if (pasteClipboardText(cur, 
bv->buffer().errorList("Paste"), 0,
   
Clipboard::AnyTextType))
tryGraphics = false;
}
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Joining newlines in paste (was: Pasting latex in a lyx file)

2023-07-27 Thread Jean-Marc Lasgouttes

Le 27/07/2023 à 18:07, Pavel Sanda a écrit :

Bunch of people expressed their opinion that our default for paste operation
should preserve newlines. I do not have strong opinion but agree that in my
experience I have to go to Paste Special sub menu quite often to preserve
the newlines.

Before looking what would need change, is there reasonable unanimous agreement
that this should be the default or are there folks who prefer current behaviour
which joins the lines by default?


I do not care much, but I am OK with the change.

JMarc

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


Joining newlines in paste (was: Pasting latex in a lyx file)

2023-07-27 Thread Pavel Sanda
On Thu, Apr 22, 2021 at 12:38:32PM -0400, Scott Kostyshak wrote:
> On Tue, Apr 20, 2021 at 12:15:56AM +0200, Dr Eberhard W Lisse wrote:
> > On 2021-04-19 14:47 , Christoph Schmitz wrote:
> > >> Am 19.04.2021 um 14:43 schrieb Daniel :
> > >>
> > >> On 10/4/21 16:07, Mario D wrote:
> > >>> Paul,
> > >>> Ctrl+Shift+V works just fine for me, thanks!
> > >>> My fault, and I beg your pardon for this, for not having tried the
> > >>> relative option in "Edit -> Paste Special" : I just tried the "Paste
> > >>> from LaTeX", which doesn't work in my case (I am pasting tikz
> > >>> figures, so @rich: I was referring to the second option).  Thank you
> > >>> everybody.  :)
> > >>
> > >> Actually, I am wondering whether preserving newlines should be the
> > >> default.  I don't think one can expect that the default paste command
> > >> changes the format that way.  Instead the "special" option should be
> > >> paste with removing newlines, I think.
> > >> --
> > >> Daniel
> > [...]
> > >
> > > I want to second this proposal!
> > >
> > > I do not know how much work it would be to create a new setting, which
> > > would allow users to use whatever method they prefer.  If I have to
> > > chose between the two options, Daniel's proposal is my preference.
> > >
> > > Chris
> > >
> > Me three :-)-O
> 
> I also get confused by this and I think new LyX users are especially confused.
> I also vote for considering a change of the default behavior.

Dear all,

this is one of my last items on the TODO list for the 2.4 release.

Bunch of people expressed their opinion that our default for paste operation
should preserve newlines. I do not have strong opinion but agree that in my 
experience I have to go to Paste Special sub menu quite often to preserve
the newlines.

Before looking what would need change, is there reasonable unanimous agreement
that this should be the default or are there folks who prefer current behaviour
which joins the lines by default?

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