Re: LyX FindAndReplace dialog roadmap (was Re: FindAdv Wrap Option)

2008-12-19 Thread Abdelrazak Younes
Tommaso Cucinotta wrote: Hello, it seems you didn't consider this last patch any further. Sorry, completely forgot about that. It was improving a lot on the speed of searching, thus it seemed to me a reasonable way to improve usability of it. I see some commits on trunk about FindAndReplace

Re: LyX FindAndReplace dialog roadmap (was Re: FindAdv Wrap Option)

2008-12-18 Thread Tommaso Cucinotta
Hello, it seems you didn't consider this last patch any further. It was improving a lot on the speed of searching, thus it seemed to me a reasonable way to improve usability of it. I see some commits on trunk about FindAndReplace, are you making a re-design of the feature ? Bye, T. Tommaso

Re: LyX FindAndReplace dialog roadmap (was Re: FindAdv Wrap Option)

2008-11-21 Thread Abdelrazak Younes
Tommaso Cucinotta wrote: Abdelrazak Younes ha scritto: IIUC, Paragraph would register itself in the passed DocIterator, right? We may also want to start from a given position inside the paragraph (0 by default). I assume you're talking about the Paragraph supplied as the search-text. Don't k

Re: LyX FindAndReplace dialog roadmap (was Re: FindAdv Wrap Option)

2008-11-20 Thread Tommaso Cucinotta
Abdelrazak Younes ha scritto: Yes, passing a paragraph was exactly what I had in mind. That's why I call that binary search ;-) Aha ! Presenting this term together with the "acrobat-like" stuff, and the performance issue, I was thinking instead that this term referred to a binary search in the

Re: LyX FindAndReplace dialog roadmap (was Re: FindAdv Wrap Option)

2008-11-20 Thread Abdelrazak Younes
Tommaso Cucinotta wrote: Abdelrazak Younes ha scritto: Hi Tommaso, Hi, Instead of adding this stringify() method, I would rather add a Paragraph::find() method. Then the actual searching would be done by the paragraph class that knows all that need to be known. This would also avoid the stri

Re: LyX FindAndReplace dialog roadmap (was Re: FindAdv Wrap Option)

2008-11-20 Thread Tommaso Cucinotta
Abdelrazak Younes ha scritto: Hi Tommaso, Hi, Instead of adding this stringify() method, I would rather add a Paragraph::find() method. Then the actual searching would be done by the paragraph class that knows all that need to be known. This would also avoid the string copying all other the p

Re: LyX FindAndReplace dialog roadmap (was Re: FindAdv Wrap Option)

2008-11-19 Thread Abdelrazak Younes
Tommaso Cucinotta wrote: Hello, please, find attached a preliminary patch implementing the idea. Now, each paragraph that does not contain any match is only stringified once, then we switch to the next one. When a matching paragraph is found, it is searched for more carefully by going pos by pos

Re: LyX FindAndReplace dialog roadmap (was Re: FindAdv Wrap Option)

2008-11-19 Thread Tommaso Cucinotta
Hello, please, find attached a preliminary patch implementing the idea. Now, each paragraph that does not contain any match is only stringified once, then we switch to the next one. When a matching paragraph is found, it is searched for more carefully by going pos by pos. Improvement w.r.t. the

Re: FindAdv Wrap Option

2008-11-18 Thread Andre Poenitz
On Tue, Nov 18, 2008 at 08:58:28PM +0100, Stefan Schimanski wrote: >> There's doc_iterator_begin/doc_iterator_end. >> >> Apart from that: >> >>> -// } >>> + // MathData md = cur.cell(); >>> + A // MathData::const_iterator it_end = ( ( len == -1 || cur.pos() >>> >>> + l

Re: FindAdv Wrap Option

2008-11-18 Thread Stefan Schimanski
There's doc_iterator_begin/doc_iterator_end. Apart from that: -// } + // MathData md = cur.cell(); + A // MathData::const_iterator it_end = ( ( len == -1 || cur.pos() + len > int(md.size()) ) ? md.end() : md.begin() + cur.pos() + len ); could you please try to kee

Re: FindAdv Wrap Option

2008-11-18 Thread Andre Poenitz
On Tue, Nov 18, 2008 at 12:54:34AM +0100, Tommaso Cucinotta wrote: > Hello, > > this implements the wrap option (first pending issue from the wiki): > > Bug 1262 Search & > Replace: "wrap" option > > only for the entire document scope case, for now.

Re: LyX FindAndReplace dialog roadmap (was Re: FindAdv Wrap Option)

2008-11-18 Thread Tommaso Cucinotta
I also think the best option would be to implement a custom "visit" of the insets graph, in such a way that, at least for each inset, I can trace the portion of text that belongs to it. But if this would imply changing each and every insert, then it would be impossible to achieve. T. Stefa

