[Geany-devel] Persistency

Enrico Tröger enrico.troeger at xxxxx
Mon Dec 15 20:15:05 UTC 2008


On Mon, 15 Dec 2008 15:02:32 +0100, Stephan Aßmus <superstippi at gmx.de>
wrote:


>> > have closed meanwhile, the scrollbar and cursor are at the top of
>> > the file, the selection is lost. Wouldn't it be much better if that
>> 
>> The selection and precise scrollbar position are currently not saved
>> with sessions. Cursor position is.
>
>Would be nice, though. Although selection may be off when the file
>contents change through an external app.

I personally don't like saving any selection information at all. How
could this be useful?
Additionally, selections are easy to loose (or discard) in general,
partly on intention, and so why storing them persistent between
sessions? For instance, let's say you open a bunch of files in Geany
for which selection information has been stored before and the
selections are restored. Ok cool but once you click somewhere in the
file the selection is lost and all the efforts to store them are
useless.


>> > persistency information were stored with each individual files
>> > instead? Can't file metadata/attributes be used for this? (That
>> > being said, I don't even know if Ubuntu has xattr support turned
>> > on by default...) That method would be much more robust and
>> > scalable.
>> 
>> Not sure if it would be portable then.
>
>I think the Linux kernel will support it through an emulation layer, if

Cool if Linux does this. What about FreeBSD, NetBSD, OpenBSD, HP-UX,
Solaris, Windows, MacOSX, ...?


>the filesystem has no support or has it turned off (at least so I
>heard). So it's more a matter of wheather the API is available. But
>what's the alternative, anyways? It would mean to create and maintain a
>separate settings file for each file Geany ever opened (or some
>database). And if the file is moved/renamed, there go the settings.
>Worse yet, settings files will linger for files which may have long
>been deleted. No, storing the settings *with* the file is really the
>only solution. If the kernel or filesystem don't have support for
>metadata, bad luck.

Hmm, I don't think it's worth adding support for this when we know
before that only a few systems will support it at all.

Anyway, of course the above only applies when we are talking about
Geany's core, if you intend to write a plugin your are free to make it
as non-portable as possible :).

Regards,
Enrico

-- 
Get my GPG key from http://www.uvena.de/pub.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/devel/attachments/20081215/f0022da0/attachment.pgp>


More information about the Devel mailing list