On Mon, Jan 25, 2021 at 02:02:09PM +0100, Kornel Benko wrote: > Problems with FindAdv and search with not ignored format > > What we have now is something 'neither fish nor fowl'. > > For instance for the search of characters with a specific size > we use strings/regexes wrapped with the size-spec. All is nice, until the > size is the > default in the document. In that case the wrapping has no effect (because the > text > created by latex output does not contain this info) > > Same is valid for language, color, family, series, shape, etc. > Also we don't have the options to exclude characters with specific features > from search. > (like search for words which are not part of a Latin sequence) > > I am not sure, if investing more into this (without creating a nex > export-type for search > (ala Docbook)) would get better sollutions. > > Comment are appreciated.
I use Advanced Find about once a week and for those times it is just the right tool for the job. However, when I use it with certain combinations of regexes and settings, I do not not just use it without thinking about it and assuming that it does what I intended. I use it to do the find/replace or whatever I'm doing, and then I look at "git diff" of the document I modified to do a quick double-check, and then I do a manual search to see if I missed anything else. As long as I proceed with that caution, it's a helpful tool to me personally. And thinking about it more, when I do a regex find/replace in Vim I also always proceed with caution and do double-checking. I think this indicates that I really don't trust myself to get the regex right the first time. I don't know how to answer your questions since I don't know the code. But I feel it will be impossible to fix everything for it. Also, I think that this is a good example where having unit tests would be considerably better than the autotests. That is, without a unit test framework and an extensive set of unit tests, I would be hesitant to change anything. But that's just because the code looks scary to me. Also, I haven't tried the autotests in a while so maybe those work better than I remember. I guess what I'm saying is I'm glad you spent a good chunk of time on it and fixed a bunch of issues all at once because I think whoever edits the code really needs to get a feeling for it. This part of the code does not seem like an area where one can casually drop in and fix individual bugs from time to time without unit tests that would check that nothing else is broken. In any case, thanks a lot for bravely tackling the code and improving it! I've been using it on master and it is more accurate and faster than before. My "trust" of it has definitely increased. Scott
signature.asc
Description: PGP signature
-- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel