From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: "francisco.colaco@gmail.com" Newsgroups: gmane.emacs.devel Subject: Re: xdg-directories.el Date: Wed, 7 Sep 2016 17:13:43 +0100 Message-ID: References: <83shtbaj4b.fsf@gnu.org> <83inu7aeo5.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a114b88688692ba053bed32b3 X-Trace: blaine.gmane.org 1473264876 7051 195.159.176.226 (7 Sep 2016 16:14:36 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 7 Sep 2016 16:14:36 +0000 (UTC) Cc: Emacs developers To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Sep 07 18:14:33 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 1bhfUa-000144-U6 for ged-emacs-devel@m.gmane.org; Wed, 07 Sep 2016 18:14:29 +0200 Original-Received: from localhost ([::1]:41914 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhfUY-0005qo-Q5 for ged-emacs-devel@m.gmane.org; Wed, 07 Sep 2016 12:14:26 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57899) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhfTy-0005gL-JD for emacs-devel@gnu.org; Wed, 07 Sep 2016 12:13:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bhfTw-00065O-H8 for emacs-devel@gnu.org; Wed, 07 Sep 2016 12:13:49 -0400 Original-Received: from mail-wm0-x22f.google.com ([2a00:1450:400c:c09::22f]:38842) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhfTt-00064S-Oq; Wed, 07 Sep 2016 12:13:46 -0400 Original-Received: by mail-wm0-x22f.google.com with SMTP id 1so41715906wmz.1; Wed, 07 Sep 2016 09:13:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=iDgUG4vK9/cD3sZ+rL1nHPrj3NTj/WDxndjzOxIWsyo=; b=EdqMONEaMDc93iCkuMtoGptR0tXtGQHFL5XbEUhLzaC+/nw4LP6A2Z5v+pBcKvOjsd e/XQr1oMI7ptUMnUFMi/6Hxd6PFuLKm213J3VbiTdVGHxV9/LXJppM5EopI2dFAOO+zI 3lXyEdeQOPfv0jeqdc/1L+PpP2GDQ9pFeJkmjAOcMOR8ImeZppwLsJk0PvZ2j2GoJHL0 Ctopb9e3eBgvzY8XPit1oGpFlvnkAXAcQ9rZCvY2LLLSKl36VElGU0mOTO66VRBln5wN SKFcCailymLAc0GbZYh/IziBNilDg9Y7tS/ViJvuiVDsk689gM/Ksmf+D2L4VwvYG2si PPIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=iDgUG4vK9/cD3sZ+rL1nHPrj3NTj/WDxndjzOxIWsyo=; b=GPdR7OgxRytrNtySqadZkhqhizUhBO5NsTQmm7UdZa846RK+m7iiDLdg2F1w2Lbouk QgP1LvR3m+m8SGE6pNcQ6l8Ka7yEAgAGdNsC6JQWZZ75TjAfww7Z9FZOsb4hZ31vxa/R +3xfiSnbShYqdxLaulfFhT+rSzoZVtTvDSlvHoef6vlyqiYofkk8FuCMHlROm5n1UsYj DQg6dcBewvjef1bsD/rY25PVXxqUV6HXq+JgXl5KX8zsy7AWk5duVtsBBJAv/Tm33Mo8 /XJIFs5fGDk3Ms9MulHxdM+UcBDke5QkU0AgyWav+BSDJVUApi7qkOOnGCNbRtv9g1ec uAiA== X-Gm-Message-State: AE9vXwP7cXNxVoQPYKkZX8rE3KebBkuDwfS+xuk13QTdBwLczbjKOdlqcTCcC9uYtAVqnuNrtE3Wm2fxDitTWg== X-Received: by 10.28.184.19 with SMTP id i19mr4483844wmf.43.1473264824519; Wed, 07 Sep 2016 09:13:44 -0700 (PDT) Original-Received: by 10.28.30.140 with HTTP; Wed, 7 Sep 2016 09:13:43 -0700 (PDT) In-Reply-To: <83inu7aeo5.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::22f 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:207250 Archived-At: --001a114b88688692ba053bed32b3 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Eli, I can implement the functions for Windows and OSX. I believe all Unices have implemented the XDG Base Directory Specification. But we do have a problem: once this is implemented for all operating systems, XDG will become a meaningless package name and prefix. Maybe we should not have a prefix at all and find sensible names not used by Emacs at the moment. I propose that xdg-config-dir becomes instead user-emacs-config-directory and gets to be initialised according to the operating system's best practices. Defaulting to ~/.emacs.d/config. user-emacs-cache-directory defaults to ~/.emacs.d/cache and user-emacs-data-directory to ~/.emacs.d/data. The defaults would only be used iff the operating system determination functions return nil. user-emacs-directory could either be an alias of user-emacs-data-directory or default to it. locate-user-emacs--file would then make sense, and no names should be changed. I think I should make these functions with the same interface of locate-user-emacs-file, and give it analog behaviour. In my opinion, the chain of user-init-file should be (in order of precedence): 1. (locate-user-emacs-config-file "init.el") 2. (locate-user-emacs-file "init.el") 3. ~/.emacs.d/init.el 4. ~/.emacs (and the rest of the present order, like terminal specific files). Would that seem sensible to you? Francisco Cola=C3=A7o --001a114b88688692ba053bed32b3 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Eli,

I can implement the = functions for Windows and OSX.=C2=A0 I believe all Unices have implemented = the XDG Base Directory Specification.

But we do have a problem= : once this is implemented for all operating systems, XDG will become a mea= ningless package name and prefix.=C2=A0 Maybe we should not have a prefix a= t all and find sensible names not used by Emacs at the moment.

I propose that xdg-config-dir becomes instead user-emacs-config-directory = and gets to be initialised according to the operating system's best pra= ctices.=C2=A0 Defaulting to ~/.emacs.d/config.=C2=A0 user-emacs-cache-direc= tory defaults to ~/.emacs.d/cache and user-emacs-data-directory to ~/.emacs= .d/data.=C2=A0 The defaults would only be used iff the operating system det= ermination functions return nil.

user-emacs-directory could ei= ther be an alias of user-emacs-data-directory or default to it.

locate-user-em= acs-<domain>-file would then make sense, and no names should be chang= ed.=C2=A0 I think I should make these functions with the same interface of = locate-user-emacs-file, and give it analog behaviour.

In my opinion, the ch= ain of user-init-file should be (in order of precedence):

=C2=A0 1. (locate-user-emacs-config-file "init.= el")
=C2=A0 2. (locate-user-emacs-= file "init.el")
=C2=A0 3. ~/.= emacs.d/init.el
=C2=A0 4. ~/.emacs (and= the rest of the present order, like terminal specific files).

Would that see= m sensible to you?

=C2=A0 Francisco= Cola=C3=A7o
--001a114b88688692ba053bed32b3--