Re: [evince] auto-reload question



> 2012/2/15 Dries Kimpe <dries kimpe be>

>> I've noticed that auto-reload, i.e. evince detecting that the file was
>> changed on disk and automatically reloading the file, is no longer working.

> Hi Dries,

> May it be related to this bug report:
> https://bugs.launchpad.net/evince/+bug/145637
> ? 

Unfortunately, no. I had searched and found this bug report before, but it
seemed like it didn't apply to my case.

It did help me though:
I found that when using the example from the bug report, as
copied below, auto-reload worked.

1) echo test > test.txt
2) a2ps test.txt -o - | ps2pdf - test.pdf
3) evince test.pdf &
4) echo test2 >> test.txt
5) a2ps test.txt -o - | ps2pdf - test.pdf

If I tried this on another document (generated by make and a2x/asciidoc) it
somehow did not work.

The example from the bugreport did direct me to the source of this problem
though. Using inotify, I determined that the file gets *removed* before
being reconstructed in my case, as opposed to truncated and overwritten
as in the example from the bug report.

Inotify (and evince I assume) stop watching the file once it gets removed.

So, I'm not sure what evince should do in this case. It is watching the
file, but what does this mean if the file gets removed and another file
appears with the same filename?

Also, it seems that, as far as reactivating an existing window is
concerned, the file name is used to determine if a new window should be
opened or not.

However, for for auto reload-purposes, merely recreating a file with  the
same file name does not seem to be sufficient to trigger a reload.

I could implement the behaviour I want (which is that evince automatically
reloads the file, even if it gets removed and recreated) using the inotify
tools, but unfortunately evince still grabs focus when reusing the old
window. Is there a way to disable the focus grabbing?

  Thanks,
  Dries


PS. Sorry for the slow response - I missed your email as I wasn't yet
subscribed to the list.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]