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

2016-07-27 Thread Stefan Monnier
> I was disabling some of the automatic setup. My original purpose of this
> was to try to reduce my emacs startup time.

In an ideal ELPA world, startup is fast because the automatic setup is
cheap (just a few autoloads and such).  So if the automatic setup is too
slow, that can be for one of two reasons:
- some package(s)'s setup is too expensive.  You should then disable the
  offending package's startup (by setting package-load-list), and report
  the problem to the package's author.
- each package's setup is fast but the overall setup ends up still
  too slow.  Then please M-x report-emacs-bug complaining that ELPA's
  automatic setup time is too expensive and needs to be re-designed.

>> Auto-installing a list of packages seems mostly unrelated to whether
>> (and how) you configure them, tho.
> It does seem that way, but it is convenient (and I'm probably not the one
> to argue on behalf of use-package).

Similarly, I don't see why use of use-package would imply that you
disable the automatic setup done by ELPA.  use-package should
complement it, not replace it.

> I decided to go to extra length to not run (package-initialize) because it
> was significantly slowing my emacs start time and running
> (package-initialize t) made it start faster.

I would appreciate if you could investigate the actual source of slow
down, because it's something that shouldn't happen,


Stefan

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


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

2016-07-27 Thread Caleb Rottman
> I must say that I find it far from obvious that it's unwieldy.

I guess 30 packages isn't necessarily unwieldy. I'll rephrase - I have had
many times where I start on a new machine with a newly installed emacs, and
I would like for all 30 packages to be installed automatically (instead of
manually) when they are missing (i keep my .emacs in a git repository).
Furthermore, with 30 packages, I would like all these packages to only load
when necessary, so it doesn't take several seconds to start emacs. The
macro "use-package" solves both these problems for me, but it fails when
trying to auto-install and use AUCTeX. (FWIW, it looks like there is a
workaround that people use specifically for AUCTeX by "requiring" tex-site).

> By that do you mean that you first go through the trouble of disabling
> the normal automatic setup done by ELPA packages, and then setup
> use-package for each and every one of those packages, partly redoing by
> hand what the ELPA package's normal setup would have done for you?

I was disabling some of the automatic setup. My original purpose of this
was to try to reduce my emacs startup time.

> Auto-installing a list of packages seems mostly unrelated to whether
> (and how) you configure them, tho.

It does seem that way, but it is convenient (and I'm probably not the one
to argue on behalf of use-package).

> Sounds like a problem with use-package.

I'm not really determining if the blame lies with AUCTeX and/or
use-package. What I am saying is that use-package is pretty popular and it
works seamlessly with my other packages but does not seem to work as
seamlessly with AUCTeX. It could be there's no requirement that a feature
is named the same as the package, it just seems the majority do (at least
in my experience, which is much more limited than the rest of you)

But I agree, if there were a warning when AUCTeX is loaded the wrong way,
that would be a big help.

Thanks for your comments.

Caleb

P. S.

I decided to go to extra length to not run (package-initialize) because it
was significantly slowing my emacs start time and running
(package-initialize t) made it start faster.

On Wed, Jul 27, 2016 at 1:54 PM, Stefan Monnier 
wrote:

> > I have around 30 packages that I install through ELPA.  Since this is
> pretty
> > unwieldy,
>
> I must say that I find it far from obvious that it's unwieldy.
>
> > I have these all configured using the "use-package" macro,
>
> By that do you mean that you first go through the trouble of disabling
> the normal automatic setup done by ELPA packages, and then setup
> use-package for each and every one of those packages, partly redoing by
> hand what the ELPA package's normal setup would have done for you?
>
> > which will automatically download missing packages and `require' them
> > as necessary.  This makes installations on new machines really simple.
>
> Auto-installing a list of packages seems mostly unrelated to whether
> (and how) you configure them, tho.
>
> > However, since AUCTeX doesn't have any (require 'auctex) line,
> use-package
> > will fail and AUCTeX won't install.
>
> Sounds like a problem with use-package.
>
> > Now that I know that AUCTeX will work when you just install it, it is
> > indeed not too hard to get AUCTeX working.
>
> FWIW, this should be the case for *all* ELPA packages.
>
>
> Stefan
>
___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


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

2016-07-27 Thread Stefan Monnier
> Another problem seems to be that installing AUCTeX from ELPA via use-package
> does not work because that forcefully does (require ') under the
> hoods.

Actually (require 'auctex) does work with the ELPA package *if*
package-initialize was run before (and without a non-nil argument).
Calling package-initialize early on in your ~/.emacs is what should
ideally happen, but IIRC in the OP's case he went to extra length to
disable the normal setup of ELPA packages by calling package-initialize
with a non-nil arg.

> But in any case, it would be good if there would be a big fat warning or
> even error when a user loads auctex manually although it's an ELPA
> install. And obviously I'd prefer if the relevant code was not specific to
> the ELPA branch but was shared between that and master.

Makes sense.

I can't remember enough of how the non-ELPA code works, so feel free to
send me some suggested code or to adjust the code I sent or something.


Stefan

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


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

2016-07-27 Thread Stefan Monnier
> I have around 30 packages that I install through ELPA.  Since this is pretty
> unwieldy,

I must say that I find it far from obvious that it's unwieldy.

> I have these all configured using the "use-package" macro,

By that do you mean that you first go through the trouble of disabling
the normal automatic setup done by ELPA packages, and then setup
use-package for each and every one of those packages, partly redoing by
hand what the ELPA package's normal setup would have done for you?

> which will automatically download missing packages and `require' them
> as necessary.  This makes installations on new machines really simple.

