From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: joaotavora@gmail.com (=?iso-8859-1?Q?Jo=E3o_T=E1vora?=) Newsgroups: gmane.emacs.devel Subject: Re: use-package.el -> Emacs core Date: Tue, 10 Nov 2015 13:37:58 +0000 Message-ID: References: <564136F7.2020404@yandex.ru> <87mvum1bbg.fsf@pedrosilva.pt> <87k2pqqd0j.fsf@russet.org.uk> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1447162941 11733 80.91.229.3 (10 Nov 2015 13:42:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 10 Nov 2015 13:42:21 +0000 (UTC) Cc: Pedro Silva , emacs-devel@gnu.org To: phillip.lord@russet.org.uk (Phillip Lord) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 10 14:42:14 2015 Return-path: Envelope-to: ged-emacs-devel@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 1Zw9Bd-0006aT-0e for ged-emacs-devel@m.gmane.org; Tue, 10 Nov 2015 14:42:13 +0100 Original-Received: from localhost ([::1]:59877 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zw9Bc-0007d2-BM for ged-emacs-devel@m.gmane.org; Tue, 10 Nov 2015 08:42:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44177) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zw97d-0001X2-U1 for emacs-devel@gnu.org; Tue, 10 Nov 2015 08:38:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zw97a-0002Mn-5R for emacs-devel@gnu.org; Tue, 10 Nov 2015 08:38:05 -0500 Original-Received: from mail-wm0-x22d.google.com ([2a00:1450:400c:c09::22d]:32899) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zw97Z-0002Mj-SH for emacs-devel@gnu.org; Tue, 10 Nov 2015 08:38:02 -0500 Original-Received: by wmec201 with SMTP id c201so133952913wme.0 for ; Tue, 10 Nov 2015 05:38:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type:content-transfer-encoding; bh=HJiBZB7Rfr+UMdQZUX1QSyd1tXuROiFVgRF97Cm7Dw0=; b=wIe2wKlXwpNA/LTefHpDXvo7YaP+W+cB/nsXYdgemah83yuWeanPbMefkBLRSy7OrJ B6DVMRlNFGKdcSU7om4tS9DOMA3I/mz5b+A8izKe28TnY0AjcqhrUY9I87C2IKrQpxTn JVbU6GwLD/Ws/g8Cd3ozmmuLhbVKlFUq+ytB4lmhbin95oRP/40bnk5ISffI3eMiMQxg I64u3CxyrPfn6mGMLAEiN/FDWZ7V+TPw85dzKtbvocJaVFEr3Ls97xH51YByqhMST+Nf Ra4F56OIs1EvgtxcysHxUX6Jv5x3dRjRbx8gsPAlimMgheuHymyWi3+U5eD8YiqjvkGm b5+Q== X-Received: by 10.28.137.210 with SMTP id l201mr33226023wmd.103.1447162681310; Tue, 10 Nov 2015 05:38:01 -0800 (PST) Original-Received: from GONDOMAR.yourcompany.com (mail1.siscog.pt. [93.108.236.53]) by smtp.gmail.com with ESMTPSA id c1sm3588769wjf.19.2015.11.10.05.38.00 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Nov 2015 05:38:00 -0800 (PST) In-Reply-To: <87k2pqqd0j.fsf@russet.org.uk> (Phillip Lord's message of "Tue, 10 Nov 2015 12:01:32 +0000") User-Agent: Gnus/5, (Gnus v5.13) Emacs/25.0.50 (windows-nt) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c09::22d X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:193849 Archived-At: phillip.lord@russet.org.uk (Phillip Lord) writes: > use-package introduces a single (documented) form. So, it's easy to > re-eval everything, and keeps all your code in one place. Trivial as > this sounds, this is actually pretty useful. > > In your examples, you need to "progn" everything to achieve the same. Or use `eval-region'. Or eval the whole .emacs while you're at it. > >> But perhaps I'm misinterpreting what these directives actually do, or >> perhaps you can illustrate with some snippets of your own. > > (progn > (eval-and-compile > (push "~/foo" load-path)) How pushing foo to the load-path at compile-time needed/useful for this example? > (run-with-idle-timer 5 nil #'require 'foo nil t) > (unless > (fboundp 'foo-a) > (autoload #'foo-a "foo" nil t)) According to the `autoload' docstring: If FUNCTION is already defined other than as an autoload, this does nothing and returns nil. So, unless I'm missing something, your example is misrepresenting the alternative: when I asked about a fair comparison, I didn't mean a mere macroexpansion of the `use-package' form. > (message "%s...done" "Loading package foo")))))) By the way, for the pretty logging functionality, why not add something more atomic like a `timing' macro? It could be used as your `progn' replacement (with-timing "Loading bla" ... configure bla ...) As well as anything else not related to packages (with-timing "Frankinboging fretzels" ...) I prefer reusable components to big obscure, hard-to-debug black magic spells. As another drawback, if a user messes up a line in use-package (still totally possible right?) it's much easier to catch that error in a backtrace, or a byte-compilation log, when *not* using the syntactic sugar. The problem could be slightly reduced if use-package came with an edebug spec. I don't think it does. If the user is already writing elisp, let him learn it while he's at it. > A useful system for working out why your .emacs is so slow to load. > > *shrugs*. I really like it, and it's made my .emacs cleaner. If *you* like it and in your opinion it's cleaner then *you* really should use it :-) My argument is that, by adding it to Emacs, especially to the core, you're effectively supporting another official package configuration method, thus burdening every package maintainer with a different opinion with the need to learn a new DSL when reading user's bug reports. Perhaps every other package maintainer has converted already, but at least I haven't, not yet. Jo=E3o