dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #24806
Re: [Branch ~dolfin-core/dolfin/logg] Rev 6372: Change search path of parameter file to ~/.fenics/dolfin_parameters.xml
-
To:
"Garth N. Wells" <gnw20@xxxxxxxxx>
-
From:
Anders Logg <logg@xxxxxxxxx>
-
Date:
Mon, 24 Oct 2011 13:12:40 +0200
-
Cc:
DOLFIN Mailing List <dolfin@xxxxxxxxxxxxxxxxxxx>
-
In-reply-to:
<CAA4C66NtpVXMaNhT5b-fBREW8=jy-F0pTJjsbHMrYdPESRZtVQ@mail.gmail.com>
-
User-agent:
Mutt/1.5.21 (2010-09-15)
On Mon, Oct 24, 2011 at 10:57:38AM +0100, Garth N. Wells wrote:
> On 24 October 2011 10:41, Anders Logg <logg@xxxxxxxxx> wrote:
> > On Mon, Oct 24, 2011 at 11:19:45AM +0200, Anders Logg wrote:
> >> On Mon, Oct 24, 2011 at 09:58:54AM +0100, Garth N. Wells wrote:
> >> > On 24 October 2011 09:38, Anders Logg <logg@xxxxxxxxx> wrote:
> >> > > On Mon, Oct 24, 2011 at 09:02:09AM +0100, Garth N. Wells wrote:
> >> > >>
> >> > >>
> >> > >> On 24 Oct 2011, at 08:25, noreply@xxxxxxxxxxxxx wrote:
> >> > >>
> >> > >> > ------------------------------------------------------------
> >> > >> > revno: 6372
> >> > >> > committer: Anders Logg <logg@xxxxxxxxx>
> >> > >> > branch nick: work
> >> > >> > timestamp: Mon 2011-10-24 09:23:52 +0200
> >> > >> > message:
> >> > >> > Change search path of parameter file to ~/.fenics/dolfin_parameters.xml
> >> > >>
> >> > >>
> >> > >> Is this platform independent?
> >> > >
> >> > > Yes, at least as far as this is working:
> >> > >
> >> > > #ifdef _WIN32
> >> > > std::string home_directory(std::getenv("USERPROFILE"));
> >> > > parameter_files.push_back(home_directory + "\\.fenics\\dolfin_parameters.xml");
> >> > > parameter_files.push_back(home_directory + "\\.fenics\\dolfin_parameters.xml.gz");
> >> > > #else
> >> > > std::string home_directory(std::getenv("HOME"));
> >> > > parameter_files.push_back(home_directory + "/.fenics/dolfin_parameters.xml");
> >> > > parameter_files.push_back(home_directory + "/.fenics/dolfin_parameters.xml.gz");
> >> > > #endif
> >> > >
> >> > >> I would suggest using
> >> > >>
> >> > >> ~/.local/fenics
> >> > >
> >> > > What is ~/.local? It doesn't seem to be a standard place to store
> >> > > config files. Another option is ~/.config which seems to be populated
> >> > > with config files from quite a few applications.
> >> > >
> >> >
> >> > Yes, .config would be better.
> >> >
> >> > I find programs that fill $HOME with hidden files and directories annoying.
> >>
> >> Yes.
> >>
> >> Does anyone know if .config is the recommended place to store config
> >> files these days?
> >
> > This looks relevant:
> >
> > http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
> >
> > According to this, we should have something like
> >
> > ~/.config/fenics/dolfin_parameters.xml
> > ~/.local/share/fenics/cache
> >
> > I'll change the first of these in DOLFIN. Then someone else might want
> > to think about this for Instant.
> >
>
> I've created a bug report for Instant
>
> https://bugs.launchpad.net/instant/+bug/880758
>
> Looks to me like it should be
>
> ~/.cache/foo
Yes, I see that now.
--
Anders
References