On Mon, 15 Apr 2002 17:43:52 +0200 wrote Andre Poenitz <[EMAIL PROTECTED]>:
> Can any scripting language talk to LyX through the server pipes? > > > > I believe this would be an option. > I think it's the sanest way to go. It needs a *lot* more work with > getting the lyxfuncs into shape though. And that needs a volunteer ... > Coming up with some decent nameing scheme e.g. would not involve any code > reading for starters ;-} IMO, especially the Reference Guide needs completion. For any "LyX scripter" it would be the source to start. I wonder how to call the scripts: - Have an instance of an interpreter waiting on the outpipe, or - use a "system" call to start a script with M-x somthing or a keybinding. I would favour the second option: This way scripts in different languages (perl and python, say) could easily coexist. Also LyX already knows, how to call system commands. However, is there something like a "system" function, that can be used to call any user-specified command? Just now this works only partially: e.g. I can define a format "ASCII (tables)" and a converter "csv2lyx -o $$o $$i" to convert it to LyX format and the File>Import menu alows me to import csv files as lyx. (Why not Insert>File?). If I could call csv2lyx with some options right from LyX, i could also implement a "convert to a table" funktion: The selected text should be (killed and) passed ty csv2lyx, which already can speak to the lyxpipe to insert the result. A function that would be a great help when scripting is "apropos", a tool that lists all available/defined functions that contain a given regular expression... (of course a decent naming scheme would increase the value of "apropos" a lot!) Next on the wishlist is a FAST online help for LyX functions: The Reference guide takes it's while to load and format even in its incomplete state. A help function that asks for a function name (best with name completion) and displays just the relevant section would be a major improvement and could also be used by the "average user" that just wants to fulfill a task. E.g. I want to underline some characters, I do "M-x apropos underline" and get as result: font-underline Optionally, I do "M-x help font-underline" to read the help text Finally I mark the characters and underline with "M-x font-underline" (Best would be a linkage with the "apropos": just click on one of the results to see the help...) PS: I wonder whether this discussion is rather a topic for the developers list. OTOH, I'd like scripting to be an option for the "non-developer" (power) user of LyX as well... Guenter -- [EMAIL PROTECTED]
