[texworks] external read-access causes TeXWorks to revert open file to old version
warrence.stm at gmx.de
Mon Oct 25 19:19:23 CEST 2010
it has been a while since the last reply, but I was only now able to
test again on my Linux machine with those debug messages you gave me (I
didn't compile it for Windows).
So, still strange things that happen. (Sometimes) When I change
something in the open tex file in TW, save and commit this change with
TortoiseHG (my Mercurial client), the debug messages say that the open
tex file has changed and that the same file is loaded (again). Then TW
displays an older version of the tex file. To get my current file back I
have to reopen TW.
So there are basically two possiblities I can think of.
(1) TW has a problem with TortoiseHG accessing the tex file and
"restores" an old version of the file. What goes wrong? Where does the
old file come from?
(2) TortoiseHG messes with the tex file causing TW to reload it. Why
should TortoiseHG write on the file? And if TortoiseHG temporarily
writes to the tex file, why doesn't TW reloads again when TortoiseHG
restores the current (committed) version?
Hopefully someone has an idea what's causing the problem or how it could
be fixed, especially if it's (1). Thanks in advance.
On 22.09.2010 18:07, Stefan Löffler wrote:
> Am 2010-09-22 17:49, schrieb Stefan Müller:
>>> Anyway, if you build Tw yourself, you could add the following to lines
>>> (linenumber where to add in brackets) to get some debugging information:
>>>  qDebug()<< "Loading:"<< fileName;
>>>  qDebug()<< "Changed:"<< curFile;
>>> This should print the filenames Tw loads, and whenever it detects a
>>> change to the filename on the harddisk.
>> Maybe that's not clever to ask, but in which file should I put those lines? I
>> looked into TWApp.cpp, but it looks wrong there...
> Oops, sorry. In src/TeXDocument.cpp.
More information about the texworks