Jürgen Spitzmüller wrote:
and probably this:
http://bugzilla.lyx.org/show_bug.cgi?id=4812
I filed that bug---but it came from the user list---and I've thought
quite a bit about it. The solution that Bo proposes there is obviously
not one we can easily implement: It essentially involves a complete
re-working of how layouts are handled, not to mention a layout editor
GUI. I don't forsee that even by 1.7, and we can't wait that long. This
is a very serious bug.
Frankly, I'm a bit skeptical about this "local layout file" business. My
understanding was that it was added to make it easier to share documents
with supervisors, etc: You can send the LyX file and the layout file,
and if they're both unpacked to the same directory (even to /tmp), then
all is well. But if the facility exists, then people will use it for
other reasons: They'll create their layout files in the document
directory rather than in the user directory, and that is when we get
problems, such as the one reported. There's no good reason to do that,
and allowing people to do it discourages re-use. And surely it isn't
THAT hard for people to add a layout file to their user directory! Not
making them do so makes things just a teeny bit more convenient in
certain special cases, but, obviously, it leads to weird bugs, like this
one. Moreover, if we had (I hate to say it) some workable bundling
feature, then the ability to bundle the layout would be part of it, and
that would address the issue with the supervisor. But we can't wait for
that, either.
Ultimately, then, I don't see any workable solution other than to remove
support for "local layout files", at least from 1.6.x. Doing so will
make sharing files with personalized layouts slightly more difficult, to
be sure, but, well, it seems to me that (minor) inconvenience is one
thing---how often does the layout need to be changed, anyway?---and
dataloss is entirely another. I'm willing to do that work if we think
that is the way to go.
Whether you want to go that far in 1.5.x, I don't know. The problem, of
course, would be that people who had been using local layouts would
effectively lose them when they opened their files. But we could still
look for the local file and, if we found it, pop up a special message
refusing to open the file and telling them to move the file to their
user directory and reconfigure. We could even do that for them. This is
not good, but dataloss is not good, either.
Richard