[texworks] Issue 369: [Enhancement] Make script functions callable from Tw

Stefan Löffler st.loeffler at gmail.com
Sat Oct 16 19:04:17 CEST 2010


Am 2010-10-16 00:28, schrieb Paul A Norman:
> Is it envisaged that 369 might be going towards ver 0.4?

The last thing I know, no, because...

> I was thinking we need to work with it if so, to get it stable ... is
> it in any of the development releases?

You name it. 369 is only the first step towards a much extended
scripting capability, so if we want to release 0.4 at some time in the
next ... months (?, trying to be careful here), 369 will have to be
postponed. As such, it's not included in any current builds that I know of.

> Does it actually incorporate the locking into main and sub window
> events, sorry signals?

I'm not sure what you mean be main/sub window signals. Anyway, it
doesn't do anything with respect to signals. It does pretty much exactly
what the issue title says: "Make script functions callable from Tw". So
it defines a new script type, "library", and enables C++ code to call
script functions. This is not used anywhere, yet, though, but in the
future we could build on that to allow scripts to register a sort of
callback function for menu entries, toolbar items, or to even call
functions from another script. Nothing of that is in the patch yet,
though, there's only some restructuring of existing code to streamline
everything and to implement the new type "library" (which I think should
eventually become the default type in the future).

> Are those toolbar/menu things a seperate next step after 369?

Yes (see above).
In particular, asynchronous scripts (i.e., libraries) contain a whole
new set of potential problems: threading. Such scripts may run at the
same time, may potentially share data or access data that is changed or
even deleted, etc. So this is going to need extensive testing...

> I have completely lost track of what is where, in the development process now.

To be honest, after a few months without much activity, I've lost track
of a few things myself. Before summer, we were basically entering
pre-release. This meant no big changes to the code anymore, no huge new
features. Mainly getting the things that are there running smoothly,
fixing bugs, and possibly doing some minor usability enhancements. And
of course get some user feedback to eventually wrap up 0.4.
Since this schedule is no longer valid anymore (we missed the TL'10
deadline, for example), I don't know exactly what Jonathan's plan for
the 0.4 release is.

> Is there any chance of some sort of summary of where we are actually
> up to with thngs,
> and where we are currently going, stages and steps please?

Well, as said above: I'm working under the premise that we're heading
for 0.4 next. This means bugfixing (several crash reports appeared
recently) and wrapping things up.
Beyond that, things are open for debate (and eventually up to Jonathan
to decide). Some general plans include:

Project management
This will require some more or less extensive restructuring of the C++
code - primarily to separate content (the actual TeX code you type) from
display (the windows, menus, etc.). In the end, for the user everything
should be as it is now, but internally, things should be better
organized. As consequences of that, (some of) the following requests
should be fairly easy to implement:
- tabbed editing
- additional display modes for the pdf preview (continuous, facing
pages, ...)
- fullscreen editing mode
- folding?
- possibly type-specific features, like different handling of different
file-types (different log parser for latex,context,...)?

I guess here is the "library" type of script the way to go. Since it can
do everything the standalone and hook scripts can do, I speculate that
it will eventually become the dominant script type. The process for
script authors should be quite simple:
* wrap all your code in functions
* possibly write some special functions for initializing (registering
menu items, hooks, ...) and finalizing (undoing everything from the

Other things that come to mind:
printing, multiple spellchecking dictionaries, useful keyboard shortcut
customization, ...

Jonathan, any comments/corrections/additions/...?


More information about the texworks mailing list