Conversation
rationale : when vim modifies a file it creates a new file then rename it. So inode moves, and watching old inode doesn't detect the change.
|
Just for my information, how is this feature supposed to work? Hmm, moving the file leads to some flickering of the document in BePDF, so perhaps it is indeed auto-reloaded. But the window title and BePDF's "File info" doesn't show the changed path or file name... |
Before my patch : autoreload was not done because of an infinite loop (that's what the comment said in the code). New behaviour : watches on attributes changes on path name (using BPathMonitor), and deactivates the watching when BePDF changes the attributes at load , reactivates the watch just after if loading is ok. For the renaming of moving, i don't know what is the the good semantics to apply, I thought the watching did not trigger cause autoreload is trigger only on old full pathmane. Weird you got flickering anyway. For the Window Title/File Info not updated, I was not aware, i will check. |
|
Did you try to disable writebackups in vim? |
|
BTW, is auto-reload actually desirable? Text editors (StyledEdit, Koder, Pe, Genio) at least give the user the chance not to reload by popping up an alert. |
Sure, but BePDF is not an editor (except for notes) but a viewer. My use is case is to generate the PDF by BeTeX (one click in the latex->dvi icon and one click on the dvi->pdf icon) to see the result automatically in BePDF. |
I think there's currently an issue with saving comments etc., but assuming those fixed some day, wouldn't it be rude to have all comments/highlights/user-bookmarks/etc. silently lost when a document gets auto-reloaded? An alert would give the user the chance to cancel the reload and save the document. The "Reload" button should be the default, so a quick "Return" would trigger the reload. |
Watch on path instead of node (except when storing attributes)
rationale :
when vim modifies a file it creates a new file then rename it. So inode moves, and watching old inode doesn't detect the change.