[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: xdg-directories.el

From: Eli Zaretskii
Subject: Re: xdg-directories.el
Date: Wed, 07 Sep 2016 18:54:34 +0300

> From: "address@hidden" <address@hidden>
> Date: Wed, 7 Sep 2016 16:31:18 +0100
> Cc: Emacs developers <address@hidden>
> I have seen once again the source code for xdg-user-dir, and there is no 
> environment variables until one runs
> ~/.config/user-dirs.dirs (or the file in $XDG_CONFIG_HOME). That is how, _in 
> the script_, the environment
> variables for user directories are set. They aren't normally set, only get 
> set for specific packages.
> We would either have to read the lines of user-dirs.dirs and get the values 
> after the = sign and inside the
> quotes; or execute the file through a shell, as intended, and read the 
> directory names from the environment
> values. I would not bet on a simple file readout, for one day someone will 
> end up replacing a directory name by
> a backticked shell script.
> Now, I remember why I have used xdg-user-dirs in the first place for the user 
> directories: not using it would be
> reimplementing it in Emacs Lisp, a needless effort. 
> If xdg-user-dirs does not exist then there is no point in having a PICTURES 
> or DOCUMENTS user directory. In
> MS Windows the directories are determined in a totally different method. In 
> OSX almost all goes to ~/Library,
> according to an answer to
> http://stackoverflow.com/questions/3373948/equivalents-of-xdg-config-home-and-xdg-data-home-on-mac-os-x

If the script is only run to find the PICTURES and DOCUMENTS
directories, then at least on Windows those could be found by
alternative means that don't use any scripts.  (We don't currently
have a Lisp-visible API for that, but it'd be easy to add.)

On OS X, it sounds like we should simply put different default values,
and be done.

> So, to perfect the package in order to have a solid candidate, can you 
> suggest new function names?

For which functions?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]