auctex-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [AUCTeX-devel] bug#24070: LaTeX mode doesn't load in 11.89.4


From: Caleb Rottman
Subject: Re: [AUCTeX-devel] bug#24070: LaTeX mode doesn't load in 11.89.4
Date: Wed, 27 Jul 2016 10:34:37 -0600

I completely understand the problem of slow a slow emacs startup - that's actually why i started using use-package.
So behind the scenes, use-package creates all these autoloads to speed up startup.

On Wed, Jul 27, 2016 at 10:25 AM, Mosè Giordano <address@hidden> wrote:
Hi Caleb,

2016-07-27 17:51 GMT+02:00 Caleb Rottman <address@hidden>:
> Here are my two cents as a somewhat average emacs user (then I'll butt out
> and let you all decide what you want to do).
>
> I have around 30 packages that I install through ELPA. Since this is pretty
> unwieldy, I have these all configured using the "use-package" macro, which
> will automatically download missing packages and `require' them as
> necessary. This makes installations on new machines really simple.
>
> However, since AUCTeX doesn't have any (require 'auctex) line, use-package
> will fail and AUCTeX won't install. That means that out of the 30 packages I
> have, I am required to install AUCTeX manually. Now that I know that AUCTeX
> will work when you just install it, it is indeed not too hard to get AUCTeX
> working. However, my main hangup in this whole issue is that I expected
> AUCTeX to work like all the other packages I use.
>
> So it's not that AUCTeX is hard to install per se, it's just that it's
> different than all the other 30 packages that I use. This, in my experience,
> has always made AUCTeX confusing to me in the past.

Thanks for sharing your experience.  I understand your position, but the
"problem" with the use of `require' is that loading in this way many packages
sensibly slows down startup of Emacs.  Ok, one should never close at all Emacs,
but sometimes happens :-)

Instead, a smarter approach to load packages is to call them when they're
needed, for this purpose one can use `autoload' combined with `eval-after-load`
(or the recent `with-eval-after-load').  I don't have use-package, I wrote my
init file by myself, and I have few packages that are actually `require'd, the
others are autloaded.  I find this way very effective, because not of all
packages I set up in my init file are actually used in all Emacs sessions I fire
up.  Maybe use-package allows you to do something similar for other packages.

Bye,
Mosè


reply via email to

[Prev in Thread] Current Thread [Next in Thread]