With the help of the Skim list (and one Christiaan Hofman), we might  
have figured out why Skim (the PDF-PS reader) isn't reloading changed  
files. Recall that the initial motivation for automatic reloading was  
use Skim  as a viewer for TeX. Since TeX can write to the file over  
some period of time, they look for %%EOF to determine if the file is  
fully written. PLplot does not terminate a PS file that way.

Here is his comment:


> On Aug 14, 2007, at 4:42 AM, Christiaan Hofman wrote:
>> That explains it. We check for %%EOF to find out if the file has been
>> fully written. Otherwise we have no way to know if a file is complete
>> (and tex writes incrementally, so loading too earl;y can lead to a
>> crash).
>>
>> Christiaan
>>

Jerry




On Aug 13, 2007, at 11:56 PM, Jerry wrote:

>
> On Aug 13, 2007, at 2:36 AM, Andrew Ross wrote:
>
>>
>> Jerry,
>>
>> When plplot writes any file it uses fopen to open the file first,  
>> with
>> the "wb+" options to make the file writeable and to truncate the
>> file if
>> it already exists. This is the standard C way to deal with opening
>> files so I'm surprised it doesn't work. What do the Skim people
>> "recommend" as a way of opening files?
>
> They didn't recommend anything specifically--the solution I use is to
> make an edit to the file so that the program sees it as "dirty." Skim
> has (as do most Mac programs--not sure about non-Mac) a Revert
> command under the File menu. Before editing the file, Revert is
> inactive ("grayed out") and after the edit it is active--selecting
> Revert then loads the contents of the file from the state of it's
> last "save."
>
>>
> Here is the most relevant comment from the other group:
>
>   In fact PS files are followed for file changes. So the problem is
>   somewhere else. Probably the PS file is deleted before it is
>   replaced, in which case it's lost track of.
>
>> Are you using the ps driver or the psttf driver?
>
> Not sure, and don't know how to find out. Suggestions accepted.
>
> Jerry
>
>> The psttf driver has to
>> do some more complicated manouvers to get a C++ stream. It first  
>> opens
>> and truncates the file as above. It the closes the C stream and opens
>> the file again as a C++ stream.
>>
>> Andrew
>>
>> On Thu, Aug 09, 2007 at 04:24:43PM -0700, Jerry wrote:
>>> This is kind of a low-priority issue but I thought I'd throw it out
>>> anyway. There is a spiffy new PDF/PS reader being developed for the
>>> Mac called Skim. (OS X has a PDFkit which helps such projects.) The
>>> main purpose is to provide a way of reviewing and marking up PDF and
>>> PS files such as papers and manuscripts, as well as being a general
>>> PDF/PS viewer. It also has the ability to act as a display for TeX
>>> output and in that capacity it can optionally check for changes to a
>>> file and re-display the file if changes have been made. I've been
>>> using Skim lately (in lieu of an AquaTerm fix that was discussed  
>>> here
>>> earlier) to look at PLplot output after my program has finished. I
>>> had thought that it would automatically reload the file when my
>>> program finished, having noticed that the file had changed. However,
>>> this does not happen and I have to manually reload the file. The  
>>> guys
>>> working on Skim have deduced that PLplot must first delete the old
>>> file and then make a new file and Skim does not see this as a change
>>> to a single file.
>>>
>>> Jerry
>>>
>

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to