Re: LyX FindAndReplace dialog roadmap (was Re: FindAdv Wrap Option)

2008-11-18 Thread Stefan Schimanski
Am 21.11.2008 um 19:49 schrieb Tommaso Cucinotta: I think I can easily modify it so as to realise a hierarchically sequential search (not a real binary search). Instead of advancing one position, exporting from the current position to the end of paragraph, then searching for a matching seg

Re: LyX FindAndReplace dialog roadmap (was Re: FindAdv Wrap Option)

2008-11-18 Thread Stefan Schimanski
Am 21.11.2008 um 19:42 schrieb Tommaso Cucinotta: Stefan Schimanski ha scritto: My wish: 5) search and replace through all master and child documents This was planned to be one of the "scope" option. If you look at the current dialog, there is a set of radio buttons allowing one to select o

Re: LyX FindAndReplace dialog roadmap (was Re: FindAdv Wrap Option)

2008-11-18 Thread Tommaso Cucinotta
I think I can easily modify it so as to realise a hierarchically sequential search (not a real binary search). Instead of advancing one position, exporting from the current position to the end of paragraph, then searching for a matching segment *at the start*, I would try to advance one paragrap

Re: LyX FindAndReplace dialog roadmap (was Re: FindAdv Wrap Option)

2008-11-18 Thread Tommaso Cucinotta
Stefan Schimanski ha scritto: My wish: 5) search and replace through all master and child documents This was planned to be one of the "scope" option. If you look at the current dialog, there is a set of radio buttons allowing one to select one of multiple "scopes" for the search, whereas the

Re: LyX FindAndReplace dialog roadmap (was Re: FindAdv Wrap Option)

2008-11-18 Thread Abdelrazak Younes
Stefan Schimanski wrote: Am 18.11.2008 um 13:37 schrieb Abdelrazak Younes: Hi Tommaso, I'll try to have a look at your patch later but I'd like first to outline the decided road-map for this feature: 1) Fix all issues in FindAndReplace dialog, which is based on your AdvSearch patch. Whic

Re: LyX FindAndReplace dialog roadmap (was Re: FindAdv Wrap Option)

2008-11-18 Thread Stefan Schimanski
Am 18.11.2008 um 13:37 schrieb Abdelrazak Younes: Hi Tommaso, I'll try to have a look at your patch later but I'd like first to outline the decided road-map for this feature: 1) Fix all issues in FindAndReplace dialog, which is based on your AdvSearch patch. Which also means 1-a) ad

Re: LyX FindAndReplace dialog roadmap (was Re: FindAdv Wrap Option)

2008-11-18 Thread Abdelrazak Younes
Tommaso Cucinotta wrote: Hi, thanks for keeping me up-to-date. The 1-b) requirement seems compatible with the one in 4), but of course the "wrap-around" feature may loss of any meaning. No, I meant to have this feature in _addition_ to the the conventional find dialog. Or maybe this feature w

Re: LyX FindAndReplace dialog roadmap (was Re: FindAdv Wrap Option)

2008-11-18 Thread Abdelrazak Younes
Pavel Sanda wrote: Tommaso Cucinotta wrote: Also, are you sure we cannot easily speed-up things even keeping the current text-based search ? i dont think that binary search is a must in itself, IMHO it is. We cannot guarantee a bullet proof search unless we do a binary search. b

Re: LyX FindAndReplace dialog roadmap (was Re: FindAdv Wrap Option)

2008-11-18 Thread Pavel Sanda
Tommaso Cucinotta wrote: > Also, are you sure we cannot easily speed-up things even keeping the > current text-based search ? i dont think that binary search is a must in itself, but the current speed is unbearably slow. to wait 30s for searching through math manual is so much that i fear that it

Re: LyX FindAndReplace dialog roadmap (was Re: FindAdv Wrap Option)

2008-11-18 Thread Tommaso Cucinotta
Hi, thanks for keeping me up-to-date. The 1-b) requirement seems compatible with the one in 4), but of course the "wrap-around" feature may loss of any meaning. Actually, are you sure you want an Acrobat-like functionality ? The major drawback of the current approach, in my view, is the speed, no

LyX FindAndReplace dialog roadmap (was Re: FindAdv Wrap Option)

2008-11-18 Thread Abdelrazak Younes
Hi Tommaso, I'll try to have a look at your patch later but I'd like first to outline the decided road-map for this feature: 1) Fix all issues in FindAndReplace dialog, which is based on your AdvSearch patch. Which also means 1-a) add the Replace function 1-b) switch to a binary sear

FindAdv Wrap Option

2008-11-17 Thread Tommaso Cucinotta
Hello, this implements the wrap option (first pending issue from the wiki): Bug 1262 Search & Replace: "wrap" option only for the entire document scope case, for now. Instead of having yet another option on the dialog, I'm proposing a simple que