Auto-installing a list of packages seems mostly unrelated to whether
(and how) you configure them, tho.

> However, since AUCTeX doesn't have any (require 'auctex) line, use-package
> will fail and AUCTeX won't install.

Sounds like a problem with use-package.

> Now that I know that AUCTeX will work when you just install it, it is
> indeed not too hard to get AUCTeX working.

FWIW, this should be the case for *all* ELPA packages.


Stefan

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


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

2016-07-27 Thread Mosè Giordano
Hi Tassilo,

2016-07-27 18:59 GMT+02:00 Tassilo Horn :
> Another problem seems to be that installing AUCTeX from ELPA via use-package
> does not work because that forcefully does (require ') under the
> hoods. If that is true, then I'd consider it a bug in use-package. I don't
> think there is a requirement that a package has a feature named exactly as
> the package.

Exactly in this regard, use-package's documentation mention a feature
to load a feature with a different name from the package and uses
AUCTeX as an example.  And since AUCTeX never used a `require' to work
(this is actually harmful sometimes), I expected that use-package has
been tested for AUCTeX as well.

> But in any case, it would be good if there would be a big fat warning or
> even error when a user loads auctex manually although it's an ELPA install.
> And obviously I'd prefer if the relevant code was not specific to the ELPA
> branch but was shared between that and master.

Agreed.

Thanks for your comments!

So, Stefan, how we could catch if someone is loading AUCTeX in the "wrong" way?

Bye,
Mosè

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


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

2016-07-27 Thread Tassilo Horn

Hi guys,

currently I have no internet connection at home except for my mobile, but 
I've read the bug thread now. I'm not exactly sure what's the exact 
problem. So please excuse my questions.


One problem seems to be that you cannot preload AUCTeX. Right? OK, here I'd 
say that it is intentional. And loading auctex with a classic non-ELPA 
install will also not preload it but just configure the autoloads 
correctly. (I hope I'm right with that. I haven't checked.)


Another problem seems to be that installing AUCTeX from ELPA via 
use-package does not work because that forcefully does (require ') 
under the hoods. If that is true, then I'd consider it a bug in 
use-package. I don't think there is a requirement that a package has a 
feature named exactly as the package.


But in any case, it would be good if there would be a big fat warning or 
even error when a user loads auctex manually although it's an ELPA install. 
And obviously I'd prefer if the relevant code was not specific to the ELPA 
branch but was shared between that and master.


If I got anything wrong, sorry, please clarify.

Bye,
Tassilo


Am 27. Juli 2016 18:26:39 schrieb Mosè Giordano :


Hi Caleb,

2016-07-27 17:51 GMT+02:00 Caleb Rottman :

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è





___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


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

2016-07-27 Thread Caleb Rottman
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  wrote:

> Hi Caleb,
>
> 2016-07-27 17:51 GMT+02:00 Caleb Rottman :
> > 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è
>
___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


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

2016-07-27 Thread Caleb Rottman
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.

Whatever you decided to do, thanks for all your work on this.

Caleb


On Wed, Jul 27, 2016 at 5:34 AM, Mosè Giordano  wrote:

> Hi Stefan,
>
> 2016-07-27 5:14 GMT+02:00 Stefan Monnier :
> > The intent is not to make the installation easier.
> > It's to make it compatible with the old (require 'tex-site) method.
> > But as mentioned, maybe rather than make (require 'tex-site) work, it
> > might be preferable to emit a warning explaining that it's better to
> > just do nothing and let package-initialize do its job.
>
> Ok, I see.  Then I'd personally prefer to go by this route (do not use
> `require' at all), but Tassilo is the main maintainer of AUCTeX on
> ELPA.  Tassilo, what's your opinion on this?
>
> Bye,
> Mosè
>
___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


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

2016-07-27 Thread Mosè Giordano
Hi Caleb,

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

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel


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

2016-07-27 Thread Mosè Giordano
Hi Stefan,

2016-07-27 5:14 GMT+02:00 Stefan Monnier :
> The intent is not to make the installation easier.
> It's to make it compatible with the old (require 'tex-site) method.
> But as mentioned, maybe rather than make (require 'tex-site) work, it
> might be preferable to emit a warning explaining that it's better to
> just do nothing and let package-initialize do its job.

Ok, I see.  Then I'd personally prefer to go by this route (do not use
`require' at all), but Tassilo is the main maintainer of AUCTeX on
ELPA.  Tassilo, what's your opinion on this?

Bye,
Mosè

___
auctex-devel mailing list
auctex-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-devel