From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Phil Sainty Newsgroups: gmane.emacs.bugs Subject: bug#21423: 24.5; (package-initialize) added to init.el without (setq package-enable-at-startup nil) Date: Mon, 07 Sep 2015 01:18:46 +1200 Message-ID: <55EC3D36.8060007@orcon.net.nz> References: <55EC1CF4.60006@orcon.net.nz> <55EC1F21.8080702@orcon.net.nz> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------010304090104050108090204" X-Trace: ger.gmane.org 1441545571 9544 80.91.229.3 (6 Sep 2015 13:19:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 6 Sep 2015 13:19:31 +0000 (UTC) To: 21423@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Sep 06 15:19:17 2015 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 1ZYZql-00039R-30 for geb-bug-gnu-emacs@m.gmane.org; Sun, 06 Sep 2015 15:19:15 +0200 Original-Received: from localhost ([::1]:48189 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYZqg-0000R1-0Z for geb-bug-gnu-emacs@m.gmane.org; Sun, 06 Sep 2015 09:19:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45315) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYZqb-0000Qk-JV for bug-gnu-emacs@gnu.org; Sun, 06 Sep 2015 09:19:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZYZqY-0001CM-CK for bug-gnu-emacs@gnu.org; Sun, 06 Sep 2015 09:19:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:58368) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYZqY-0001CG-88 for bug-gnu-emacs@gnu.org; Sun, 06 Sep 2015 09:19:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZYZqX-0003fG-Q7 for bug-gnu-emacs@gnu.org; Sun, 06 Sep 2015 09:19:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Phil Sainty Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 06 Sep 2015 13:19:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21423 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.144154553814077 (code B ref -1); Sun, 06 Sep 2015 13:19:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 6 Sep 2015 13:18:58 +0000 Original-Received: from localhost ([127.0.0.1]:50578 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZYZqU-0003ez-0F for submit@debbugs.gnu.org; Sun, 06 Sep 2015 09:18:58 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:35285) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZYZqR-0003er-Ki for submit@debbugs.gnu.org; Sun, 06 Sep 2015 09:18:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZYZqQ-0001Az-Ey for submit@debbugs.gnu.org; Sun, 06 Sep 2015 09:18:55 -0400 Original-Received: from lists.gnu.org ([208.118.235.17]:44812) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYZqQ-0001Av-C5 for submit@debbugs.gnu.org; Sun, 06 Sep 2015 09:18:54 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45290) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYZqP-0000Q9-9k for bug-gnu-emacs@gnu.org; Sun, 06 Sep 2015 09:18:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZYZqM-0001AS-2x for bug-gnu-emacs@gnu.org; Sun, 06 Sep 2015 09:18:53 -0400 Original-Received: from [219.88.242.59] (port=59345 helo=mail.orcon.net.nz) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYZqL-00018t-JO for bug-gnu-emacs@gnu.org; Sun, 06 Sep 2015 09:18:50 -0400 Original-Received: from [10.1.1.5] (202-150-102-33.bng1.avl.orcon.net.nz [202.150.102.33] (may be forged)) (authenticated bits=0) by mail.orcon.net.nz (8.14.3/8.14.3/Debian-9.4) with ESMTP id t86DIkbl039257 for ; Mon, 7 Sep 2015 01:18:46 +1200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0 In-Reply-To: <55EC1F21.8080702@orcon.net.nz> X-Bayes-Prob: 0.0001 (Score 0: No Bayes scoring rules defined, tokens from: outbound) X-CanIt-Geo: ip=202.150.102.33; country=NZ; latitude=-41; longitude=174.0000; http://maps.google.com/maps?q=-41,174.0000&z=6 X-CanItPRO-Stream: base:outbound X-Canit-Stats-ID: 02PdNiK1C - 15527b1e43da - 20150907 X-Scanned-By: CanIt (www . roaringpenguin . com) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x 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:106188 Archived-At: This is a multi-part message in MIME format. --------------010304090104050108090204 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit ...and I'd copied and pasted an unwanted paren from the original line, so that patch was broken anyway. Now fixed and tested. In addition I realised the comments needed tweaking to match the change; and I spotted another (related) bug whereby the code which looks for calls to (package-initialize) doesn't take its optional argument into account, so I've modified those searches too. --------------010304090104050108090204 Content-Type: text/x-patch; name="0001-Disable-package-enable-at-startup-when-forcing-packa.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="0001-Disable-package-enable-at-startup-when-forcing-packa.pa"; filename*1="tch" >From c8287af963e5de462c572c7b0a95554fb96bba7d Mon Sep 17 00:00:00 2001 From: Phil Sainty Date: Sun, 6 Sep 2015 23:05:34 +1200 Subject: [PATCH] Disable package-enable-at-startup when forcing package-initialize --- lisp/emacs-lisp/package.el | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index d4a2f02..3b70880 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -1833,12 +1833,12 @@ add a call to it along with some explanatory comments." (save-restriction (widen) (goto-char (point-min)) - (search-forward "(package-initialize)" nil 'noerror)))) + (re-search-forward "(package-initialize\\_>" nil 'noerror)))) ;; Don't visit the file if we don't have to. (with-temp-buffer (insert-file-contents user-init-file) (goto-char (point-min)) - (search-forward "(package-initialize)" nil 'noerror))))) + (re-search-forward "(package-initialize\\_>" nil 'noerror))))) (unless contains-init (with-current-buffer (or buffer (let ((delay-mode-hooks t)) @@ -1853,9 +1853,10 @@ add a call to it along with some explanatory comments." (insert "\n" ";; Added by Package.el. This must come before configurations of\n" - ";; installed packages. Don't delete this line. If you don't want it,\n" - ";; just comment it out by adding a semicolon to the start of the line.\n" - ";; You may delete these explanatory comments.\n" + ";; installed packages. Don't delete these lines. If you don't want\n" + ";; them, just comment them out by adding a semicolon to the start of\n" + ";; each line. You may delete these explanatory comments.\n" + "(setq package-enable-at-startup nil)\n" "(package-initialize)\n") (unless (looking-at-p "$") (insert "\n")) -- 2.1.0 --------------010304090104050108090204--