From unknown Wed Jun 18 23:08:54 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#25819 <25819@debbugs.gnu.org> To: bug#25819 <25819@debbugs.gnu.org> Subject: Status: 25.1; Added by Package.el. Added by Package.el. Added by Package.el. Added by Package.el. Reply-To: bug#25819 <25819@debbugs.gnu.org> Date: Thu, 19 Jun 2025 06:08:54 +0000 retitle 25819 25.1; Added by Package.el. Added by Package.el. Added by Pack= age.el. Added by Package.el. reassign 25819 emacs submitter 25819 frederik@ofb.net severity 25819 minor tag 25819 patch fixed thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 20 15:15:02 2017 Received: (at submit) by debbugs.gnu.org; 20 Feb 2017 20:15:02 +0000 Received: from localhost ([127.0.0.1]:47823 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cfuMP-0006aE-U0 for submit@debbugs.gnu.org; Mon, 20 Feb 2017 15:15:02 -0500 Received: from eggs.gnu.org ([208.118.235.92]:40942) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cfuMO-0006Zb-0v for submit@debbugs.gnu.org; Mon, 20 Feb 2017 15:15:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cfuMH-0000Bb-6U for submit@debbugs.gnu.org; Mon, 20 Feb 2017 15:14:54 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:42384) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cfuMH-0000BS-3p for submit@debbugs.gnu.org; Mon, 20 Feb 2017 15:14:53 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60139) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cfuME-0007uc-SA for bug-gnu-emacs@gnu.org; Mon, 20 Feb 2017 15:14:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cfuMB-0000AV-FP for bug-gnu-emacs@gnu.org; Mon, 20 Feb 2017 15:14:50 -0500 Received: from icgriddb04.seas.upenn.edu ([158.130.57.72]:53590) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cfuMB-0000A6-Au for bug-gnu-emacs@gnu.org; Mon, 20 Feb 2017 15:14:47 -0500 Received: from [10.13.0.6] (helo=ofb.net) by ICGRIDDB04.SEAS.upenn.edu with esmtp (Exim 4.87) (envelope-from ) id 1cfuM8-00065o-I1 for bug-gnu-emacs@gnu.org; Mon, 20 Feb 2017 15:14:44 -0500 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 578E54126D; Mon, 20 Feb 2017 12:14:39 -0800 (PST) Received: from frederik by thutmose with local (Exim 4.88) (envelope-from ) id 1cfuM2-0008U9-KC; Mon, 20 Feb 2017 12:14:38 -0800 Date: Mon, 20 Feb 2017 12:14:38 -0800 From: frederik@ofb.net To: bug-gnu-emacs@gnu.org Subject: 25.1; Added by Package.el. Added by Package.el. Added by Package.el. Added by Package.el. Message-ID: <20170220201438.GG1204@ofb.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.7.2 (2016-11-26) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: frederik@ofb.net Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) (I'm sending this via my MUA because 'M-x mail-send' didn't work) In my ~/.emacs file, I get repeating lines like this: ;; 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. ;; 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. ;; 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. ;; 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) (package-initialize) (package-initialize) (package-initialize) I'm not sure when they appear but I upgraded recently and cleared them out, and they keep appearing. In GNU Emacs 25.1.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.22.5) of 2016-12-23 built on juergen Configured using: 'configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib --localstatedir=/var --with-x-toolkit=gtk3 --with-xft 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong' CPPFLAGS=-D_FORTIFY_SOURCE=2 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro' Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS NOTIFY ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 Important settings: value of $LANG: locale-coding-system: utf-8-unix Major mode: Emacs-Lisp Minor modes in effect: global-auto-revert-mode: t shell-dirtrack-mode: t savehist-mode: t override-global-mode: t tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: on auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t buffer-read-only: t column-number-mode: t line-number-mode: t hs-minor-mode: t Recent messages: When done with a buffer, type C-x # Unable to load color "brightblue" Unable to load color "brightred" scroll-up-command: End of buffer [9 times] Mark set [2 times] Making completion list... [2 times] Quit Making completion list... Quit Making completion list... Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message idna dired rfc822 mml mml-sec epg mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mail-utils ispell skeleton pulse misearch multi-isearch imenu conf-mode cus-edit cus-start cus-load term/xterm xterm ggtags etags xref project ewoc cc-mode derived cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-langs cc-bytecomp jka-compr rx edmacro kmacro autorevert filenotify ido ess-toolbar ess-mouse mouseme thingatpt+ thingatpt browse-url ess-menu ess-swv ess-noweb ess-noweb-font-lock-mode ess-bugs-l essd-els ess-sas-d ess-sas-l ess-sas-a ess-sta-d ess-sta-l cc-vars cc-defs make-regexp ess-sp6-d ess-dde ess-sp3-d ess-julia julia-mode ess-r-d ess-r-syntax ess-r-completion ess-roxy essddr noutline outline hideshow ess-help ess-r-package ess-s-l ess ess-inf ess-tracebug tramp tramp-compat auth-source cl-seq gnus-util mm-util mail-prsvr password-cache tramp-loaddefs trampver ucs-normalize shell pcomplete format-spec advice ess-mode ess-noweb-mode ess-utils time-date ess-generics ess-custom executable ess-compat ess-site savehist iflipb bind-key compile easy-mmode comint ansi-color ring cl help-fns+ wid-edit help-fns server finder-inf eieio eieio-core cl-macs info package epg-config seq byte-opt gv bytecomp byte-compile cl-extra help-mode easymenu cconv cl-loaddefs pcase cl-lib mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese charscript case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote dbusbind inotify dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 367952 28799) (symbols 48 33895 2) (miscs 40 300 1363) (strings 32 61653 13739) (string-bytes 1 1782835) (vectors 16 53797) (vector-slots 8 1576608 178209) (floats 8 373 636) (intervals 56 6020 793) (buffers 976 46)) From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 21 17:19:24 2017 Received: (at 25819) by debbugs.gnu.org; 21 Feb 2017 22:19:24 +0000 Received: from localhost ([127.0.0.1]:49333 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cgImJ-0008FA-T3 for submit@debbugs.gnu.org; Tue, 21 Feb 2017 17:19:24 -0500 Received: from eggs.gnu.org ([208.118.235.92]:35353) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cgImI-0008Ew-LM for 25819@debbugs.gnu.org; Tue, 21 Feb 2017 17:19:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cgImC-0005ow-L7 for 25819@debbugs.gnu.org; Tue, 21 Feb 2017 17:19:17 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_05,RP_MATCHES_RCVD, UNRESOLVED_TEMPLATE autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:41417) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cgImA-0005oJ-Tn; Tue, 21 Feb 2017 17:19:14 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1cgImA-0003D6-6g; Tue, 21 Feb 2017 17:19:14 -0500 From: Glenn Morris To: frederik@ofb.net Subject: Re: bug#25819: 25.1; Added by Package.el. Added by Package.el. Added by Package.el. Added by Package.el. References: <20170220201438.GG1204@ofb.net> X-Spook: Small Pox EBS LLNL Indigo monarchist passwd MILSATCOM X-Ran: {]n]7&d|n_PX?Mibj!fM@;~P:]dK7T<-a(WWaWmh0zX&I0HS3P>)?3%RFn/g8C\$jTP X-Hue: red X-Attribution: GM Date: Tue, 21 Feb 2017 17:19:14 -0500 In-Reply-To: <20170220201438.GG1204@ofb.net> (frederik@ofb.net's message of "Mon, 20 Feb 2017 12:14:38 -0800") Message-ID: <8ttw7n1925.fsf@fencepost.gnu.org> User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -4.3 (----) X-Debbugs-Envelope-To: 25819 Cc: 25819@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.3 (----) frederik@ofb.net wrote: > In my ~/.emacs file, I get repeating lines like this: [...] > (package-initialize) > > (package-initialize) > > (package-initialize) The function package--ensure-init-file adds this line, but it takes care to only do so if it's not already there. So it's hard to see how you can end up with multiple copies. Can you find a reproducible sequence that causes an extra copy to be added; or can you edebug package--ensure-init-file to see why it adds multiple copies? From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 21 18:04:30 2017 Received: (at 25819) by debbugs.gnu.org; 21 Feb 2017 23:04:30 +0000 Received: from localhost ([127.0.0.1]:49388 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cgJTy-0002b5-Mq for submit@debbugs.gnu.org; Tue, 21 Feb 2017 18:04:30 -0500 Received: from icgriddb04.seas.upenn.edu ([158.130.57.72]:56740) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cgJTy-0002ay-1s for 25819@debbugs.gnu.org; Tue, 21 Feb 2017 18:04:30 -0500 Received: from [10.13.0.6] (helo=ofb.net) by ICGRIDDB04.SEAS.upenn.edu with esmtp (Exim 4.87) (envelope-from ) id 1cgJTw-0004nD-EP; Tue, 21 Feb 2017 18:04:28 -0500 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 3B61740EA6; Tue, 21 Feb 2017 15:04:23 -0800 (PST) Received: from frederik by thutmose with local (Exim 4.88) (envelope-from ) id 1cgJTq-0006G2-GH; Tue, 21 Feb 2017 15:04:22 -0800 Date: Tue, 21 Feb 2017 15:04:22 -0800 From: frederik@ofb.net To: Glenn Morris Subject: Re: bug#25819: 25.1; Added by Package.el. Added by Package.el. Added by Package.el. Added by Package.el. Message-ID: <20170221230422.GJ1204@ofb.net> References: <20170220201438.GG1204@ofb.net> <8ttw7n1925.fsf@fencepost.gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8ttw7n1925.fsf@fencepost.gnu.org> User-Agent: Mutt/1.7.2 (2016-11-26) X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 25819 Cc: 25819@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: frederik@ofb.net Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) On Tue, Feb 21, 2017 at 05:19:14PM -0500, Glenn Morris wrote: > frederik@ofb.net wrote: > > > In my ~/.emacs file, I get repeating lines like this: > [...] > > (package-initialize) > > > > (package-initialize) > > > > (package-initialize) > > The function package--ensure-init-file adds this line, but it takes care > to only do so if it's not already there. So it's hard to see how you can > end up with multiple copies. Can you find a reproducible sequence that > causes an extra copy to be added; or can you edebug > package--ensure-init-file to see why it adds multiple copies? > Thanks for the reply. Well, you prompted me to find a reproducible sequence. It turns out that the problem comes from when I start emacs as "root". (This happens automatically in ~/.xinitrc, for better or worse, where I create a screen session with an emacs running as root, which starts a server so that I can edit files using emacsclient as 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 following test in package--ensure-init-file fails: ;; Don't visit the file if we don't have to. (with-temp-buffer (insert-file-contents user-init-file) (goto-char (point-min)) (re-search-forward "(package-initialize\\_>" nil 'noerror)) (by the way what's with the unnecessary optimization in the lines previous to these? ugh) 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. Thank you! From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 22 14:28:38 2017 Received: (at 25819) by debbugs.gnu.org; 22 Feb 2017 19:28:38 +0000 Received: from localhost ([127.0.0.1]:51549 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cgcac-0000ww-K4 for submit@debbugs.gnu.org; Wed, 22 Feb 2017 14:28:38 -0500 Received: from eggs.gnu.org ([208.118.235.92]:53356) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cgcab-0000wj-2e for 25819@debbugs.gnu.org; Wed, 22 Feb 2017 14:28:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cgcaU-0004C6-QF for 25819@debbugs.gnu.org; Wed, 22 Feb 2017 14:28:31 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:55808) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cgcaR-0004AF-V3; Wed, 22 Feb 2017 14:28:28 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1cgcaR-0001Uv-GB; Wed, 22 Feb 2017 14:28:27 -0500 From: Glenn Morris To: frederik@ofb.net Subject: Re: bug#25819: 25.1; Added by Package.el. Added by Package.el. Added by Package.el. Added by Package.el. References: <20170220201438.GG1204@ofb.net> <8ttw7n1925.fsf@fencepost.gnu.org> <20170221230422.GJ1204@ofb.net> X-Spook: Southwest Smallpox Juarez Aid Magnitude Earthquake Soviet X-Ran: +Q&$K+iJ+wDg#"}~K:DsN7zl>)O+\)I9_>q$Mq$"%,1oo4jaUe;7Rv(PBq0I}oH?'Ib?r0 X-Hue: green X-Debbugs-No-Ack: yes X-Attribution: GM Date: Wed, 22 Feb 2017 14:28:27 -0500 In-Reply-To: <20170221230422.GJ1204@ofb.net> (frederik@ofb.net's message of "Tue, 21 Feb 2017 15:04:22 -0800") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 25819 Cc: 25819@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) 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. :) From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 22 15:49:04 2017 Received: (at 25819) by debbugs.gnu.org; 22 Feb 2017 20:49:04 +0000 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 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 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 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) Received: from frederik by thutmose with local (Exim 4.88) (envelope-from ) id 1cgdqH-00035Q-40; Wed, 22 Feb 2017 12:48:53 -0800 Date: Wed, 22 Feb 2017 12:48:53 -0800 From: frederik@ofb.net To: Glenn Morris Subject: Re: bug#25819: 25.1; Added by Package.el. Added by Package.el. Added by Package.el. Added by Package.el. Message-ID: <20170222204852.GN1204@ofb.net> References: <20170220201438.GG1204@ofb.net> <8ttw7n1925.fsf@fencepost.gnu.org> <20170221230422.GJ1204@ofb.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.7.2 (2016-11-26) X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 25819 Cc: 25819@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: frederik@ofb.net Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) 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 From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 22 21:26:59 2017 Received: (at 25819) by debbugs.gnu.org; 23 Feb 2017 02:26:59 +0000 Received: from localhost ([127.0.0.1]:51765 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cgj7S-00020x-Vn for submit@debbugs.gnu.org; Wed, 22 Feb 2017 21:26:59 -0500 Received: from mail-it0-f67.google.com ([209.85.214.67]:36821) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cgj7Q-00020e-8y; Wed, 22 Feb 2017 21:26:56 -0500 Received: by mail-it0-f67.google.com with SMTP id w185so369330ita.3; Wed, 22 Feb 2017 18:26:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=ZYkxnvskhRHA5bWgnNFvfOma5U5ssSvvSEry5ITaJiE=; b=ZO42270e8G8TalHMUNIEW6dUGA3051CGOWCs09zMBjfbWYR/ISYvUSdkPbUG8qiNoi 4I8mrPfnmwr84UHLiU1pPrKqxhhV5+6d4H5DCqcu+ZymwD3Hhw/d5/w8LOmRShdig8uO Bv0QePW+IEtd7JSPfwBrAP0J2uiXTq0vqHtYYNaAhMXQwdKpXsaJ3yiM0OBqwSFENcyJ 6K+p6kWXsjIXAhp2oMXoFHd7ozWZRKiwqj8+J5GI6vZlJiedhwt2F2OTQZaWRzpck7mu b+Zr0PSdVUN5kQgMPsz9LAM4iZvLjLI28zsE6UDZBL3iELHe5MgiP1wdCkhRqXVfz7BE oP9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=ZYkxnvskhRHA5bWgnNFvfOma5U5ssSvvSEry5ITaJiE=; b=sl5rxa/h6NhAOfY7WJwf1g7DuRrNYzdzcGEcb4jAXrsb07+GlyYGvYiT1wtAlLJmUG BRKMBtNiko+Tx5+RWUyfbJeoYp/LloMY8c/oAefyP6krbpk8aqOUawN+x73cuRpeAxiy e8Ck1oeX8Aj2nunST/YOj1Md/jij0L1SeT8NrPhvrquvi6EG3QFD2LsyCSmZ1S/IGjVB L3lrP/Zp27iL6RoON8Wy3WpQedgx7nxdfFEX19E30FvsxgvBO0yGpDAsj/iHyDi/Wk0m aIOW+j3COqW8cd6Z+Dd1bQnyPhDZmtVMoCpGWTIqAT9zRU0gNQYOLxMw3qyTiIZ61Jjf 5LsA== X-Gm-Message-State: AMke39m7Fe5nY/bjux2jY4NAPxxOVwWAcvA0nz9TAUa1fflkzLVvdBWjhXouXEKoq/3YRA== X-Received: by 10.36.94.66 with SMTP id h63mr1860746itb.41.1487816810730; Wed, 22 Feb 2017 18:26:50 -0800 (PST) Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id m77sm1304349ita.16.2017.02.22.18.26.49 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 22 Feb 2017 18:26:50 -0800 (PST) From: npostavs@users.sourceforge.net To: frederik@ofb.net Subject: Re: bug#25819: 25.1; Added by Package.el. Added by Package.el. Added by Package.el. Added by Package.el. References: <20170220201438.GG1204@ofb.net> <8ttw7n1925.fsf@fencepost.gnu.org> <20170221230422.GJ1204@ofb.net> <20170222204852.GN1204@ofb.net> Date: Wed, 22 Feb 2017 21:28:02 -0500 In-Reply-To: <20170222204852.GN1204@ofb.net> (frederik@ofb.net's message of "Wed, 22 Feb 2017 12:48:53 -0800") Message-ID: <87zihdfxot.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 25819 Cc: 25819@debbugs.gnu.org, Glenn Morris X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) --=-=-= Content-Type: text/plain forcemerge 25819 24643 tags 25819 patch quit frederik@ofb.net writes: > On Wed, Feb 22, 2017 at 02:28:27PM -0500, Glenn Morris wrote: >> >> 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 > > You don't think my problem is common!? :) Well I'm not sure how other > people edit files as root, Probably with TRAMP: https://www.emacswiki.org/emacs/TrampMode#toc20 > 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: AFAICT, this is essentially the problem described in #24643 and should be fixed by the suggestion there: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=v1-0001-Don-t-call-package-ensure-init-file-if-initialize.patch Content-Description: patch >From aeae23ab082e948eca71ead3ea50a49a4fe73251 Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Wed, 22 Feb 2017 21:12:41 -0500 Subject: [PATCH v1] Don't call package--ensure-init-file if initialized during startup * lisp/emacs-lisp/package.el (package-initialize): Check `after-init-time' rather than `load-file-name' to decide if `package--ensure-init-file' should be called. Depending on `load-file-name' will fail if the user calls `pacakge-initialize' in file which is loaded from the init file (Bug#24643, Bug#25819). --- lisp/emacs-lisp/package.el | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 0851c5e1fd..ee4bb750ab 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -1445,13 +1445,13 @@ package-initialize taken care of by `package-initialize'." (interactive) (setq package-alist nil) - (if (equal user-init-file load-file-name) - ;; If `package-initialize' is being called as part of loading - ;; the init file, it's obvious we don't need to ensure-init. - (setq package--init-file-ensured t - ;; And likely we don't need to run it again after init. - package-enable-at-startup nil) - (package--ensure-init-file)) + (if after-init-time + (package--ensure-init-file) + ;; If `package-initialize' is before we finished loading the init + ;; file, it's obvious we don't need to ensure-init. + (setq package--init-file-ensured t + ;; And likely we don't need to run it again after init. + package-enable-at-startup nil)) (package-load-all-descriptors) (package-read-all-archive-contents) (unless no-activate -- 2.11.1 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 22 21:47:31 2017 Received: (at 25819) by debbugs.gnu.org; 23 Feb 2017 02:47:31 +0000 Received: from localhost ([127.0.0.1]:51784 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cgjRL-0004EI-DS for submit@debbugs.gnu.org; Wed, 22 Feb 2017 21:47:31 -0500 Received: from eggs.gnu.org ([208.118.235.92]:43881) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cgjRJ-0004E4-I8 for 25819@debbugs.gnu.org; Wed, 22 Feb 2017 21:47:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cgjRD-0000Fe-Pa for 25819@debbugs.gnu.org; Wed, 22 Feb 2017 21:47:24 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:32877) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cgjRB-0000F9-Vh; Wed, 22 Feb 2017 21:47:22 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1cgjRB-0001qP-Hf; Wed, 22 Feb 2017 21:47:21 -0500 From: Glenn Morris To: frederik@ofb.net Subject: Re: bug#25819: 25.1; Added by Package.el. Added by Package.el. Added by Package.el. Added by Package.el. References: <20170220201438.GG1204@ofb.net> <8ttw7n1925.fsf@fencepost.gnu.org> <20170221230422.GJ1204@ofb.net> <20170222204852.GN1204@ofb.net> X-Spook: Recall afsatcom UMTS underground InfoSec monarchist X-Ran: T/oTV)GD&s(ulUEv1PRH{U1Xg&p4-,k9kY_p#sMZV[do&DIbQY5%`I#@e4\*0U3+,?+3KD X-Hue: magenta X-Debbugs-No-Ack: yes X-Attribution: GM Date: Wed, 22 Feb 2017 21:47:21 -0500 In-Reply-To: <20170222204852.GN1204@ofb.net> (frederik@ofb.net's message of "Wed, 22 Feb 2017 12:48:53 -0800") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 25819 Cc: 25819@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) 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/") >> 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. I meant the odd use of changing HOME to load someone else's .emacs. As it turns out, that isn't related. (Did you consider symlinking ~frederik.emacs to /root/.emacs, and adding UID == 0 conditionals where needed?) From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 23 01:24:02 2017 Received: (at 25819) by debbugs.gnu.org; 23 Feb 2017 06:24:02 +0000 Received: from localhost ([127.0.0.1]:51888 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cgmos-0004JF-EW for submit@debbugs.gnu.org; Thu, 23 Feb 2017 01:24:02 -0500 Received: from icgriddb04.seas.upenn.edu ([158.130.57.72]:49268) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cgmoo-0004In-6c for 25819@debbugs.gnu.org; Thu, 23 Feb 2017 01:23:58 -0500 Received: from [10.13.0.6] (helo=ofb.net) by ICGRIDDB04.SEAS.upenn.edu with esmtp (Exim 4.87) (envelope-from ) id 1cgmon-0005Oj-3x; Thu, 23 Feb 2017 01:23:57 -0500 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 B649F412AD; Wed, 22 Feb 2017 22:23:51 -0800 (PST) Received: from frederik by thutmose with local (Exim 4.88) (envelope-from ) id 1cgmoh-0006mR-2D; Wed, 22 Feb 2017 22:23:51 -0800 Date: Wed, 22 Feb 2017 22:23:51 -0800 From: frederik@ofb.net To: npostavs@users.sourceforge.net Subject: Re: bug#25819: 25.1; Added by Package.el. Added by Package.el. Added by Package.el. Added by Package.el. Message-ID: <20170223062351.GR1204@ofb.net> References: <20170220201438.GG1204@ofb.net> <8ttw7n1925.fsf@fencepost.gnu.org> <20170221230422.GJ1204@ofb.net> <20170222204852.GN1204@ofb.net> <87zihdfxot.fsf@users.sourceforge.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87zihdfxot.fsf@users.sourceforge.net> User-Agent: Mutt/1.7.2 (2016-11-26) X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 25819 Cc: 25819@debbugs.gnu.org, Glenn Morris X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: frederik@ofb.net Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Thank you! On Wed, Feb 22, 2017 at 09:28:02PM -0500, npostavs@users.sourceforge.net wrote: > forcemerge 25819 24643 > tags 25819 patch > quit > > frederik@ofb.net writes: > > > On Wed, Feb 22, 2017 at 02:28:27PM -0500, Glenn Morris wrote: > >> > >> 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 > > > > You don't think my problem is common!? :) Well I'm not sure how other > > people edit files as root, > > Probably with TRAMP: https://www.emacswiki.org/emacs/TrampMode#toc20 > > > 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: > > AFAICT, this is essentially the problem described in #24643 and should be > fixed by the suggestion there: > > From aeae23ab082e948eca71ead3ea50a49a4fe73251 Mon Sep 17 00:00:00 2001 > From: Noam Postavsky > Date: Wed, 22 Feb 2017 21:12:41 -0500 > Subject: [PATCH v1] Don't call package--ensure-init-file if initialized during > startup > > * lisp/emacs-lisp/package.el (package-initialize): Check > `after-init-time' rather than `load-file-name' to decide if > `package--ensure-init-file' should be called. Depending on > `load-file-name' will fail if the user calls `pacakge-initialize' in > file which is loaded from the init file (Bug#24643, Bug#25819). > --- > lisp/emacs-lisp/package.el | 14 +++++++------- > 1 file changed, 7 insertions(+), 7 deletions(-) > > diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el > index 0851c5e1fd..ee4bb750ab 100644 > --- a/lisp/emacs-lisp/package.el > +++ b/lisp/emacs-lisp/package.el > @@ -1445,13 +1445,13 @@ package-initialize > taken care of by `package-initialize'." > (interactive) > (setq package-alist nil) > - (if (equal user-init-file load-file-name) > - ;; If `package-initialize' is being called as part of loading > - ;; the init file, it's obvious we don't need to ensure-init. > - (setq package--init-file-ensured t > - ;; And likely we don't need to run it again after init. > - package-enable-at-startup nil) > - (package--ensure-init-file)) > + (if after-init-time > + (package--ensure-init-file) > + ;; If `package-initialize' is before we finished loading the init > + ;; file, it's obvious we don't need to ensure-init. > + (setq package--init-file-ensured t > + ;; And likely we don't need to run it again after init. > + package-enable-at-startup nil)) > (package-load-all-descriptors) > (package-read-all-archive-contents) > (unless no-activate > -- > 2.11.1 > From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 23 01:39:57 2017 Received: (at 25819) by debbugs.gnu.org; 23 Feb 2017 06:39:57 +0000 Received: from localhost ([127.0.0.1]:51894 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cgn4G-0004jO-UU for submit@debbugs.gnu.org; Thu, 23 Feb 2017 01:39:57 -0500 Received: from icgriddb04.seas.upenn.edu ([158.130.57.72]:49374) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cgn4F-0004jH-RK for 25819@debbugs.gnu.org; Thu, 23 Feb 2017 01:39:56 -0500 Received: from [10.13.0.6] (helo=ofb.net) by ICGRIDDB04.SEAS.upenn.edu with esmtp (Exim 4.87) (envelope-from ) id 1cgn4E-0005XG-85; Thu, 23 Feb 2017 01:39:54 -0500 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 D7A9F3FFB9; Wed, 22 Feb 2017 22:39:48 -0800 (PST) Received: from frederik by thutmose with local (Exim 4.88) (envelope-from ) id 1cgn48-00077b-1o; Wed, 22 Feb 2017 22:39:48 -0800 Date: Wed, 22 Feb 2017 22:39:48 -0800 From: frederik@ofb.net To: Glenn Morris Subject: Re: bug#25819: 25.1; Added by Package.el. Added by Package.el. Added by Package.el. Added by Package.el. Message-ID: <20170223063948.GS1204@ofb.net> References: <20170220201438.GG1204@ofb.net> <8ttw7n1925.fsf@fencepost.gnu.org> <20170221230422.GJ1204@ofb.net> <20170222204852.GN1204@ofb.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.7.2 (2016-11-26) X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 25819 Cc: 25819@debbugs.gnu.org, npostavs@users.sourceforge.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: frederik@ofb.net Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) > > 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. > > I meant the odd use of changing HOME to load someone else's .emacs. > As it turns out, that isn't related. > > (Did you consider symlinking ~frederik.emacs to /root/.emacs, and adding > UID == 0 conditionals where needed?) Yes I think this was one thing I tried. I can't remember what went wrong there, but one thing is I have a bunch of lines like this in my ~/.emacs: (load "~/.emacs.d/fhe-bury-buffer.el") So I think $HOME has to be changed to ~/, while ~/.emacs is being read, as you can see in my earlier message. But it turns out that this was pretty much enough. Tramp looks cool; I wish I'd known about it before, but now I use sshfs and sudo and this obviates most of the uses for me. I don't use the Emacs GUI - strictly terminal here - and I often open files from the command line, via emacsclient, rather than C-x C-f. Particularly for stuff like configuration files that I end up editing as root. .zprofile: export EDITOR="emacsclient -c -nw" .zshrc: alias em=$EDITOR I don't know what you'd call my usage pattern but it's perhaps more like a vim user, using the editor from the shell and keeping it lightweight. From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 26 11:17:50 2017 Received: (at 25819) by debbugs.gnu.org; 26 Feb 2017 16:17:50 +0000 Received: from localhost ([127.0.0.1]:56947 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ci1W9-0003os-UI for submit@debbugs.gnu.org; Sun, 26 Feb 2017 11:17:50 -0500 Received: from mail-it0-f65.google.com ([209.85.214.65]:35075) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ci1W8-0003oV-6x; Sun, 26 Feb 2017 11:17:48 -0500 Received: by mail-it0-f65.google.com with SMTP id 203so9145440ith.2; Sun, 26 Feb 2017 08:17:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=RjnVlzrstibBCb/q7u0wV77qzwCWLbPHCnMHSu8Pr/s=; b=VPuzNL8hB6a6PulZLrQjm87wdOqRXvDThhWShl65Ybwiq99QXaSXxHKoXE4GC/K54P ioUZPXVjITpL2JQZGf0CgFz0yrurubbLjdGSbqpTSxpR4q4BZrz4yt8y0mkxZPyo10p8 +090xy2s3FlvrJkuompLrC1FW9SaiOk2FE6o5vd6a6JOVclfY9v9+s83hlGLXl+oOIcX a8Q5tyEn1hF1XpvAlJft0O8WHzej3m2/3P6Z7ceLQAmBuIWkpWvAKTRLuD6pCs9kTYtC OgGkPEwtfQ6IKF5x8tXL/4DJI+ryIoBUujm9jV4pKduq8tx6+O7QR6HP9ImWSTjhTYB1 4Bag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=RjnVlzrstibBCb/q7u0wV77qzwCWLbPHCnMHSu8Pr/s=; b=kmJ61JTgVMxU4njEomaD9QD3zW1WTfWUJ706cs5rmM4Op4MkfCLiJYUh6kbVIJR2iL FGikYDj3Ru5C4p1rsho+kk+vcp0ToP/JfoGMsJ/XGlgM/TD1S6wSoUnFsKD3UIMrGWxM zxj1tkTr9m9v/vJPrfAh7yRpf1i05Yto2ClIfUidb/XO6+9eWzBdWhDE8c8MxjZw76sl q8lO0lcLZbMHB9EUfyNpni5fQnBsGFm+VDnTwkaIYy6EnETwhQg0o+Zi8Adpe1iSVCW5 qwhoRdeTfCBn1AmLFHf5/fXNQkKePaIcMM2r7onzflfKS7deMrpJH39kSemEAuvGLXt1 /D8Q== X-Gm-Message-State: AMke39mQ3wHK7h7tuwtV1cQTvjEN4+pD9oiC+Qqc2dg+gPkivBy4VO56Bz2zpTaryj9C2w== X-Received: by 10.36.65.4 with SMTP id x4mr10964723ita.69.1488125862832; Sun, 26 Feb 2017 08:17:42 -0800 (PST) Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id r85sm3296605itc.13.2017.02.26.08.17.41 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 26 Feb 2017 08:17:42 -0800 (PST) From: npostavs@users.sourceforge.net To: frederik@ofb.net Subject: Re: bug#25819: 25.1; Added by Package.el. Added by Package.el. Added by Package.el. Added by Package.el. References: <20170220201438.GG1204@ofb.net> <8ttw7n1925.fsf@fencepost.gnu.org> <20170221230422.GJ1204@ofb.net> <20170222204852.GN1204@ofb.net> <87zihdfxot.fsf@users.sourceforge.net> <20170223062351.GR1204@ofb.net> Date: Sun, 26 Feb 2017 11:18:55 -0500 In-Reply-To: <20170223062351.GR1204@ofb.net> (frederik@ofb.net's message of "Wed, 22 Feb 2017 22:23:51 -0800") Message-ID: <87shn1dixc.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 25819 Cc: 25819@debbugs.gnu.org, Glenn Morris X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) tags 25819 fixed close 25819 26.1 quit frederik@ofb.net writes: > Thank you! > >> >> AFAICT, this is essentially the problem described in #24643 and should be >> fixed by the suggestion there: Pushed to master [1: 6b6cc56e72]. 1: 2017-02-26 11:11:40 -0500 6b6cc56e728a4d8b5ccac86ac393be7cd29207e2 Don't call package--ensure-init-file if initialized during startup From unknown Wed Jun 18 23:08:54 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 27 Mar 2017 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator