On Sun, 14 Dec 2003, Angus Leeming wrote:
> Jim Osborn wrote:
>
> > Binding word-find-forward to a key, then starting things rolling
> > by typing;
> > M-x word-find-forward <my word><ret>
> > allows me to jump to subsequent instances of <my word> by pressing
> > the key w-f-f is bound to, so that's handy for searching when
> > the cost of all that typing makes it worth it. :)
> >
> > I don't suppose there's a way to get that "M-x word-find-forward"
> > bit into the minibuffer without having to type it all in, is there?
> > I notice the minibuffer doesn't do auto-completion.
>
> There is. If you're using the xforms frontend, use the <tab> key. If
> you're using the qt frontend, use the <right arrow> key. This latter
> has changed in the 1.4.x program to the <tab> key also.
Furthermore, if you are searching for the same word (let's say gargoyle),
then try typing this the first time:
M-x word-find-forward gargoyle <Enter>
which will find you the firs ouccurence. Now, in order to find it again,
type:
M-x <Up> <Enter>
When you press <Up>, the mini-buffer will be filled with the previous
command again (i.e. word-find-forward gargoyle) so when you press <Enter>
your search command is executed again.
> > I tried binding "command-execute word-find-forward" but that just
> > seems to pop me into the minibuffer, and when I type <my word>, I
> > get (Unknown function: <my word>). I couldn't seem to find a
> > variant with command-sequence that helped.
>
> I'm no expert. Christian seems to have this bind stuff sorted. Maybe
> he can advise?
AFAIK, there is no way to leave the focus with the mini-buffer... and the
reason that "command-execute word-find-forward" only pops up the
mini-buffer is (I'm guessing here) that command-execute doesn't take any
arguments.
Some suggestions for the future here would be:
* Introduce a lyx-function that ends a command-sequence but leaves the
focus in the mini-buffer, alternatively
* Change 'command-execute' so that it's arguments are put in the
mini-buffer and then the focus is put on the mini-buffer
We really should get an warning message when we try to use a lyx-function
with more arguments than it supports.. like with 'command-execute' above.
/Christian
--
Christian Ridderstr�m http://www.md.kth.se/~chr