[Geany-devel] Persistency

Stephan Aßmus superstippi at xxxxx
Tue Dec 16 13:09:18 UTC 2008


Am Dienstag, den 16.12.2008, 12:40 +0000 schrieb Nick Treleaven:
> On Mon, 15 Dec 2008 22:57:13 +0100
> Stephan Aßmus <superstippi at gmx.de> wrote:
> 
> > It took a while before systems caught on to it, but meanwhile, they
> > mostly all support it. The problem is they didn't support it from the
> > beginning, like BeOS did, so it was not in peoples/developers minds,
> > and I suppose many people would regard it as little supported as you
> > do, one cannot follow everything... but me being a regular BeOS user
> > (yes, still!) I know how great it really is, and although most system
> > support it now (indeed, many for quite a long time, NTFS had it for
> > ages), most apps still don't make use of it.
> 
> This is a cool idea, and personally a plugin that works on Linux would
> be great. Once something is there, maybe people will add patches to
> support different OS's file attribute systems. (Or maybe there's a xattr
> library ported to Windows, who knows). Thanks for bringing it up, I
> didn't know about it before.

I've done a little research yesterday. Linux and NetBSD both have
sys/xattr.h with identical API. Although FreeBSD is supposed to have
support for xattr since some versions (default in "UFS2" and used for
ACLs), I could not find out which header makes the API accessible and
indeed if the API is xattr compatible. MacOS-X is said to have "xattr"
support, but I have not yet tried to find which header defines it and so
on. Windows at least has the technical feature in NTFS, although it most
likely won't be available through the xattr API. Indeed there is a
specification for using "Extended Attributes" in FAT which is shared
between OS/2 and Windows... Solaris has arbitrary meta-data support
through "file stream forks" since version 9. Maybe it's not even
restricted to ZFS. Don't know yet if the xattr API is available, though.
I also found mention that NFS supports xattr, though I don't remember if
I read since which version. :-)

Anyway, your approach is definitely very reasonable - people familiar
with their respective platform should implement it, whomever it bothers
the most that the feature is not available to them...

That's my findings so far. Oh, and there is a FreeDesktop.org
recommendation on the attribute naming scheme of meta-data to avoid
clashes. So Geany would write an attribute "user.geany.docstate" or
similar. Writing/reading the attr through sys/xattr.h would be
incredibly simple. Only I have not yet looked at the available plug-in
hook functions. Is there a hook to mess with the document state after a
document has been loaded, right before the text would be displayed? The
question mainly targets whether or not I would need to worry about
"flickering" or "jumping" of the text when I set the scrollbar position.

Best regards and thanks for the helpful discussion,
-Stephan






More information about the Devel mailing list