From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?Q?Fran=C3=A7ois_?= =?UTF-8?Q?F=C3=A9votte?= Newsgroups: gmane.emacs.bugs Subject: bug#15539: Fwd: bug#15539: [PATCH] Setting user-emacs-directory Date: Thu, 24 Mar 2016 20:21:31 +0100 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1458847343 29403 80.91.229.3 (24 Mar 2016 19:22:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 24 Mar 2016 19:22:23 +0000 (UTC) To: 15539@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Mar 24 20:22:12 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1ajApf-0001tn-Oz for geb-bug-gnu-emacs@m.gmane.org; Thu, 24 Mar 2016 20:22:12 +0100 Original-Received: from localhost ([::1]:52428 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ajApe-0005YT-Iq for geb-bug-gnu-emacs@m.gmane.org; Thu, 24 Mar 2016 15:22:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43158) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ajApa-0005Wi-6d for bug-gnu-emacs@gnu.org; Thu, 24 Mar 2016 15:22:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ajApW-00079i-Ow for bug-gnu-emacs@gnu.org; Thu, 24 Mar 2016 15:22:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:39345) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ajApW-00079d-Ku for bug-gnu-emacs@gnu.org; Thu, 24 Mar 2016 15:22:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ajApW-0008Tw-Di for bug-gnu-emacs@gnu.org; Thu, 24 Mar 2016 15:22:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Fran=C3=A7ois_?= =?UTF-8?Q?F=C3=A9votte?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 24 Mar 2016 19:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15539 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: wontfix patch Original-Received: via spool by 15539-submit@debbugs.gnu.org id=B15539.145884729832567 (code B ref 15539); Thu, 24 Mar 2016 19:22:02 +0000 Original-Received: (at 15539) by debbugs.gnu.org; 24 Mar 2016 19:21:38 +0000 Original-Received: from localhost ([127.0.0.1]:36472 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ajAp8-0008TD-5N for submit@debbugs.gnu.org; Thu, 24 Mar 2016 15:21:38 -0400 Original-Received: from mail-wm0-f45.google.com ([74.125.82.45]:33707) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ajAp7-0008Sw-1A for 15539@debbugs.gnu.org; Thu, 24 Mar 2016 15:21:37 -0400 Original-Received: by mail-wm0-f45.google.com with SMTP id l68so2125972wml.0 for <15539@debbugs.gnu.org>; Thu, 24 Mar 2016 12:21:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:content-transfer-encoding; bh=e+9RxC4ZNWuTvs4ei/1k+7wFFFoNIMU88aHhDhGWvw0=; b=eTc3E2LrXKF2GLjloFLMN9vh1TvFOgheOPv+oVlsM9YcTIsBU7+/+8WQkJXloqO18u mc4atCIR+t3mOOJoZQbnk+9yNxSgv5YgCrPNNOBKwRoAag9q17vodWIMcjZVW82D+BF4 RNzGoE3B8MdZvwZCpW/vPB9msuaqr6N9IqcHfBN9FKC3/TviT4AblefQrGbumyRIqqcQ K/PVbFSwqn4p/mFNKqQZF0c+s/Om8oLrLRjjsrhV9MVSkDNV80cRtzVMNQPw+jrijstc zUQKyGPvU1GQxZ/pplX8Affa4LWPW6O92KkSvRiogE27YA5MxASGdtCnd35dzFKDbNed qgEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:content-transfer-encoding; bh=e+9RxC4ZNWuTvs4ei/1k+7wFFFoNIMU88aHhDhGWvw0=; b=iwFVYs9cEgtZM2PPzDwhbx0xvB2hM8U8iyW3OuA9rZmVLUXmeDmLCo9oo0a1PaNrt8 e6CIJYgUEIYdD1n2xlNoXRT22iQy/0qePRwqetuzdzCEqwCKeHZT1qDf2UD8eMR7iJd+ r1QUdo37mSQ+Mv57aSrbuVWCMiZcrsz2ABvlyKkgV0ds7y235wz8PIvDdisio0eYd8yw 3Ym8wkFjaU+UBJxIvy6YkVUjMtDE8mfD8bEBqHeBXPD79ZsC8aL3GrjFRwEmkx2vo8lW 8X2syEjSeSlHGB+glwzDlxui/Ki8EXMj0//CnMiBapZUh1buqvxOwZGAnUXcMmCba/on 6bJw== X-Gm-Message-State: AD7BkJLwS4WiUtnzNitvghWaRSqyqm8gKGb+S+14BngRNNZXYISTAnqOg3UKSDf04EAIRELHpeaWj2hfjvAecQ== X-Received: by 10.28.90.68 with SMTP id o65mr33488943wmb.70.1458847291120; Thu, 24 Mar 2016 12:21:31 -0700 (PDT) Original-Received: by 10.194.73.67 with HTTP; Thu, 24 Mar 2016 12:21:31 -0700 (PDT) In-Reply-To: X-Google-Sender-Auth: fjy3hQjz2LjyMzErG0SzvdUZ54w X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:115454 Archived-At: Dear Emacs developers, sorry for the late reaction: I thought I was subscribed to this bug, but I somehow wasn't and only just saw last month's discussions. I fully understand that putting yet another knob in Emacs implies an added complexity which is not necessarily desirable. However, I would like to emphasize that the proposed patch does not "change a well-established constant". People not wanting to know about this new behavior will never se= e any change. And I would expect that any user explicitly setting an `EMACS_USER_DIRECTORY' environment variable know what they are doing. Also, below is a list of methods (that I know of) which can help users star= t Emacs with an initialization file in a custom location. None of them are flawless, which justifies IMHO the introduction of a feature like the one proposed here. But even if you still find that there is no real need for su= ch a feature (which would be perfectly fine by me), at least this list might hel= p future users stumbling on this bug report... * Method 1 (as mentioned by Eli Zaretskii above): set the HOME environment variable. This works well, and can even be set on a per-process basis, which is a desirable feature IMO. This method however has potentially unwelcome sid= e effects, mainly related to the fact that $HOME is used in a lot of differ= ent contexts, unrelated to the Emacs startup process. In particular: - All processes launched from within Emacs will inherit this setting. Thi= s can easily be avoided be re-setting HOME to its normal value in `process-environment' within Emacs. - All paths beginning with `~/' will be expanded to the "fake" HOME direc= tory, which can be confusing. One can reset the HOME environment variable fro= m within Emacs using `setenv' to avoid that. But then problems can arise = since `user-emacs-directory' itself is by default "~/.emacs.d". * Method 2: set a symbolic link from ~/.emacs.d to somewhere else. This method is mainly useful to help quickly switch between different pro= files by having the symlink point to one of several possible directories. It's very easy to set up (which is why many users seem to do it), but has the main drawb= ack that multiple Emacs instances running concurrently must all share the sam= e user directory. * Method 3: run `emacs -q -l SOMEWHERE/init.el' The initialization file located SOMEWHERE/init.el can then set things up correctly like this: (setq user-init-file (or load-file-name (buffer-file-name))) (setq user-emacs-directory (file-name-directory user-init-file)) Like the first method above, this one works on a per-process basis and on= e can run different instances of Emacs using different user directories. The main drawback of this approach is that it entirely bypasses the norma= l startup process. Things like `emacs-init-time', `after-init-hook', `initial-major-mode' (list is not exhaustive) don't work as expected. Again, I you feel like the added complexity is not worth the extra flexibil= ity for users, that's fine by me. Just ignore my message and leave the bug clos= ed. Cheers, Fran=C3=A7ois