From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?UTF-8?Q?Cl=c3=a9ment_Pit-Claudel?= Newsgroups: gmane.emacs.devel Subject: Re: Friendly discussion about (package-initialize) Date: Fri, 11 Aug 2017 10:03:19 +0200 Message-ID: References: <87fud4j9pw.fsf@holos> <874ltfw55v.fsf@holos> <878tiqkism.fsf@holos> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1502438677 5643 195.159.176.226 (11 Aug 2017 08:04:37 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 11 Aug 2017 08:04:37 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Aug 11 10:04:31 2017 Return-path: Envelope-to: ged-emacs-devel@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 1dg4vj-00011Y-NS for ged-emacs-devel@m.gmane.org; Fri, 11 Aug 2017 10:04:27 +0200 Original-Received: from localhost ([::1]:46524 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dg4vp-0002z3-PD for ged-emacs-devel@m.gmane.org; Fri, 11 Aug 2017 04:04:33 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40936) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dg4un-0002xR-Kd for emacs-devel@gnu.org; Fri, 11 Aug 2017 04:03:33 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dg4ui-0002wk-Kf for emacs-devel@gnu.org; Fri, 11 Aug 2017 04:03:29 -0400 Original-Received: from mail-wm0-x22a.google.com ([2a00:1450:400c:c09::22a]:35099) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dg4ui-0002va-EQ for emacs-devel@gnu.org; Fri, 11 Aug 2017 04:03:24 -0400 Original-Received: by mail-wm0-x22a.google.com with SMTP id m85so36150085wma.0 for ; Fri, 11 Aug 2017 01:03:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=saPSzU5GotWND8Gq+0LDt1NokXK09JAD7fcHszfnyiA=; b=DQPKAld0qJUOhri16ANH/7hrzw+eVeS+XL8ERREs3hY906UF+SU3fOerjPzlzg+t1B +E+7l/i7pe8Ar+Oj9n59OwLehAIiHtxD8eh/8bIgVpZY0RUEMnVP5Ib46oHWEcpLFkep pmRLNgTTsSIFZveRJTCEhPnCSBrMCy8Dm3CW7rqr+pm2R09x4nn+v9EasQFRaIJGgUjf 6iB36yt0adyw59J9U5hZ6PrNqwowYhzClRhKm/tvuEtptosOi5sE8v4X5+cJCrD9Blfu 2sXSD+grqPH16sZWlWqdtCjj1veWrgBVWU4oHlIfuQw2yz25f2QfylEzVpDmVDVzyQBI zVjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=saPSzU5GotWND8Gq+0LDt1NokXK09JAD7fcHszfnyiA=; b=j0pC8wmy05ZvVPecdkwVO5KNPcqGuy5fvmdawXm/Hf4wTQBRJ941Pi7Biu+UPYWgXT 5/1ok4B2/tbYUUy2LaOZhqlW2A/2iEOSHvABRk4Gv4+dAKN/qw/FziHYNn1haQCsCYvc x58HhgNDzu0VV3NCxCTfXcAexo7TM+nmVTEJ0QaEiiazQuMCwsqBiCaTqpVtLV6bauvv i18kVXlkXyjXaLnsfQiepAS9SqeijJL9AmUZSX5wHbqa3FvweocCdYJo6kxOibVqpmq8 OrLiHpFSZKHjLptwzNZh2fnqu1C1plArWWf7cjMKYv9XyUQUeyxT4JQ93PjpQVA5PDwD tyPA== X-Gm-Message-State: AHYfb5jMLBezFu2hxel454D7lSVVmPw3JNgF6tcj2tDhVLem666nLoHO vD6zaZo8Bs0ZYq6PWQU= X-Received: by 10.28.66.14 with SMTP id p14mr8373057wma.174.1502438601448; Fri, 11 Aug 2017 01:03:21 -0700 (PDT) Original-Received: from [192.168.1.82] (43.225.24.109.rev.sfr.net. [109.24.225.43]) by smtp.gmail.com with ESMTPSA id w20sm329298wra.27.2017.08.11.01.03.20 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 11 Aug 2017 01:03:20 -0700 (PDT) In-Reply-To: <878tiqkism.fsf@holos> Content-Language: en-GB X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::22a X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:217414 Archived-At: On 2017-08-11 03:14, Mark Oteiza wrote: > Sure, `package-load-list' is arguably less likely to be changed, but > tons of people change `package-archives' to use 3rdp packages, and these > users are at the core of the argument for this misfeature. Either > variable being in the wrong position relative to package-initialize > breaks things. I'm not well-versed in these issues, so apologies if this is misguided. Would the following work? * Call package-initialize *before* loading init.el * Add two new functions package-set-load-list and package-set-archives that call package-initialize after setting the relevant variables. This could be extended to any other variable that affect the behavior of package-initialize. If there are many, a larger package-configure function or macro might be more useful. The hope it to settle this package.el trouble by providing something that works without requiring users to add a package-initialize form in their .emacs. I can see the following downsides, and potential fixes: * What about existing configurations? Presumably they currently call package-initialize, so this wouldn't break things for them. * What if people set those variables directly and expect things to work? We could add watchpoints on these variables, or keep the package-initialize call that runs after loading init.el. I don't think people would expect setting a variable to do much, so I don't think thatwould be much of an issue. * What about performance? Won't these extra (implicit) calls (from package-set-archives etc.) make things slow? We could make them reload only what's needed. IOW, package-set-archives would be akin to (progn (setq package-archives …) (package-refresh)) with package-refresh a new function that builds atop a previous package-initialize call. * What if I *don't want* to use package.el at all? We could recognize a special dot-file in .emacs.d to disable package.el entirely (say, .nopackage). On the upside, we get a working configuration for everyone without having to require or insert package-initialize calls in the user's config. Clément.