[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#19517: [SOLVED-sort of] recursive requires with recent auctex versio
From: |
Bernard Hurley |
Subject: |
bug#19517: [SOLVED-sort of] recursive requires with recent auctex versions. |
Date: |
Wed, 7 Jan 2015 11:40:06 +0000 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Hi Mosè,
On Tue, Jan 06, 2015 at 03:37:18PM +0100, Mosè Giordano wrote:
> Hi Bernard,
>
> 2015-01-05 18:28 GMT+01:00 Bernard Hurley <address@hidden>:
> > Hi All,
> >
> I cannot understand your problem. Have you installed AUCTeX using
> ELPA
Indeed I have so there shouldn't be any problems and there are no problems with
any of the other packages I have installed using ELPA. However ELPA IS NOT
INITIALISING AUCTeX CORRECTLY.
The result is that if I try using it normally (i.e. without my extra code -
including loading "auctex" and "auctex-autoloads", which I agree should not be
necessary), then I get "recursive require" errors whenever I try to use the
package.
I can see that there must be something wrong with the way the package is being
initialised by running emacs --debug-init with the "normal" set up. It goes
into the debugger when package-initialize gets called giving the stack trace I
appended to the previous email.
The last few lines of the trace are:
=== snip ===
package-activate(auctex)
package-initialize()
command-line()
normal-top-level()
=== snip ===
from which it is clear the the debugger is being entered while AUCTeX is being
initialised.
This could be a bug in ELPA but it seems unlikely as it doesn't affect any of
the other packages I have installed, and I have a lot of them.
It could be that AUCTeX is never initialised properly but that this only
becomes apparent when it is used in certain ways. But I know for a fact that
several other people have had exactly the same problem. The only way I can get
AUCTeX to work is:
1. STOP ELPA initializing it.
2. Wait for package-inialize to be called and load it myself.
The line:
(setf package-load-list '((auctex nil) all))
achieves (1).
To achieve (2) is more difficult since it has to be done AFTER
package-initialize has been called. This is why the code to do it is in a
function, auctex kludge, that is added to after-init-hook.
As to the code in "auctex-kludge" there are a couple of issues:
3. Since AUCTeX has not been initialise it is not in the load-path.
4. The code needs to be version independent.
The line:
(let ((auctex-info (assoc 'auctex package-alist)))
puts finds the information about the package in the ELPA repository into the
local variable auctex-info so that auctex can be initialised in a version
independent way, achieving 4.
Then I put the package in the load path with:
(add-to-list 'load-path (aref (cadr auctex-info) 7))
Finally I initialise AUCTeX myself.
> and you have a line like
> (load "auctex")
> in you init file? If so, just remove that line, there is no need to
> manually load packages installed with the builtin package manager
> (unless you requested otherwise).
There SHOULD BE no need to load the package manually, but ELPA is not doing it
properly and so I have no choice.
Regards,
Bernard.