On Thu, Mar 4, 2010 at 6:05 AM, Pavel Sanda <[email protected]> wrote:
> John McCabe-Dansted wrote:
>> Below I present very preliminary support for warning the user when
>> their LyX file is externally modified. Does the following approach
>> sound worthwhile?
>
> this has even some bug number. the reason why its not implementeed
> yet is that its not easy to find a point where to trigger such
> check. for example you definitely dont want it to be checked after
> each typing keystroke inside markdirty. you avoided it, but for the
> price that you'll never check this once editing file started.
> also i would like to have this check on one point not at 10 different
> places...

Would checking in two or three places (as proposed) seem excessive?

>> When the buffer is marked dirty it checks if the file is modified
>> externally. This may avoid the need to merge at all. I suggest that we
>> also:
>> 1) Checks every 1 minute if the file has been modified (Even if a
>> merge is required, the sooner the easier)
>
> that is one possibility. i felt somewhat uncomfortable to have such
> asynchronous events in the code, but now i realized it might be possible
> to attach it to the code for automatical file saves...
>
> secondly it should be possible to turn it off (maybe even by the
> automatical save option?). there are rare but regular reports
> about problems when file are saved over network, and it should
> be possible to avoid automatical saves/polling for such users.
>
>> 2) Checks if the file is modified when the Buffer gains (like kwrite)
>
> dont understand this.

Sorry, this should have been:
  Checks if the file is modified when the Buffer gains *focus* (like kwrite)

This presumably could be done by listening for Qt "focusChanged"
signals, though I haven't checked how kwrite does this.

>> Finally, I was thinking that when the file is under version control
>> LyX could poll the version control about every half hour to see if
>> there is a remote update. This should be subject to various
>
> how do you imagine such svn poll technically?

Well, for example, when I start LyX I run (attached)
    svn-up-to-date.sh &
Polling the server every 30 minutes could reduce further the
possibility that a merge is needed.

-- 
John C. McCabe-Dansted

Attachment: svn-up-to-date.sh
Description: Bourne shell script

Reply via email to