From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alexander Shukaev Newsgroups: gmane.emacs.devel Subject: Re: %AppData% on Windows instead of %UserProfile% by default? Date: Mon, 10 Nov 2014 18:49:27 +0100 Message-ID: References: <83wq73m1fz.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7b34398ea8a785050784c845 X-Trace: ger.gmane.org 1415641812 25267 80.91.229.3 (10 Nov 2014 17:50:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 10 Nov 2014 17:50:12 +0000 (UTC) Cc: ofv@wanadoo.es, emacs-devel To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 10 18:50:06 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Xnt6L-0004dR-5G for ged-emacs-devel@m.gmane.org; Mon, 10 Nov 2014 18:50:05 +0100 Original-Received: from localhost ([::1]:44456 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xnt6K-0002nb-OK for ged-emacs-devel@m.gmane.org; Mon, 10 Nov 2014 12:50:04 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56621) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xnt5z-0002lH-1J for emacs-devel@gnu.org; Mon, 10 Nov 2014 12:49:44 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xnt5v-0002in-46 for emacs-devel@gnu.org; Mon, 10 Nov 2014 12:49:42 -0500 Original-Received: from mail-la0-x234.google.com ([2a00:1450:4010:c03::234]:60529) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xnt5l-0002hL-Jy; Mon, 10 Nov 2014 12:49:29 -0500 Original-Received: by mail-la0-f52.google.com with SMTP id pv20so7970811lab.39 for ; Mon, 10 Nov 2014 09:49:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=aeCtcRWVm/6ljE53hd4DQEY5gljHdzsTZyIi3mUKJxg=; b=A76RW81mWBrTC8ke7wIQrIfbDPIc/2JkqaK6p4LiXEdqcNbxcRLgRLZ4fMUgv1oLzb DXAo5uecWd5gJF7JQQx9n8rbZjTLttiVsba4nA31NmEDXeLSF7zuJ5FA8VKKB85VYWvM pYYUm1sSYDxQUyri4KQzjk0CDO2GInsw7vbY7zDFHLaIBY6eV1mmHBvEJfzuIF8WwT0W R43u9fF8woPoGGsrznElfPBD9gBriN8+/I9d18SaPpPLOuMzVmRq1Z4QbZVI7a+1U1uy xbVNcq5wE5XzIT3xEc1j+3hTV7S4qyrosYcVlHa73AS3XfBPxE2AGjbXLPanvUSFMH5a aIZw== X-Received: by 10.112.133.138 with SMTP id pc10mr31179791lbb.48.1415641767125; Mon, 10 Nov 2014 09:49:27 -0800 (PST) Original-Received: by 10.112.202.106 with HTTP; Mon, 10 Nov 2014 09:49:27 -0800 (PST) In-Reply-To: <83wq73m1fz.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c03::234 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:176700 Archived-At: --047d7b34398ea8a785050784c845 Content-Type: text/plain; charset=UTF-8 > > First, %AppData% is a subdirectory of %UserProfile%, so it's not like > this is a totally different place. > > More importantly, we are following the platform guidelines, which > say: > > CSIDL_PROFILE Version 5.0. The user's profile folder. A typical > FOLDERID_Profile path is C:\Users\username. > Applications should not create files or folders > at this level; they should put their data under > the locations referred to by CSIDL_APPDATA or > CSIDL_LOCAL_APPDATA. > > When Emacs on Windows starts up, if %HOME% is not defined in the > environment already, Emacs defines it to refer to %AppData%. See > w32.c:init_environment for more details. > > I think we are, as much as practically possible. > True, but probably a decent fraction of users still tend to keep "emacs.d" in %UserProfile% similarly to how they keep "emacs.d" in $HOME on Unix. Yes, defining %HOME% is a possibility, but once again requires manual intervention and reading a manual after being surprised with something like "why the hell my configuration isn't loaded?" So I have the following proposal: 1. If %HOME% is defined, use it (current); 2. If "emacs.d" is present in %UserProfile%, use it (new); 3. Fallback to %AppData% (current). In other words, I propose to introduce #2 without ruining the already existing logic. --047d7b34398ea8a785050784c845 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
First, %AppData% is a subdirectory of %UserProfi= le%, so it's not like
this is a totally different place.

More importantly, we are following the platform guidelines, which
say:

CSIDL_PROFILE=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Version 5.0. The user's= profile folder.=C2=A0 A typical
FOLDERID_Profile=C2=A0 =C2=A0 =C2=A0 =C2=A0path is C:\Users\username.
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0Applications should not create files or folders
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0at this level; they should put their data under
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0the locations referred to by CSIDL_APPDATA or
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0CSIDL_LOCAL_APPDATA.

When Emacs on Windows starts up, if %HOME% is not defined in the
environment already, Emacs defines it to refer to %AppData%.=C2=A0 See
w32.c:init_environment for more details.

I think we are, as much as practically possible.

True, but probably = a decent fraction of users still tend to keep "emacs.d" in %UserP= rofile% similarly to how they keep "emacs.d" in $HOME on Unix. Ye= s, defining %HOME% is a possibility, but once again requires manual interve= ntion and reading a manual after being surprised with something like "= why the hell my configuration isn't loaded?" So I have the followi= ng proposal:
  1. If %HOME% is defined, = use it (current);
  2. If "emacs.d" is present in %UserProfile= %, use it (new);
  3. Fallback to %AppData% (current).
In = other words, I propose to introduce #2 without ruining the already existing= logic.
--047d7b34398ea8a785050784c845--