From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: xdg-directories.el Date: Wed, 07 Sep 2016 18:54:34 +0300 Message-ID: <83inu7aeo5.fsf@gnu.org> References: <83shtbaj4b.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1473263819 24576 195.159.176.226 (7 Sep 2016 15:56:59 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 7 Sep 2016 15:56:59 +0000 (UTC) Cc: emacs-devel@gnu.org To: "francisco.colaco\@gmail.com" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Sep 07 17:56:55 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bhfDa-0005rH-Gl for ged-emacs-devel@m.gmane.org; Wed, 07 Sep 2016 17:56:54 +0200 Original-Received: from localhost ([::1]:41696 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhfDY-0002TJ-Gg for ged-emacs-devel@m.gmane.org; Wed, 07 Sep 2016 11:56:52 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52148) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhfBf-0001Fl-E7 for emacs-devel@gnu.org; Wed, 07 Sep 2016 11:54:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bhfBb-0001mI-Ed for emacs-devel@gnu.org; Wed, 07 Sep 2016 11:54:55 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:43899) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhfBb-0001mD-BC; Wed, 07 Sep 2016 11:54:51 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2086 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bhfBZ-0006Sh-7g; Wed, 07 Sep 2016 11:54:50 -0400 In-reply-to: (francisco.colaco@gmail.com) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:207247 Archived-At: > From: "francisco.colaco@gmail.com" > Date: Wed, 7 Sep 2016 16:31:18 +0100 > Cc: Emacs developers > > 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?