> Might I ask, what are a few straightforward examples of the new capabilities
> a scripting language will provide users of lyx?

Of course, a scripting language will not provide anything that is not possible
if we wrote the stuff directly in C++, but the scripting language will
hopefully make things easier, because we work at a higher abstraction level.
And therefor, we will get a potential larger population of developers and thus
a higher production, because you don't need to understand C++, wait for a
compiler, make sure the code works on gcc 2.7.2, and other disadvantages of
C++.

Concretely, the introduction of a scripting language will help us do some of
the things we have postponed because their solution are naturally found in a
scripting language.  

For instance, running LyX in batch mode:
Write a small script which will open all *.lyx documents in a directory
structure, and convert them to postscript.  If we provide a general hook for a
script on the command line, we will instantly get all this kind of operation. 
(Of course, you could also print them, export the as ascii, or whatever
combination thereof.)

Daily time saving rutines:  If you need to swap two columns in a table, record
a macro that will swap the stuff for one line, and replay that on the lines
that needs to be swapped.  I.e. some operations that are useful in some
situations, but still not general enough to warrant to get it's on feature. 
Other examples could be swapping two words and put in a comma, to arrange a
list of people's names.  Others again would be to sort on something that needs
to be rearranged slightly before the sort.

Write a script which will spellcheck all documents in a directory, collect all
the misspellings, and write them to a file.  Or, if the spellchecker is
interfaced nicely (or done in the scripting language), spellcheck all documents
at the same time.

Do mail-merge, and connect to a real database for the addresses.

Do conditional documents:  In the document, there will be a toggle-button.  If
that is clicked, the language of the document would be Danish. If not, the text
would be English (or similar things.)

Do the graphical tutorial interactively in 25Kb rather than posively in 1,25
MB.

Write a module that would grab all "LyX Code" environments in a document,
export that to a separate file, and compile that with your C++ compiler.  Thus
LyX instantly support literate programming, with high quality type-setting.

The list goes on, and your imagination is the limit.

The elisp scripting language is what made Emacs a succes, because not only did
it allow the users to customize the editor completely, but it also allowed the
editor to be extended to solve completely different problems.  
A scripting language in LyX will allow something similar to happen, although
there are inherit limitations to the problem we deal with.  In theory, however,
it would be technically possible to write a mail-reader in LyX scheme.

Greets,

Asger

Reply via email to