From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Rusi Newsgroups: gmane.emacs.help Subject: Re: using use-package Date: Sun, 9 Aug 2015 09:14:03 -0700 (PDT) Message-ID: References: <20150805055619.13567.17B26335@ahiker.mooo.com> <17131863-cbb8-4a85-8470-490fe9a0c0d4@googlegroups.com> <66dceb24-5fef-4316-8c8b-e9a3e62b0fb8@googlegroups.com> <3594e2c6-bd02-412f-98df-9dd0f145277a@googlegroups.com> <01b4d996-aad3-44ff-a580-7950b25b7dc8@googlegroups.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1439136919 26225 80.91.229.3 (9 Aug 2015 16:15:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 9 Aug 2015 16:15:19 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Aug 09 18:15:17 2015 Return-path: Envelope-to: geh-help-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 1ZOTFk-0006nA-Rn for geh-help-gnu-emacs@m.gmane.org; Sun, 09 Aug 2015 18:15:16 +0200 Original-Received: from localhost ([::1]:55693 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZOTFj-0003UP-VC for geh-help-gnu-emacs@m.gmane.org; Sun, 09 Aug 2015 12:15:15 -0400 X-Received: by 10.66.147.226 with SMTP id tn2mr16016578pab.42.1439136844206; Sun, 09 Aug 2015 09:14:04 -0700 (PDT) X-Received: by 10.50.64.180 with SMTP id p20mr86927igs.11.1439136843963; Sun, 09 Aug 2015 09:14:03 -0700 (PDT) Original-Path: usenet.stanford.edu!se8no1065339igc.0!news-out.google.com!nt1ni3664igb.0!nntp.google.com!se8no1065335igc.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=61.1.39.67; posting-account=mBpa7woAAAAGLEWUUKpmbxm-Quu5D8ui Original-NNTP-Posting-Host: 61.1.39.67 User-Agent: G2/1.0 Injection-Date: Sun, 09 Aug 2015 16:14:03 +0000 Original-Xref: usenet.stanford.edu gnu.emacs.help:214121 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:106405 Archived-At: On Sunday, August 9, 2015 at 6:47:30 PM UTC+5:30, Stefan Monnier wrote: > > Are you serious Stefan? > > Not always. Why? > > > Here's a 3-line init: > > --------------------- > > (add-to-list 'package-archives > > '("melpa" . "http://melpa.org/packages/")) > > (package-initialize) > > --------------------- > > Start emacs -Q with that and I get: > > Symbol's value as variable is void: package-archives > > Precede by a (require 'package) and error vanishes > > You can get rid of the error by swapping the two statements as well. > Not sure what is your point. Generic Point: Functional programming is neat; imperative programming is a mess One basic property of FP is that things should not be more order sensitive than the minimum (data-dependency) required When you say (setq foo-variable t) (foo-mode 1) should work *for a properly written* foo mode you are saying basically the same thing. However... Specific point: By not having package-archive as an autoload, those two statements become more order dependent than they (seemingly) need be. [There may be all sorts of other reasons I dont understand of course. Not saying its a bug; just that it is fragile]. And if core emacs functionality can be thus fragile is it realistic to expect random packages to satisfy all the new/changing/confusing best practices? IOW you folks should give a serious consideration to putting (something like) use-package (better req-package) in the core