Christian Ridderström wrote: >> I have been thinking for a while of an lfun2lfun script. As an >> example: >> >> citation-insert -> dialog-show-new-inset citation > > What would this lfun2lfun-script operate on? (Or do you mean that it > would act like a filter on commands typed in the mini-buffer, see > what I wrote in the end?)
Yes it would act as a filter, both on commands typed in the minibuffer and on commands input from the lyxserver. >> The point I'd like to make is that this lfun syntax is powerful but >> cumbersome. I can imagine an lfun2lfun script that generated such >> commands from simpler input by the user. >> >> That way, LyX will have to handle fewer lfuns and the user will >> still have his syntactic sugar. > > This might be what you already suggest, but how about allowing > 'lfun-macros' (i.e. translations) to be defined in an external text > file. It could look like this: > > lfun-define "citation-insert" "dialog-show-new-inset citation" That's exactly what I envisage. > which would mean that when the mini-buffer receives > 'citation-insert', The minibuffer receives nothing. It simply posts the input back to the core. This input string could be passed through lfun2lfun to generate a 'real' lfun tht the core will understand. it will look through the text file (or a loaded > database) for translations and apply them. In addition, if the user > can edit this text file, he will be able to create new lfuns as > well. Genau. -- Angus