From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: frederik@ofb.net Newsgroups: gmane.emacs.bugs Subject: bug#25819: 25.1; Added by Package.el. Added by Package.el. Added by Package.el. Added by Package.el. Date: Wed, 22 Feb 2017 12:48:53 -0800 Message-ID: <20170222204852.GN1204@ofb.net> References: <20170220201438.GG1204@ofb.net> <8ttw7n1925.fsf@fencepost.gnu.org> <20170221230422.GJ1204@ofb.net> Reply-To: frederik@ofb.net NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1487796623 8064 195.159.176.226 (22 Feb 2017 20:50:23 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 22 Feb 2017 20:50:23 +0000 (UTC) User-Agent: Mutt/1.7.2 (2016-11-26) Cc: 25819@debbugs.gnu.org To: Glenn Morris Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Feb 22 21:50:19 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1cgdrZ-0001GJ-66 for geb-bug-gnu-emacs@m.gmane.org; Wed, 22 Feb 2017 21:50:13 +0100 Original-Received: from localhost ([::1]:55251 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cgdrd-0005JZ-Ie for geb-bug-gnu-emacs@m.gmane.org; Wed, 22 Feb 2017 15:50:17 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35156) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cgdrR-0005I2-EJ for bug-gnu-emacs@gnu.org; Wed, 22 Feb 2017 15:50:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cgdrO-0008MJ-Ae for bug-gnu-emacs@gnu.org; Wed, 22 Feb 2017 15:50:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:53422) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cgdrO-0008MF-6n for bug-gnu-emacs@gnu.org; Wed, 22 Feb 2017 15:50:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cgdrN-0002rl-QB for bug-gnu-emacs@gnu.org; Wed, 22 Feb 2017 15:50:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: frederik@ofb.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 22 Feb 2017 20:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25819 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 25819-submit@debbugs.gnu.org id=B25819.148779654410948 (code B ref 25819); Wed, 22 Feb 2017 20:50:01 +0000 Original-Received: (at 25819) by debbugs.gnu.org; 22 Feb 2017 20:49:04 +0000 Original-Received: from localhost ([127.0.0.1]:51621 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cgdqS-0002qW-4b for submit@debbugs.gnu.org; Wed, 22 Feb 2017 15:49:04 -0500 Original-Received: from icgriddb04.seas.upenn.edu ([158.130.57.72]:42586) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cgdqQ-0002qC-GY for 25819@debbugs.gnu.org; Wed, 22 Feb 2017 15:49:02 -0500 Original-Received: from [10.13.0.6] (helo=ofb.net) by ICGRIDDB04.SEAS.upenn.edu with esmtp (Exim 4.87) (envelope-from ) id 1cgdqO-0005T0-4X; Wed, 22 Feb 2017 15:49:00 -0500 Original-Received: from thutmose (unknown [24.7.113.102]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ofb.net (Postfix) with ESMTPSA id E3EC93FFB9; Wed, 22 Feb 2017 12:48:54 -0800 (PST) Original-Received: from frederik by thutmose with local (Exim 4.88) (envelope-from ) id 1cgdqH-00035Q-40; Wed, 22 Feb 2017 12:48:53 -0800 Content-Disposition: inline In-Reply-To: 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" Xref: news.gmane.org gmane.emacs.bugs:129665 Archived-At: On Wed, Feb 22, 2017 at 02:28:27PM -0500, Glenn Morris wrote: > frederik@ofb.net wrote: > > > root) My /root/.emacs looks something like this: > > > > (setenv "HOME" "/home/frederik/") > > (setq savehist-file "/root/.emacs-history") > > (load "~/.emacs") > > (setenv "HOME" "/root/") > > > > Obviously this does not contain a "(package-initialize)" line, so the > [...] > > I wasn't able to figure out why the "(package-initialize)" lines then > > get inserted in ~/.emacs rather than /root/.emacs, but I hope the > > above clues provide a good enough place for someone else to start > > debugging this. > > I tested with: > > /tmp/h1/.emacs: > (setenv "HOME" "/tmp/h2/") > (setq savehist-file "/tmp/h1/.emacs-history") > (load "~/.emacs") > (setenv "HOME" "/tmp/h1/") > > /tmp/h2/.emacs: > (setq foo 99) > > > HOME=/tmp/h1 emacs-25.1 > M-x package-initialize > > and could not reproduce any problem. > The package lines get added to /tmp/h1/.emacs, once only. > > If you don't feel like debugging further, you could just add a > commented out package-initialize line to /root/.emacs. > Somehow I don't think your problem is a common one. :) You don't think my problem is common!? :) Well I'm not sure how other people edit files as root, but after a few incarnations I decided that a barebones /root/.emacs pointing to ~/.emacs is the best way to go. Thank you (indeed) for taking the time to trim down my problem to a minimal test case. If we make it a little less minimal: /tmp/h2/.emacs: (setq foo 99) (package-initialize) then I find it reproduces the problem: /tmp/h2/.emacs: ;; Added by Package.el. This must come before configurations of ;; installed packages. Don't delete this line. If you don't want it, ;; just comment it out by adding a semicolon to the start of the line. ;; You may delete these explanatory comments. (package-initialize) (setq foo 99) (package-initialize) Thanks, Frederick