Tommaso, I have submitted a proposal to GSoC about the idea above, but obviously it will be subject to changes as the community thinks fit. So please help me refine the proposal, I hope it's not too late! My exams got over just today :)
Regards, Siddhartha RT. On Fri, May 3, 2013 at 3:43 PM, Siddharth R T <sddhrt...@gmail.com> wrote: > > > Try these: > > > > http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg178570.html > > http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg178331.html > > Going through the discussion there, I have a couple of ideas : > > If regular expressions have to be enabled, then queries will be > regular expressions embedded in latex code/plain text. This makes it > necessary to maintain a latex version of the content (not export every > time find is invoked). > > An alternative would be: > > - We maintain a table that works like a symbol table - it has all the > objects that are there in the current document and it's text > content. i.e.: > > object | content > -----------|----------- > section | Introduction > subsection | this is the text in the subsection > > - The table is updated as and when new content is added to the editor > window. Maybe there is some scope for optimization here. > > - Maybe each entry will also have a mapping to the inset which > represents it (I'm not entirely sure how insets work, yet). > > - Whenever find is invoked, the query is also converted into (a chain > of) object and content. > > - To match, you first filter all objects of the query type (assuming > there's only one query term). Next, match the content - here there > can be regular expressions in the query. Results are displayed > using the mapping between insets and query items. > > > What do you think? > > On a side note, cant there be a search for text inside the editor window > also? > This could help a lot in editing long papers - maybe you dont want to > put a mathematical symbol in the query after all. > > >