Re: evince reload: weird behaviour ?

2011-03-14 Thread Darac Marjal
On Mon, Mar 14, 2011 at 01:55:56AM +0100, Jerome BENOIT wrote:
 Hello List,
 
 I have just notice the following (weird ?) behaviour.
 When I view a pdf file with evince,
 if I move (`mv') a new pdflatexed version of this file, I have to reload it 
 manually in evince.
 But if I touch (`touch') the new pdflatexed version, evince reloads  it as 
 expected.
 
 Is there any (rational) explication for that ?

This strikes me as behaviour related to filesystem inodes. When you
'touch' a file, the metadate (in this case, the date) on the file is
modified. Evince sees this and reloads the file. But when you move one
file into the place of another, Evince is still looking at the old file.

There is a peculiarity (peculiar from a Windows perspective, a boon from
a Unix perspective) about Linux filesystems that a file is only deleted
once all references to it are gone. So, in the case of the old file, we
have two references: 1) The directory entry and 2) Evince's handle. By
moving the new file in, we delete the old directory entry and make a new
one pointing to the new file. However, reference 2 still exists. 

So, as far as Evince is concerned, the file hasn't changed.

You may be able to work around this by cat'ing the new file into the old
one. That would change the contents of the old file AND retain the
existing inode.



signature.asc
Description: Digital signature


Re: evince reload: weird behaviour ?

2011-03-14 Thread Jerome BENOIT

Hi !

Thanks for the reply.

On 14/03/11 13:50, Darac Marjal wrote:

On Mon, Mar 14, 2011 at 01:55:56AM +0100, Jerome BENOIT wrote:

Hello List,

I have just notice the following (weird ?) behaviour.
When I view a pdf file with evince,
if I move (`mv') a new pdflatexed version of this file, I have to reload it 
manually in evince.
But if I touch (`touch') the new pdflatexed version, evince reloads  it as 
expected.

Is there any (rational) explication for that ?


This strikes me as behaviour related to filesystem inodes. When you
'touch' a file, the metadate (in this case, the date) on the file is
modified. Evince sees this and reloads the file. But when you move one
file into the place of another, Evince is still looking at the old file.

There is a peculiarity (peculiar from a Windows perspective, a boon from
a Unix perspective) about Linux filesystems that a file is only deleted
once all references to it are gone. So, in the case of the old file, we
have two references: 1) The directory entry and 2) Evince's handle. By
moving the new file in, we delete the old directory entry and make a new
one pointing to the new file. However, reference 2 still exists.

So, as far as Evince is concerned, the file hasn't changed.


I understand what is going on now.


You may be able to work around this by cat'ing the new file into the old
one. That would change the contents of the old file AND retain the
existing inode.



Is cat'ing better than mv'ing and touch'ing ?

My first thought is that cat'ing is slower,
but I may still miss something.

Jerome


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org

Archive: http://lists.debian.org/4d7e8a5e.8020...@rezozer.net



evince reload: weird behaviour ?

2011-03-13 Thread Jerome BENOIT

Hello List,

I have just notice the following (weird ?) behaviour.
When I view a pdf file with evince,
if I move (`mv') a new pdflatexed version of this file, I have to reload it 
manually in evince.
But if I touch (`touch') the new pdflatexed version, evince reloads  it as 
expected.

Is there any (rational) explication for that ?

Thanks in advance,
Jerome


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org

Archive: http://lists.debian.org/4d7d679c.9070...@rezozer.net