bug-auctex
[Top][All Lists]
Advanced

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

bug#20320: 11.88.3; AUCTeX, ESS, Noweb, and "Error running timer `font-l


From: Tassilo Horn
Subject: bug#20320: 11.88.3; AUCTeX, ESS, Noweb, and "Error running timer `font-latex-jit-lock-force-redisplay': (wrong-number-of-arguments (2 . 2) 3)" SOLVED
Date: Tue, 14 Apr 2015 16:35:54 +0200
User-agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux)

"Bourgoin, Mario" <address@hidden> writes:

> A small follow-up. The shadowing seems tied to my running
> "package-initialize" in my .emacs as recommended by the MELPA site:
>
>   http://melpa.org/#/getting-started
>
> A MELPA collaborator thought it possible that the AUCTeX package
> initializer does something funky when called by "package-initialize".
> Indeed, when I ran a freshly installed Emacs with all my local
> configuration deleted and AUCTeX 11.88 installed, this appeared to
> show that running "package-initialize" in my .emacs resulted in the
> built-in AUCTeX's path being moved ahead of the AUCTeX 11.88 on the
> load-path.

Indeed, the auctex initializer of the elpa package uses some hack which
I actually don't understand.

--8<---------------cut here---------------start------------->8---
;; This can be used for starting up AUCTeX.  The following somewhat
;; strange trick causes tex-site.el to be loaded in a way that can be
;; safely undone using (unload-feature 'tex-site).

;;; Code:

(autoload 'TeX-load-hack
  (expand-file-name "tex-site.el"
                    (file-name-directory load-file-name)))
(TeX-load-hack)
--8<---------------cut here---------------end--------------->8---

`TeX-load-hack' is an alias to `ignore' defined in tex-site.el.  That
file sets all relevant paths when being loaded.

`autoload's documentation says that if the function to be autoloaded is
already defined other than as an autoload, `autoload' does nothing.  So
if the built-in AUCTeX was already loaded when `package-initialize' is
called, then the ELPA version wouldn't be activated.

I'm not sure if I should consider that right or wrong but I don't think
that explains your issue where you have both paths of the built-in
auctex and the ELPA auctex in `load-path' where the former comes before
the latter and thus shadows it.  Instead, the ELPA auctex wouldn't be on
the load-path at all.

I also don't get why it makes a difference if `package-initialize' is
called from your ~/.emacs or not.  If it's not, then it'll be called
immediately after loading of ~/.emacs.  So if you tested with all
configs deleted (empty or no ~/.emacs), then this shouldn't make any
difference at all.

What you could do is adding to the beginning of the ELPA AUCTeX
tex-site.el file

    (message "Loading tex-site.el (ELPA)")
    (debug)

and to the tex-site.el of the built-in AUCTeX

    (message "Loading tex-site.el (Built-in)")
    (debug)

and byte-compile the files again (M-x byte-compile-file).

Then start you emacs once with an ~/.emacs containing
(package-initialize) and once with an ~/.emacs not containing it.

During each run, you should be put into the debugger twice.  Please save
the backtraces and remember which backtrace came from loading the ELPA
auctex or the built-in auctex.  This should reveal which code loads
which version of auctex.

Bye,
Tassilo





reply via email to

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