PlasMate questions
Dominik Haumann
dhdev at gmx.de
Fri Nov 6 20:03:00 CET 2009
On Friday 06 November 2009, Milian Wolff wrote:
> On Friday 06 November 2009 18:52:24 Aaron J. Seigo wrote:
> > > Fourth, I noticed that katepart creates backup files (terminating
> > > with a '~') whenever plasmate autosaves a file, and then that backup
> > > file shows up in the editor tree and makes it look ugly :P It clearly
> > > has to go, my question is does it make more sense to just get
> > > plasmate to ignore files ending with a '~', or should I find a way to
> > > stop katepart from creating backups?
> >
> > there is no way to do this currently via KTextEditor::ConfigInterface.
> > worse yet, the suffix is configurable so no matter what we do it could
> > end up not working properly.
> >
> > so we could either hack around it and assume a ~ ending to file names,
> > or we we could offer a patch to kdelibs/kate/document/katedocument.cpp
> > in KateDocument::setConfigValue to the kate developers, however.
> > something like the attached patch.
> >
> > and then we could configure the backup strategy of katepart to match
> > our needs in plasmate using KTextEditor::ConfigInterface.
> >
> > kate devels: what do you think?
> >
> > the two patches do the config in two different ways for the backup
> > setting; one uses a set of simple string values: none, local, remote or
> > all. the second patch uses a comma separated string and recognizes the
> > values local and remote. so "none" in the first patch is equiv to
> > QString() in the second; "local" to "local"; "remote" to "remote";
> > "all" to "local,remote". i wasn't sure which would fit the kate devel's
> > preferences better, so i offer a patch doing it each way. suggestions
> > to third ways welcome :)
>
> I like 1 most.
>
> Patch looks fine, imo go ahead. Most of the Kate core-devels are not that
> active these days. If any of them don't like the patch, it can be changed
> later on if neccessary (of course before 4.4). Maybe wait for an OK by
> Dominik Haumann or Cristoph Cullmann.
What about setter + getter:
- backup-on-save-local: bool
- backup-on-save-remote: bool
Those are ok: setter + getter:
- backup-on-save-suffix: string
- backup-on-save-prefix: string
I'd like to avoid the part 'auto' because Kate does not automatically
do backups. It's only explicitely on save. (We have a feature request
that asks for autobackups).
Please also implement the getters, i.e. ::configKeys and ::configValue
and *document* this in kdelibs/interfaces/ktexteditor/configinterface.h
PS: Backups are a good thing. Katepart is not crash-free. Unfortunately.
The good thing is, that Plasmate will have "backups" in git. But it's
not the same thing.
Is that ok with you?
Dominik
More information about the Plasma-devel
mailing list