Oh, that makes sense. Of course if someone really has patience, understanding, and maybe a functional-programming-bent, I'd guess a style could be designed that overrides \newcommand and other macro definition facilities so that they create lists of available macros, instead of actually defining them, and run this in the background to create a list of available macros which could then be used for the completion.
Again, its probably true that a very approximate and simplistic solution would probably provide 90% of the benefit, but I wouldn't claim that that would be simple to do, either. Examples of probably reasonable approximations: - only pick up some of the definition types - analyze styles in batch, and present lists based on those - ignore completely the cancellation/redefinition of macros, and simply show anything that was ever defined (autocompletion doesn't have to guarantee results that are correct at all levels) I can even almost imagine a regular expression based hack providing significant benefits... Daniel Andre Poenitz <[EMAIL PROTECTED]> wrote: > Date: Sat, 29 May 2004 17:05:35 +0200 > From: Andre Poenitz <[EMAIL PROTECTED]> > Subject: Re: \command completion > To: Ronen Abravanel <[EMAIL PROTECTED]> > Cc: [EMAIL PROTECTED], [EMAIL PROTECTED] > envelope-to: [EMAIL PROTECTED] > delivery-date: Sun, 30 May 2004 18:47:17 +0300 > > On Fri, May 21, 2004 at 04:14:07PM +0000, Ronen Abravanel wrote: > > I think lyx would be even more magnificant than it is if it helped out senile > > people like me that don't remember all of their latex commands when they are > > stuck. > > > > For example, if I write \twohead<tab>, vaguely remembering something like > > \twoheadleftrightarrow, then I would like to be told whether it really > > exists, or whether I'm barking up the wrong tree. > > Would be nice but as far as I can tell there is no way to retrieve all > defined macros in TeX. One can only check for a specific macro and even > that would be misleading as any standard TeX macro might have vanished > at the point where you try to insert it in LyX. > > > Probably some very simple variation on autocompletion would bring most of the > > benefit, even if it simply autocompleted the maximal prefix common to all > > commands that match the typed prefix (which doesn't require new UI elements, > > just looking up commands and inserting characters). > > Looking up commands is the problem here... > > Andre'
