>>>>> "Georg" == Georg Baum <[EMAIL PROTECTED]> writes:

Georg> Jean-Marc Lasgouttes wrote:
>> When BufferView::Pimpl::loadLyXFile is invoked to load a file that
>> is already loaded, the user is asked whether he wants to just
>> switch or re-load the file. The following patch(es) chnage the
>> behavior so that, when the buffer is clean, the switch solution is
>> automatically selected.
>> 
>> Does anyone object to that?

Georg> Yes. What are the reasons for doing so? 

The original reason was a bad reason: that the session code had bad
interactions with your natbib code and loaded child documents twice,
therefore triggering bogus alerts. This has been or should be fixed
differently, so it is less relevant now.

However I thought at the time it was a good idea.

Georg> IMHO it is far more useful to automatically re-load the file in
Georg> this situation. I do from time to time tricky search/replace
Georg> with vim on the .lyx file. With the change above I would be
Georg> forced to close the file first before reopening it, currently
Georg> (and if it would be reloaded automatically) I simply can save
Georg> it, change it on disk, and open it again. 

Another idea I had for this case was to store in the buffer object the
file's last access time and check against that every time we do an
action that changes the buffer (like emacs does). This would solve
your particular problem and solve problems with files edited in two
places concurrently. I am not sure yet it is a good idea, so I did not
propose it.

Georg> Of course this can only be done if the buffer is clean. If it
Georg> is not clean the user must decide which version he wants.

Sue. The patch does that.

JMarc

Reply via email to