[Pmwiki-users] Autosave on Preview

Steven Leite steven_leite
Fri Jul 9 09:06:21 CDT 2004


On Thursday, July 08, 2004 8:24 PM [GMT+1=CET],
Patrick R. Michaud <pmichaud at pobox.com> wrote:
> Rather than keeping a separate directory of pages/text, I was thinking
> of a possibility of simply having a "draft" copy of the text that is
> stored in the page, along with the current text of the page.  Hitting
> preview would then save the current text as the "draft" copy, and
> an author could choose either the current draft or the current text
> as the source for editing.

Is there a special reason why you want the "draft" copy to be stored in
the page file itself rather than a separate file?  I personally prefer
having a separate file so that
a) the wiki.d files aren't cluttered with more unecessary information
that is required
b) we are talking about a temporary (draft) here
c) someone raised a good point which I agree with, that is, the
auto-save (preview) feature is for the purpose of saving ourselves from
ourselves (either by forgetting to save, or experiencing a computer
crash, or a power outage).  So the file really would be temporary (has
no business being stored inside the wiki.d file or even the wiki.d
directory for that matter.
d) another good point that was raised by another user was that you may
not want people to see the "draft" copy that you are working on.  It may
be "too loose", and you may be trying to "compose it" so that it's
acceptable for public consumption.  If the user-authentication system is
implemented, then I'd like to see it stored as a separate file in which
only the original author (that started that particular draft) can access
the file later, simply by entering username/password for verification.
If user was not logged in, then it would be anonymous, in which case
anyone could access it.

> But this still begs the issue of how to deal with edits from
> simultaneous authors between the various drafts of a page.

My previous post attempted to address this problem simply by alerting
the user that that the current draft is out-dated (eg. somebody else
already updates (saved) the original file.  Another possibility is to
offer the user to merge the edits (the original, and the draft). Is this
not a reasonable suggestion?

> One could always look at the page text stored in the page as being a
> draft, with some sort of option to flag a particular version in the
> page history as being the "currently published version", which PmWiki
> uses
> when browsing the page.  I.e., ?action=browse (default) would display
> the version of the page that is flagged as the published one, while
> ?action=draft would be used to see the latest edited version of the
> page, and ?action=edit would always go from the the latest version as
> it does now.

Yeah, something like that sounds ok.

-Steven




More information about the pmwiki-users mailing list