On Mar 5, 2014 12:49 AM, "Jean-François Bignolles" <[email protected]>
wrote:
>
> Hello,
>
> Le mardi 4 mars 2014 15:48:49 UTC+1, ZyX a écrit :
> > On Mar 4, 2014 7:30 AM, "Jean-François Bignolles" <[email protected]>
wrote:
> >
> > > the attached patch adds support for XDG Base Directory Specification.
> > > This is a compile-time option ("--enable-xdg-basedir"), off by
default.
> >
> > What about making this part not depend on configure options?
>
> If I had been the only person to decide what must be integrated in Vim,
> I would have made this a non-option. By making it an off-by-default
option,
> the patch is more likely to be integrated (I suppose). Maybe it will be
> turned to an on-by-default option after (or even completely removed).

I mean that missing XDG* vars should be expanded to default values like Vim
does for HOME on windows and VIM/VIMRUNTIME without special configure
option. Such expansion is unlikely to break anything.

But new &option values should depend on configure switch or, better,
command-line option (e.g. --xdg/--no-xdg pair with the default chosen by
the configure).

>
> > Views should go to config dir. These are not caches.
> Yes, it's fixed in 2nd patch.
>
> > Swap files to XDG_RUNTIME_DIR and do so by default.
>
> According to the spec (v0.7):
> "The lifetime of the directory MUST be bound to the user being logged in"
> "It MUST be created when the user first logs in and if the user fully
logs out the directory MUST be removed."
> "Files in the directory MUST not survive reboot or a full logout/login
cycle."
>
> So, what if the user was editing files with Vim when he got brutally
> disconnected (for whatever reason)? I agree on runtime status of swap
> files, but they're in a safer place with XDG_CACHE_HOME
> (which is user-managed).

If he is disconnected he should have used screen/tmux/dtach. What is wanted
to be kept is usually not only what is saved in swap file. Though there are
also cases of e.g. power fail which are not handled by screen.

But AFAIR you still have current directory as the first one. I think it
should be the second, after $XDG_whatever.

>
> Moreover, there is no default value for this variable; what to do in case
> of missing definition?

Proceed to the next directory in the list.

>
> > Also what about populating &rtp from XDG_CONFIG_DIRS?
> My patch is for user files, XDG_CONFIG_DIRS is for system files.
> System files locations are rather configured by distribution vendors.
> Plus, this variable contains a list of directories instead of a
> single directory, which makes things more complicated.
> So for now I won't touch it - but I'll think about it.
>
> jfb
>
> --
> --
> You received this message from the "vim_dev" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
>
> ---
> You received this message because you are subscribed to the Google Groups
"vim_dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Raspunde prin e-mail lui