Am Mon, 18 Apr 2022 21:22:41 -0400 schrieb Scott Kostyshak <skost...@lyx.org>:
> On Mon, Apr 18, 2022 at 12:21:40PM +0200, Kornel Benko wrote: > > The output while debugging findadv is overwhelming, but sometimes > > one needs only a small subset. Therefore the addition of -dbg findshort. > > > > Also it would be possible to use constructions like > > LYXERR(Debug::FIND|Debug::FINDSHORT, "Setting regexp to : '" << > > regexp_str << > > "'") (mark the '|' in 'Debug::FIND|Debug::FINDSHORT' parameter) > > > > The changes to lyxfind.cpp are also attached. > > > > OK to commit? > > I'm surprised this hasn't come up with a different context. > > Would it make sense to have a more general mechanism? For example, > instead of find vs. findshort, what if we instead use --verbose ? Good idea. > We do > currently have a "--verbose" but what I mean is to change "--verbose" to > accept a "<level>" argument that determines how verbose the debug output > is. So this way, "lyx --debug find --verbose 1" would give the same > output as "FIND", and "lyx --debug find --verbose 2" would give the same > output as "FINDSHORT". Maybe the other way around. FIND -> FINDLONG, FINDSHORT -> FIND so that --verbose 2 would select FINGLONG. > I am not opposed to the patch, but if we do this for other debug flags, > and if we then decide to add e.g. 'FINDMEDIUM' it can get complicated. > But on the other hand, you are the first to propose this at least since > I've been here I think, so perhaps it is indeed a "one-off" and your > patch of "FIND" and "FINDSHORT" are better than implemening a general > mechanism that not many will use. Indeed, I would not argue against > "Advanced find" being a tricky beast that needs a special treatment. > Thank you for tackling this beast, by the way. :) > We can always add a more general mechanism later (i.e., even if you > commit your patch) if there is interest. It's not like this is a LyX > fileformat change where once something is in it can be annoying to > change. Yes. > I propose that if no one else responds, you commit your patch. > > Scott Kornel -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
pgp2D0BJNiuen.pgp
Description: Digitale Signatur von OpenPGP
-- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel