Re: (Key)word completion feature

2007-08-10 Thread Bo Peng
> Yes, but I have my doubt that it can be done really right. OTOH, one > can implement the search-based method and switch to something else if > it really does not work. You know: "premature optimization yada yada". This does not matter. class WordMagic can certainly keep a pointer to the buffer a

Re: (Key)word completion feature

2007-08-10 Thread Dov Feldstern
Jean-Marc Lasgouttes wrote: "Bo Peng" <[EMAIL PROTECTED]> writes: Bo --- your idea is interesting, I hadn't even considered such an option... I discarded the scanning idea without a second thought because scanning through a document can be tedious. The index database method, if implemented c

Re: (Key)word completion feature

2007-08-10 Thread Jean-Marc Lasgouttes
"Bo Peng" <[EMAIL PROTECTED]> writes: >> Bo --- your idea is interesting, I hadn't even considered such an >> option... > > I discarded the scanning idea without a second thought because > scanning through a document can be tedious. The index database method, > if implemented correctly, has the po

Re: (Key)word completion feature

2007-08-09 Thread Bo Peng
> Bo --- your idea is interesting, I hadn't even considered such an > option... I discarded the scanning idea without a second thought because scanning through a document can be tedious. The index database method, if implemented correctly, has the potential to provide instant word completion sugge

Re: (Key)word completion feature

2007-08-09 Thread Dov Feldstern
Jean-Marc Lasgouttes wrote: "Bo Peng" <[EMAIL PROTECTED]> writes: 1. when a word is entered (' ' entered), update database And if I delete a letter in the middle of the word, it should delete the old word (if there is no other copy in the document) and create a new one with one less letter.

Re: (Key)word completion feature

2007-08-09 Thread Jean-Marc Lasgouttes
"Bo Peng" <[EMAIL PROTECTED]> writes: > 1. when a word is entered (' ' entered), update database And if I delete a letter in the middle of the word, it should delete the old word (if there is no other copy in the document) and create a new one with one less letter. This is what I meant by fragil

Re: (Key)word completion feature

2007-08-09 Thread Bo Peng
> This might be fragile, unless you plan to add hooks into all the > places that might enter/modify a word. I think it is enough to enable this for plain text in InsetText and InsetTablular, because indexing formula etc does not make sense. Then, it can be narrowed down to 1. when a word is enter

Re: (Key)word completion feature

2007-08-09 Thread Jean-Marc Lasgouttes
"Bo Peng" <[EMAIL PROTECTED]> writes: > This is not what I have in mind. I am thinking of a word index > (database), that will be updated when a buffer is loaded, and with the > addition of each word. When completion is requested (it would be > difficult to provide hint at every keystroke), we look

Re: (Key)word completion feature (was: Re: topic for Bromarv meeting)

2007-08-09 Thread Bo Peng
> The main reason I raised this issue right now is just that I think that > if the search is properly designed, it should be able to provide an > internal API which would allow us to easily find all occurrences of a > given prefix, which is a major requisite of a word-completion feature... This is

(Key)word completion feature (was: Re: topic for Bromarv meeting)

2007-08-09 Thread Dov Feldstern
Bo Peng wrote: - Bug 3713 Keyword completion feature of lyx which I would also be very happy to see (this is what I actually set out to solve when I first joined the list, but then I got waylaid by the RTL stuff...). This one is the third on my TODO list, after embedding and shortcut dialog.