> This is all more or less correct, but bundling is separate from compressing.
> Bundled mode doesn't involve any file format change, except for a buffer
> parameter flag (\bundled). It is important to understand this, as many of
> the remarks made below have to do with the "*.lyz" business. This has
> nothing to do with my approach.

You have not implemented that part so I guessed from your svn log. I
think you are right that your 'bundled mode' is simply a way to manage
external files.

> The thought was just that, if you turn on compression AS WELL AS bundling,
> then you should get a zip of the whole thing, and then it should be possible
> to open this "*.lyz" file in LyX and work with it. But this isn't
> implemented, and it isn't a file format change in any interesting sense. We
> already have compressed files. There's no reason we can't add the "bundle
> directory" to the zip.

It worth noting that our old compression feature has to be improved to
compress filename.lyxdir. It used gzip format and a zip format is more
likely for filename.lyxdir.

> This is all there is to my implementation. Turning on the "bundle" flag
> simply turns on the behavior described in (2) and (3). That's all. That's
> why the code is so simple. Conceptually, bundled mode does nothing but copy
> the files for the user into a subdirectory of the document directory, in a
> way that is transparent and, so far as I can see, essentially identical to
> what OOo does. All the criticisms below apply equally, so far as I can see,
> to OOo's behavior, then. Except that OOo doesn't allow "update from external
> file", which I do---though that isn't as yet implemented.

Working like OOo does not mean it is a good way for latex because we
routinely work with external files. If you do not want users to mess
around the filename.lyxdir directory, I would suggest that you always
put this directory under the temporary directory. If you do allow
users to update files under filename.lyxdir, clear directory
structure, good naming etc will matter.

One of the problems I have with your approach is that once a user work
in bundled mode, user-interaction changes a lot in that there is no
easy way to work with external files. And then, switching between
bundled and non-bundled mode is non-reversible.

You mentioned that the non-reversible problem can be solved by a
session approach, but you have not said how you would like to use it.
Will you copy your files to their original, potentially out of tree,
locations? If true, you are facing the same security problems you
mentioned. This will also lead to different behaviors when a user work
on different machines, with or without a session file.

Cheers,
Bo

Reply via email to