From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Implement XDG Base Directory specification for user-emacs-directory Date: Sun, 09 Jun 2019 14:59:44 -0400 Message-ID: References: <20190525172356.30070.65317@vcs0.savannah.gnu.org> <20190525172357.86D4F207F5@vcs0.savannah.gnu.org> <835zpnv1o4.fsf@gnu.org> <87lfybw8cd.fsf_-_@fencepost.gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="236590"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: Eli Zaretskii To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jun 09 21:00:17 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1ha339-000zM2-0U for ged-emacs-devel@m.gmane.org; Sun, 09 Jun 2019 21:00:15 +0200 Original-Received: from localhost ([::1]:37608 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1ha337-0001Et-WF for ged-emacs-devel@m.gmane.org; Sun, 09 Jun 2019 15:00:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54893) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1ha32l-0001Em-9U for emacs-devel@gnu.org; Sun, 09 Jun 2019 14:59:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ha32k-0004tz-CD for emacs-devel@gnu.org; Sun, 09 Jun 2019 14:59:51 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:51915) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ha32j-0004si-1N; Sun, 09 Jun 2019 14:59:49 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 965D48107A; Sun, 9 Jun 2019 14:59:48 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 3B84280E0B; Sun, 9 Jun 2019 14:59:47 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1560106787; bh=7gN1JMEeWhzwHHGTD4MmNGyXAmJSeEnz9EZy7i/OBgw=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=hivgpRDvDpW9PiGpexjC7D+w21YRqJnJcU3dvQ8JyrQp/Uz5TVxL2nU/tzgBFDTLl G31TWBlQMrMCTRK1VsZlm4M/gocQG+OthwlMT9MLEmyCZWSSmtrgrdYhSGewzuquLU /X/fQHZ/TEugaNTCOmQO/TLUA5uePq2X/03mJaQBCu/8AHQSXMLweb8E56QFxZlzAZ 4J5VePE+V9ELBDiQZGespBLDqu5nnnwYae7Hu+KrDlM/9666fW6pO+olgrRlGnwoVU /f+Ar8H9TPGMGOXJLPyMeYO7SQfKj4zH2XDaq/+bI+An5IMsyn7xhtY6gcQaf2Zz4i GMx7GFm3szc5A== Original-Received: from alfajor (unknown [216.154.16.220]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 76C131203B8; Sun, 9 Jun 2019 14:59:46 -0400 (EDT) In-Reply-To: <87lfybw8cd.fsf_-_@fencepost.gnu.org> (Amin Bandali's message of "Sun, 09 Jun 2019 03:01:22 -0400") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 132.204.25.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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:237360 Archived-At: > I=E2=80=99ve attached my first try at this. At first it was only concern= ed with > lisp/startup.el=E2=80=94like ESR=E2=80=99s change=E2=80=94but then I thou= ght it would be even > nicer to do it at the user-emacs-directory itself. I think conceptually, this is indeed the better way to go. Eli's comments already pointed out some technical difficulties you'll have to overcome, so I'll limit myself to one more comment: > * lisp/subr.el (user-emacs-directory): Use "$XDG_CONFIG_HOME/emacs/" > if XDG_CONFIG_HOME is set and has an "emacs/" subdirectory. > Otherwise, try "~/.config/emacs/" before falling back to > "~/.emacs.d/". I think for simple reasons of backward compatibility, if both "$XDG_CONFIG_HOME/emacs/" and "~/.emacs.d/" exist, we should use "~/.emacs.d/". Stefan