On Thu, Apr 17, 2025 at 07:14:21PM -0400, Richard Kimberly Heck wrote:
> On 4/17/25 4:53 PM, Jean-Marc Lasgouttes wrote:
> > Le 17/04/2025 à 01:03, Scott Kostyshak a écrit :
> > > > OTOH, you could maybe use isBroken() in screenLabel(), but it is
> > > > strange
> > > > then to prepend EMPTY to the label, because this means that you
> > > > know why it
> > > > is broken.
> > > 
> > > This part I don't understand. Why is it strange to know why it is
> > > broken? To me the "isBroken()" is useful to draw the user attention to
> > > the issue by marking it as red. And the "EMPTY" prefix explains what is
> > > wrong.
> > > 
> > > The reason I'm looking at this code is I am working on a patch to mark
> > > it as broken if one of the .bib files is not found.
> > 
> > So this situation is a bit more complicated. I see you problem.
> > 
> > Then, it might be that you should extend setBroken with a string that
> > gives a reason like EMPTY or NOT FOUND or whatever you come up with.
> > Then this reason can be used at screenLabel. Or you use BROKEN every
> > time it is broken.
> > 
> > However, if I look at the current code, I see that setBroken is used in
> > InsetCitation::complexLabel, InsetRef::addToToc, InsetInclude::metrics.
> 
> That does not seem right.
> 
> > So, for any bad idea that you may come up with, there is some prior art
> > you can use as a justification.
> > 
> > I do not even know why setBroken is const, actually. It might be that
> > there is no good place to set it. To me, updateBuffer is the less bad
> > place.
> 
> I would have thought that was the right place to do it, too.

Thanks for the comments, JMarc and Riki.

Sounds like the simplest approach is to just follow the current approach
of labeling (and separately marking as broken) the inset as empty.

I'll work on a patch when I have time.

Scott

Attachment: signature.asc
Description: PGP signature

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

Reply via email to