From: Christiaan H. <cmh...@gm...> - 2007-06-04 23:03:22
|
On 6/5/07, Adam R. Maxwell <ama...@ma...> wrote: > > > On Monday, June 04, 2007, at 03:43PM, "Christiaan Hofman" < > cmh...@gm...> wrote: > >When the file is deleted, the kqueue notification is broken. So some > >atomic writing processes can give problems. How can this be fixed? > >Should there be a timier for this case? > > I'm not sure how many ways it can break, but I tried this: > > 1) run LaTeX on test.tex from TextMate, opens test.pdf in Skim > 2) in Terminal, rm test.pdf > 3) switch back to Skim; proxy icon for test.pdf is now gone, but the > window is still there > 4) switch to TextMate, run LaTeX again, and the window for the deleted > test.pdf comes to the foreground > > I'm not sure how to handle that case. The kqueue notification is removed > now when the file is deleted or renamed, but it seems like the "open POSIX > file" in displayline isn't handled correctly by NSDocumentController, since > (IMO) it should be opening the newly created test.pdf file. Just renaming > test.pdf to test2.pdf and then re-running latex works as I expected, > though. > > Adam Opening a file shouldn't do anything if the file is already open, even if the file has been updated. That's just normal opening procedure of documents. So I do think this behavior is basically correct. Also because the script doesn't know about updates. However the file update checking should reload the file in this case, and that's what I'm talking about. So I think we should run a timer when the file is deleted to see if the file comes back, because kqueue is useless in that case. Christiaan |