Re: Labels in Notes regression

2022-05-28 Thread Andrew Parsloe



On 27/05/2022 1:18 am, racoon wrote:

On 2022-05-26 10:39, Andrew Parsloe wrote:


On 26/05/2022 4:05 pm, Daniel wrote:

On 2022-05-25 23:27, Andrew Parsloe wrote:


On 26/05/2022 6:04 am, Daniel wrote:

On 2022-05-24 23:53, Andrew Parsloe wrote:

(LyX 2.4.0-alpha3 on windows 10)

If I copy text containing a label (e.g. of an equation) and paste
into a (yellow) Note, the label is pasted unchanged. There is no
warning message about the label being changed to label-1. The label
in the Note can be referenced from within the Note or from within
another Note, but not from the text which gives a BROKEN Ref
message. I've just tried with LyX 2.3.5, and this is a regression.

Andrew


I can reproduce. I guess a question is what would be the best thing
to do here. What is the exact issue with how it is in LyX 2.4.0dev?
What would be a better way? Renaming? Showing as "Duplicate"? What
is your use case?

That the reference is marked as BROKEN when referenced from outside
of the Note seems right, or?

Daniel


Looking at how labels are used in notes and branches across 2.3.5 and
2.4.0dev, I can see that this can get complicated. The 2.3.5
behaviour (renaming) seems clearest to me (and a little pedantic).

Andrew


I have never used branches, so pardon my ignorance. But isn't it there
where being able to use duplicates might come in handy? Couldn't you
have two branches with the same labels that are referenced outside of
the branches? But as I said, I am not using branches, so maybe that is
not a good use case.

Daniel


Sorry, I wasn't clear in my answer. I meant for *notes* the 2.3.5
behaviour seems best. Branches are another matter. I haven't used them
enough to form an opinion.

Andrew


I am still unsure why the behavior seems best to you. Could you provide
a use case where your preferred way comes in handy?


When I'm extensively revising a block of text I find it convenient to 
put the old version into a note as the new version gets worked on. The 
text in the note is there to be mined -- copied & pasted from -- but is 
clearly distinct (the yellow background) from the new text. The problem 
wth labels arises when the old text contains a label which now sits in a 
note. The label is still recorded in the Cross-reference dialogue. If 
the text with the label gets copied & pasted from the note into the new 
text there are now two, identical labels recorded in the Cross-reference 
dialogue. Either removing the note label or distinguishing it in some 
way would be acceptable, but the 2.3.5 behaviour seemed best because it 
treats note labels in the same way as in the text, and therefore makes 
fewest assumptions about how notes are or can be or should be used.



(Did you post in private on purpose?)

No, in error.


Daniel

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


Re: [LyX/master] Fix subfloat inset label (#11757)

2022-05-28 Thread Scott Kostyshak
On Sat, May 28, 2022 at 08:42:50PM +0200, Jürgen Spitzmüller wrote:
> Am Samstag, dem 28.05.2022 um 14:27 -0400 schrieb Scott Kostyshak:
> > I get the following:
> > 
> > /home/scott/lyxbuilds/master-master/repo/src/insets/InsetFloat.cpp:
> > In member function ‘virtual void lyx::InsetFloat::updateBuffer(const
> > lyx::ParIterator&, lyx::UpdateType, bool)’:
> > /home/scott/lyxbuilds/master-
> > master/repo/src/insets/InsetFloat.cpp:882:84: error: unused parameter
> > ‘deleted’ [-Werror=unused-parameter]
> >   882 | void InsetFloat::updateBuffer(ParIterator const & it,
> > UpdateType utype, bool const deleted)
> >  
> > |
> >  ~~~^~~
> 
> Fixed.

Thanks,

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] Fix subfloat inset label (#11757)

2022-05-28 Thread Jürgen Spitzmüller
Am Samstag, dem 28.05.2022 um 14:27 -0400 schrieb Scott Kostyshak:
> I get the following:
> 
> /home/scott/lyxbuilds/master-master/repo/src/insets/InsetFloat.cpp:
> In member function ‘virtual void lyx::InsetFloat::updateBuffer(const
> lyx::ParIterator&, lyx::UpdateType, bool)’:
> /home/scott/lyxbuilds/master-
> master/repo/src/insets/InsetFloat.cpp:882:84: error: unused parameter
> ‘deleted’ [-Werror=unused-parameter]
>   882 | void InsetFloat::updateBuffer(ParIterator const & it,
> UpdateType utype, bool const deleted)
>  
> |
>  ~~~^~~

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] Fix subfloat inset label (#11757)

2022-05-28 Thread Scott Kostyshak
On Fri, May 27, 2022 at 08:47:17AM +0200, Juergen Spitzmueller wrote:
> commit cd3116bbf9ffb5e4853ff7b74a9fdf13a1cbe2dd
> Author: Juergen Spitzmueller 
> Date:   Fri May 27 09:26:40 2022 +0200
> 
> Fix subfloat inset label (#11757)
> 
> This was broken at 9b7ccbfc/lyxgit
> ---
>  src/insets/InsetFloat.cpp |   11 ++-
>  src/insets/InsetFloat.h   |2 ++
>  2 files changed, 12 insertions(+), 1 deletions(-)
> 

I get the following:

/home/scott/lyxbuilds/master-master/repo/src/insets/InsetFloat.cpp: In member 
function ‘virtual void lyx::InsetFloat::updateBuffer(const lyx::ParIterator&, 
lyx::UpdateType, bool)’:
/home/scott/lyxbuilds/master-master/repo/src/insets/InsetFloat.cpp:882:84: 
error: unused parameter ‘deleted’ [-Werror=unused-parameter]
  882 | void InsetFloat::updateBuffer(ParIterator const & it, UpdateType utype, 
bool const deleted)
  | 
~~~^~~

Scott


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