[Pmwiki-users] Re: Action to provide last modified date and md5 checksum

Christian Ridderström chr
Fri Jul 9 00:37:41 CDT 2004


On Thu, 8 Jul 2004, Patrick R. Michaud wrote:

> On Fri, Jul 09, 2004 at 12:38:57AM +0200, Christian Ridderstr?m wrote:
> > I was thinking of how to handle this, and in order to do that I think it
> > would be good if I (Emacs) could access the last date a page was modified,
> > and also if I could get an md5 checksum off a page's contents.
> 
> Note that PmWiki 2.0 already handles merging of simultaneous edits,
> provided that the program posting a new version of a page also provides
> a 'basetime' parameter that indicates the version of the page that was
> used as the source for the edit.  IIRC, basetime doesn't have to be the
> exact timestamp of the page itself, but can be simply the time in which
> the source was retrieved.

I knew something was going to happen, but I'm not sure how to make Emacs 
interact properly with this. When editing from within Emacs you can allow 
yourself more options than a simple automatic merge.

* Emacs checks for any conflicts before saving and warns the user:
** The user can choose to let pmwiki do an automatic merge
** The user can choose to manually merge the differences
** The user can abort the save

So even if pmwiki handles the merge, I'd still like to enable Emacs to 
check if the page has been changed. Actually, I can even imagine a small 
background task in Emacs that once a minute checks if the page has been 
changed and shows a small warning flag in the status bar.

> > Is this already available in pmwiki? If not, maybe we could introduce an 
> > action that provides details of a page in some simple format (e.g. plain 
> > text). 
> 
> I like John's suggestions for using an existing standard (e.g., Dublin
> Core Extensions) for this.  We could also define custom HTTP response
> headers, as in X-PmWiki-Last-Modified: 1017503435 and the like.

I like his suggestion as well. It should be a simple matter to introduce
two fields for the modification date and MD5 checksum. Emacs wil need the
MD5 checksum to see if the uploaded page was kept as it was uploaded, or
if an automatic merge occured. In which case Emacs shold probably download
the page again.

/Christian

-- 
Christian Ridderstr?m                           http://www.md.kth.se/~chr





More information about the pmwiki-users mailing list