From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Kaushal Modi <kaushal.modi@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: use-package
Date: Wed, 04 May 2016 08:09:51 -0400 [thread overview]
Message-ID: <jwvk2jadol3.fsf-monnier+Inbox@gnu.org> (raw)
In-Reply-To: <CAFyQvY3xTa-pu95e=kT03_uJoeQ9HSpp=R0wfHMAoi6QVpQ=Hw@mail.gmail.com> (Kaushal Modi's message of "Wed, 04 May 2016 03:33:45 +0000")
> For instance, we cannot do (add-to-list 'package-archives '("org" . "
> http://orgmode.org/elpa/") t) before doing (require 'package). Well, this
> is a valid case where we need to do require first as package-archives does
> not autoload package.
I'm not saying there aren't valid cases.
I'm saying that when it's needed, we should treat it as a bug.
IOW I consider this specific case as a shortcoming of package.el.
Kind of like advice: if you need to use it, it's usually an indication
that the package lacks some customization hooks.
> I am not qualified enough to judge if yasnippet could have been coded
> better so that I didn't need to lazy load it. But delaying loading this
yasnippet.el could probably easily be split into two files so only
a "smallish" file is loaded when you activate yasnippet, and the second
larger one is loaded only once you do trigger a snippet-expansion.
> package made a significant difference to my emacs startup, especially
> because I save and load desktop with about 50-60 files open. I do not need
> yasnippet to load the snippets for all the major modes in those 50-60 files
> immediately at startup.
desktop.el is indeed a source of significant slowdown "by nature".
It's be worthwhile to try and improve desktop.el so that it can do the
loading more lazily.
E.g. we could add some kind of "virtual buffer" functionality, such that
list-buffers displays the buffer and C-x b lets you select it, even
though the buffer doesn't really exist yet, and only once you really
select it is the buffer created.
> (Also, it's easy to simply prevent loading of a package you suspect to be
> misbehaving by adding :disabled keyword for that package's use-package
> form. With that you prevent loading that package and also evaluating your
> config for that package like keybindings, advices, overrides, wrapper
> defuns, etc).
Yes, use-package helps you structure your config, indeed, and that's good.
> I don't understand why that is important.
Because as it stands, use-package encourages users to work around
packages's shortcomings rather than to report those. It encourages the
perception that it's the user's responsability to setup autoloads and to
avoid all kinds of pitfalls.
Stefan
next prev parent reply other threads:[~2016-05-04 12:09 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-02 17:07 use-package Uwe Brauer
2016-05-02 18:47 ` use-package Kaushal Modi
2016-05-03 10:47 ` use-package Uwe Brauer
2016-05-03 14:01 ` use-package Kaushal Modi
2016-05-03 22:28 ` use-package Stefan Monnier
2016-05-04 3:33 ` use-package Kaushal Modi
2016-05-04 12:09 ` Stefan Monnier [this message]
2016-05-04 16:22 ` use-package Phillip Lord
2016-05-04 16:44 ` use-package Drew Adams
2016-05-05 13:34 ` use-package Phillip Lord
2016-05-05 14:00 ` use-package Drew Adams
2016-05-05 15:56 ` use-package Kaushal Modi
2016-05-05 16:12 ` use-package Drew Adams
2016-05-10 9:20 ` use-package Phillip Lord
2016-05-10 9:18 ` use-package Phillip Lord
2016-05-11 11:42 ` use-package Kaushal Modi
2016-05-12 21:04 ` use-package Phillip Lord
2016-05-13 11:56 ` use-package Stefan Monnier
2016-05-14 22:27 ` use-package Phillip Lord
2016-05-15 3:22 ` use-package Stefan Monnier
2016-05-13 15:38 ` use-package Drew Adams
2016-05-16 15:16 ` use-package Phillip Lord
2016-05-16 16:49 ` use-package Drew Adams
[not found] ` <mailman.2761.1463153947.7477.help-gnu-emacs@gnu.org>
2016-05-14 7:37 ` use-package Rusi
2016-05-10 9:13 ` use-package Phillip Lord
2016-05-05 9:51 ` use-package Uwe Brauer
2016-05-05 13:38 ` use-package Phillip Lord
2016-05-03 22:21 ` use-package Stefan Monnier
2016-05-05 10:15 ` use-package Uwe Brauer
2016-05-05 23:41 ` use-package Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvk2jadol3.fsf-monnier+Inbox@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=help-gnu-emacs@gnu.org \
--cc=kaushal.modi@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).