Subject: Re: bug#24866: AucTeX not working on Emacs 25.1.1 for Mac

From: Lars Eriksson <[email-masked]>
Date: Sun, 20 Nov 2016 19:01:37 +0100

Hi,

I have now uninstalled it and installed the ELPA version and it worked out of the box…

I have some colleagues that also had troubles installing auctex on a Mac this summer (I was not involved in the installation but the installation script that pulls it from git and places in site-lisp comes from the same source) so I cannot say that he had the same problem.

This is just for my curiosity and education. The answer is probably out there but I am not sufficiently knowledgeable about ELPA to find the answer… No need to answer if you don’t have time...
How does emacs generate the search path to ELPA? Is the search path ~/emacs.d/elpa/ hardcoded into Emacs? I have not added anything to my .emacs but it finds auctex without my intervention…

My load path now has the following entries: "/Users/larer/.emacs.d/elpa/auctex-11.89.6/" "/Users/larer/.emacs.d/elpa/auctex-11.89.6” as a followup should there be two, one with trailing slash and one without?

Thanks for your efforts! They are really appreciated

Best,
Lars

> On 20 Nov 2016, at 16:19, Tassilo Horn <[email-masked]> wrote:
> 
> Mosè Giordano <[email-masked]> writes:
> 
> Hi Lars & Mosè,
> 
>>> have now run a git bisect (for the first time in my life)
> 
> I guess it won't be the last time. ;-)
> 
>>> and received the following, results.  I have not analyzed what the
>>> difference is between the versions but it its clear that it touches
>>> the preview… I do not know why it causes the error on Mac...
>>> 
>>> ~/Src/auctex $ git bisect good
>>> 3fdeb4b8de31702d4c58b063cd9536284bb27ff7 is the first bad commit
>>> commit 3fdeb4b8de31702d4c58b063cd9536284bb27ff7
>>> Author: Tassilo Horn <[email-masked]>
>>> Date:   Fri Aug 7 17:54:58 2015 +0200
>>> 
>>>    Setup preview differently; fixes bug#21188
>>> 
>>>    * latex.el (TeX-latex-mode): Call `LaTeX-preview-setup'
>>>    unconditionally instead of calling it from `LaTeX-mode-hook' which
>>>    breaks things if that hook is customized (bug#21188).
>>> 
>>>    * preview.el.in: Don't add `LaTeX-preview-setup' to
>>>    `LaTeX-mode-hook'.
>> 
>> This was easy to guess, since it's the commit which introduced the
>> function call, but a confirmation is useful anyway.
>> 
>> @Tassilo, could you please have a look at this?  I'm a bit confused by
>> this problem, I can't see what's the culprit and why should be
>> operating system-dependent :-/
> 
> Me neither, and I guess we would have been made aware of such a breakage
> if it would happen for all MacOS X users.  But I think there's something
> different gone wonky here.  Lars' backtrace reads
> 
> --8<---------------cut here---------------start------------->8---
> Debugger entered--Lisp error: (void-variable LaTeX-preview-setup)
>  byte-code("\303\300\304\"\210\305\306!\203\306\307	C#\210\310\311\312\"\210\310\311\313\"\210\305\314!\203'\314\n\315\"\210\304\207" [latex-mode-abbrev-table text-mode-abbrev-table LaTeX-preview-setup define-abbrev-table nil fboundp abbrev-table-put :parents add-to-list auto-mode-alist ("\\.drv\\'" . latex-mode) ("\\.hva\\'" . latex-mode) declare-function "preview"] 4)
>  TeX-latex-mode()
>  apply(TeX-latex-mode nil)
>  latex-mode()
>  ...
> --8<---------------cut here---------------end--------------->8---
> 
> Note that it says `void-variable' and not `void-function' as it would
> say when you try to eval (this-function-does-not-exist).
> 
> Hm, Lars, can you uninstall AUCTeX completely and try the ELPA version?
> I.e., just install it using
> 
>  M-x package-install RET auctex RET
> 
> Bye,
> Tassilo