Subject: bug#24070: LaTeX mode doesn't load in 11.89.4

From: Mosè Giordano <[email-masked]>
Date: Wed, 27 Jul 2016 18:25:44 +0200

Hi Caleb,

2016-07-27 17:51 GMT+02:00 Caleb Rottman <[email-masked]>:
> 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è