From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.devel Subject: Re: use-package.el -> Emacs core Date: Tue, 10 Nov 2015 13:23:35 +0100 Message-ID: References: <564136F7.2020404@yandex.ru> <877flqe1a4.fsf@gmail.com> <87twoucaxz.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11c37ec8b5446c05242ec932 X-Trace: ger.gmane.org 1447158267 31334 80.91.229.3 (10 Nov 2015 12:24:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 10 Nov 2015 12:24:27 +0000 (UTC) Cc: Dmitry Gutov , Emacs developers To: Oleh Krehel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 10 13:24:27 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 1Zw7yK-0004o8-Ub for ged-emacs-devel@m.gmane.org; Tue, 10 Nov 2015 13:24:25 +0100 Original-Received: from localhost ([::1]:59225 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zw7yK-0004eL-AQ for ged-emacs-devel@m.gmane.org; Tue, 10 Nov 2015 07:24:24 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50574) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zw7yF-0004eF-Ov for emacs-devel@gnu.org; Tue, 10 Nov 2015 07:24:20 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zw7yB-0006lO-SL for emacs-devel@gnu.org; Tue, 10 Nov 2015 07:24:19 -0500 Original-Received: from mail-lb0-x229.google.com ([2a00:1450:4010:c04::229]:36364) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zw7yB-0006lK-H9 for emacs-devel@gnu.org; Tue, 10 Nov 2015 07:24:15 -0500 Original-Received: by lbblt2 with SMTP id lt2so99983853lbb.3 for ; Tue, 10 Nov 2015 04:24:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=BjxUAOkiGjj00Um42nFs2Rj6c9YrJC8V4m7dKuulXvc=; b=AcziBzLJ1DKw9+002Zrxk4a4FlfeSrUbM72BrwzrDKLsBPYgg+CCWQNcP0tvO/yish GaWWxW5T0xYES7c73+nBZn9Yi4C60s1mLmWxrFjK+U1a+PbF0Qjjpu77WBnqETi+a6/t FDaq5BEnJrnlSSMhu5JBv9BVs71GUl9Br1inWklBu6XuFwP2xlRYaM2yY069smfPV+BZ tsFyWcDT0V1p4mT9HuCkVdzAIz8G2NA//qpJQ30deaunkeABtaoeYkXe/LVcEGOqv7aR GaOUgLexe6R43T0oM/1y8Cx/qvHS5wRBUMVLcejFwz1CS/POpn8L4D9V2p45A62/vXlE qSpg== X-Received: by 10.112.190.99 with SMTP id gp3mr1470664lbc.117.1447158254746; Tue, 10 Nov 2015 04:24:14 -0800 (PST) Original-Received: by 10.25.21.198 with HTTP; Tue, 10 Nov 2015 04:23:35 -0800 (PST) In-Reply-To: <87twoucaxz.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c04::229 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:193839 Archived-At: --001a11c37ec8b5446c05242ec932 Content-Type: text/plain; charset=UTF-8 On Tue, Nov 10, 2015 at 1:10 PM, Oleh Krehel wrote: > Customize is for people that aren't yet ready to learn Elisp. Once they > do, it indeed becomes redundant. Then, that's an argument *for* use-package. It's for users that aren't yet ready to learn Elisp, but who want to load a package easily from their init.el. use-package is syntactic sugar, yes, and as such, it's easier to use that the "real deal". It is its own language, but that's a feature: if you're a user not interested in learning Elisp, to borrow from Phillip's example, certainly (use-package foo :load-path "~/foo" :commands foo-a foo-b foo-c :defer 5 ) seems much easier than (progn (eval-and-compile (push "~/foo" load-path)) (run-with-idle-timer 5 nil #'require 'foo nil t) (unless (fboundp 'foo-a) (autoload #'foo-a "foo" nil t)) (unless (fboundp 'foo-b) (autoload #'foo-b "foo" nil t)) (unless (fboundp 'foo-c) (autoload #'foo-c "foo" nil t))) --001a11c37ec8b5446c05242ec932 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On Tue, Nov 10, 2015 at 1:10 PM, Oleh Krehel <ohwoeowho@gmail.com> wrote:

<= div>> Customize is for people that aren't yet ready to learn Elisp.= =C2=A0 Once they
> do, it indeed becomes redundant.

Then, that's an argument *for* use-package. It's for users = that aren't yet ready to learn Elisp, but who want to load a package ea= sily from their init.el.

use-package is syntactic = sugar, yes, and as such, it's easier to use that the "real deal&qu= ot;. It is its own language, but that's a feature: if you're a user= not interested in learning Elisp, to borrow from Phillip's example, ce= rtainly

(use-package foo
=C2=A0 :load-path "~/f= oo"
=C2=A0 :commands foo-a foo-b foo-c
=C2=A0 :defer 5
=C2=A0 )


seems much easier than
<= /font>
(progn
=C2=A0 (eval-and-compile
<= span style=3D"font-size:13.3333px">=C2=A0 =C2=A0 (push "~/foo" lo= ad-path))
=C2=A0 (run-with-idle-timer 5 nil #'require 'foo nil t)<= /span>
=C2=A0 (unless
=C2=A0 =C2=A0 =C2=A0 (fboundp 'foo-a)
=C2=A0 =C2=A0 = (autoload #'foo-a "foo" nil t))
=C2=A0 (unless
=C2=A0 =C2= =A0 =C2=A0 (fboundp 'foo-b)
=C2=A0 =C2=A0 (autoload #'foo-b "= foo" nil t))

=C2=A0 (unless
<= span style=3D"font-size:13.3333px">=C2=A0 =C2=A0 =C2=A0 (fboundp 'foo-c= )
=C2=A0 =C2=A0 (autoload #'foo-c "foo" nil t)))
=

--001a11c37ec8b5446c05242ec932--