From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: phillip.lord@russet.org.uk (Phillip Lord) Newsgroups: gmane.emacs.help Subject: Re: use-package Date: Wed, 04 May 2016 17:22:41 +0100 Message-ID: <87y47pg5da.fsf@russet.org.uk> References: <874magv15u.fsf@mat.ucm.es> <87d1p38ll6.fsf@mat.ucm.es> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1462379019 32284 80.91.229.3 (4 May 2016 16:23:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 4 May 2016 16:23:39 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Stefan Monnier Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed May 04 18:23:29 2016 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 1axzaD-0005Ys-2Z for geh-help-gnu-emacs@m.gmane.org; Wed, 04 May 2016 18:23:29 +0200 Original-Received: from localhost ([::1]:48905 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1axza5-0006I6-RG for geh-help-gnu-emacs@m.gmane.org; Wed, 04 May 2016 12:23:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35459) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1axzZp-00064N-C7 for help-gnu-emacs@gnu.org; Wed, 04 May 2016 12:23:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1axzZd-0000xe-I1 for help-gnu-emacs@gnu.org; Wed, 04 May 2016 12:22:59 -0400 Original-Received: from cloud103.planethippo.com ([31.216.48.48]:35526) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1axzZc-0000uR-0H for help-gnu-emacs@gnu.org; Wed, 04 May 2016 12:22:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=russet.org.uk; s=default; h=Content-Type:MIME-Version:Message-ID: In-Reply-To:Date:References:Subject:Cc:To:From; bh=QDedCW0Iz2E2E9JT8+RT4THUXYWl/p0amlbiL6YPtRY=; b=qX9y6PJXLl93ROommbKhS4gxud YSHDAFMhiNJQNSLzERv68ejhghFNZJzc2ujFsDNaGuavV3y1Va7YF644w61dAaVqrUqMIWwwwDwQY lA/BaZ1bgszerSMmjSE8uYwClbfn+vdOS7W78Ne6f7RZ6LQHgnWuFRa/ghb4MOoHCAlHnJ2O24K40 e+lS0guYDb/KP/ftNDYIYvMPxW0RQ7I1YA4mDXF27hvkS9di8dvH+L6sKVcAsHxxt44niA+1IaniI LgikeI0aJPCIxMx+V//3rimDqli/a8vbQ46aO8Pk/S1ka7HG3LXjsFPZVnewbt8326AAIw4KP/kMZ q0qai61g==; Original-Received: from janus-nat-128-240-225-60.ncl.ac.uk ([128.240.225.60]:33743 helo=russet.org.uk) by cloud103.planethippo.com with esmtpsa (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.86_1) (envelope-from ) id 1axzZS-004IQE-BY; Wed, 04 May 2016 17:22:42 +0100 In-Reply-To: (Stefan Monnier's message of "Tue, 03 May 2016 18:28:36 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.93 (gnu/linux) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cloud103.planethippo.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - russet.org.uk X-Get-Message-Sender-Via: cloud103.planethippo.com: authenticated_id: phillip.lord@russet.org.uk X-Authenticated-Sender: cloud103.planethippo.com: phillip.lord@russet.org.uk X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 31.216.48.48 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.help:109872 Archived-At: Stefan Monnier writes: >> use-package speeds up startup times by delaying the loading the packages >> that you can afford to.. > > In my point of view, the job that use-package does is only useful when > the corresponding package is poorly setup to start with. > > IOW, if use-package is helpful, usually it indicates a shortcoming in > the package or in the way the package is installed. I was curious about that "usually". So I had a quick look at my own .emacs (I use use-package everywhere in it). You are just about right -- it's about 50% of my cases that a use-package form contains what is essentially a fix. My main use for use-package that I think is good are: - auto-install from ELPA - using defer to idle loading. - switching global modes on as well as loading them - diminishing these global modes - configuration -- for example, I have global bindings for org-mode - lots of hooks - setting load paths for my own packages which are *not* package installed There are some issue here that could do with long term fixes. For example, diminishing minor modes -- I think we have overloaded the functionality of minor modes; many (company say, or eldoc) you either want on or off. Do I really need mode-line space to be taken up telling me that company is one? And is the mode-line the only place we can display this information? Global binding -- key-binding space is precious in Emacs, but perhaps with tools like hydra, could allow better use of longer bindings. Lots of hooks -- I regularly hear new users of Emacs complain "well, it doesn't go X" where X are things like, for example, info on function arguments or completion. Emacs does do both of these, but you have to turn them on; perhaps, core Emacs should be more adventurous with its defaults. load-path for my own packages: I develop without installing and eval as I go, but this means I develop source in one way and users get another. Perhaps, we need better support given some lisp package source, for rapidly generating a package and installing it, directly in Emacs-lisp-mode. Just some thoughts. Phil