Christian Ridderström wrote:
> Speaking of that, I used my script to see how the lfuns have changed
> between the recent releases. The lfuns for Lyx 1.3.1 - 1.3.3 are the
> same, but the n:o lfuns has dropped from 241 to 238 in the latest
> CVS. However, the n:o lfuns in
> 
> 1.3.3 is...                   241
> HEAD is...                    238
> both 1.3.3 and HEAD is...     206

Which indicates two things:
1. Some lfuns are becoming more powerful. You can do more from 
outside lyx 1.4.x than you could from outside lyx 1.3.x with fewer 
lfuns.
2. We make no effort to translate old-style lfuns to new style lfuns.

I have been thinking for a while of an lfun2lfun script. As an 
example:

citation-insert -> dialog-show-new-inset citation

But perhaps this is only part of a wider scripting capability. It is 
possible to define the properties of an inset _exactly_ from outside. 
We use a snippet of the lyx format to pass the information. For 
example

inset-apply citation LatexCommand \citeN[see]{leeming2003}

an aside: I should strip out the part handled by the buffer (as 
oppossed to the inset), "LatexCommand" here...

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.

-- 
Angus

Reply via email to