Jan-Ake Larsson
2005-02-10 22:31:54 UTC
Peter Dyballa wrote:
> Today I spent some time with installing preview-latex in
> /Library/Application Support/Emacs and I found that already during make
> an error occurs:
>
> /sw/bin/emacs -batch -q -no-site-file -no-init-file --eval (setq
> load-path (cons "." load-path)) -eval (let ((dir (pop
> command-line-args-left))) (if (not (string-equal dir "")) (push dir
> load-path))) /Library/Application Support/Emacs -f batch-byte-compile
> preview.el
>
> In toplevel form:
> preview.el:57:11:Error: Cannot open load file: tex-buf
> make: *** [prv-emacs.elc] Error 1
You would get this if a vanilla Emacs can load tex-site.el but
tex-site does not contain the correct load-path to tex-buf.el(c).
tex-site sets the load-path, so this is a symptom that there is
something wrong with your AUCTeX installation.
> tex-buf.el is in
>
> pete 51 /\ ls -l /Library/Application\ Support/Emacs/auctex/tex-buf*
> -rw-r--r-- 1 pete admin 69293 23 Dez 00:16 /Library/Application
> Support/Emacs/auctex/tex-buf.el
> -rw-r--r-- 1 pete admin 58774 23 Dez 00:16 /Library/Application
> Support/Emacs/auctex/tex-buf.elc
>
> Reason might be that Makefile has as line #25:
>
> auctexdir = /Library/Application\ Support/Emacs#
>
> which is definitely wrong!
No, it is correct. tex-site.el is in that directory, is it not? The
auctexdir variable is used to give the load-path to tex-site.el for an
Emacs which is not loading any site or user init files. That is, so
that tex-site.el can be found, even with -no-site-file -no-init-file.
And it works! tex-site.el is loaded first during the compilation, and
it is found since the warning is not for tex-site.el.
But the next file to be loaded is tex-buf.el and this file is not
found, even though the load-path to that file (and all other AUCTeX
files) is set in tex-site.el. There is definetly something wrong with
the value of TeX-lisp-directory in there.
> I invoked configure in any of these two:
>
> ./configure --with-emacs=/sw/bin/emacs
> --with-lispdir=/Library/Application Support/Emacs
> ./configure --with-emacs=/sw/bin/emacs
> --with-lispdir=/Library/Application Support/Emacs
> --with-tex-site=/Library/Application Support/Emacs
You did something to it to keep the spaces, I think. A backslash or
perhaps quotes?
> tex-site.el right now can't give a correct answer because it has
> learned:
>
> (defvar TeX-lisp-directory "/Library/Application\ Support/Emacs/auctex"
> "*The directory where the AUCTeX lisp files are located.")
>
> which is later re-used as:
>
> (add-to-list 'load-path TeX-lisp-directory)
>
> Erroneously. "/Library/Application Support/Emacs/auctex" becomes
> "/Library/ApplicationSupport/Emacs/auctex" and so AUCTeX installation
> can't be found.
A-ha! There is too much shell-escaping here.
<technical mumbo-jumbo>
ISTR writing code in aclocal.m4 with _two_ variables, one to be
shell-escaped and one to be used in the lisp code. This code seems to
have gone. Either I never checked it in (but I doubt that) or
something else has happened. Perhaps this business of sync'ing AUCTeX
and prewiew-latex aclocal.m4. It is too late now (I need some sleep to
fend off this cold I got from my kids), I'll have a look some other
time.
</technical mumbo-jumbo>
> Can it be that the INSTALL file has an incorrect
> description?
No.
> Because when I configure
>
> ./configure --with-emacs=/sw/bin/emacs
> --with-lispdir=/Library/Application Support/Emacs
> --with-tex-site=/Library/Application Support/Emacs/auctex
>
> line #25 of Makefile now has:
>
> auctexdir = /Library/Application\ Support/Emacs/auctex#
>
> Which does not help either because
>
> /sw/bin/emacs -batch -q -no-site-file -no-init-file --eval (setq
> load-path (cons "." load-path)) -eval (let ((dir (pop
> command-line-args-left))) (if (not (string-equal dir "")) (push dir
> load-path))) /Library/Application Support/Emacs/auctex -f
> batch-byte-compile preview.el
>
> In toplevel form:
> preview.el:57:11:Error: Cannot open load file: tex-site
> make: *** [preview.elc] Error 1
Now you'll get the warning about tex-site not being found, as I expected.
See above.
> Maybe configure itself needs an update near line# 1737. And/Or
> Makefile/Makefile.in.
Not really. aclocal.m4 does, and tex-site.el.in (in AUCTeX). Not
configure.ac, though. Note that configure is a generated file.
> Letting GNU Emacs do its batch runs without '-no-site-file' (on ELCC)
> makes everything right.
Sure. Probably you have some customization in the site init file that
allows AUCTeX to run. Do you manually add something to load-path?
This is an AUCTeX bug report, really, no fault of preview-latex.
Cc'ing the auctex list. I'll fix it, but not today.
/JÅ
> Today I spent some time with installing preview-latex in
> /Library/Application Support/Emacs and I found that already during make
> an error occurs:
>
> /sw/bin/emacs -batch -q -no-site-file -no-init-file --eval (setq
> load-path (cons "." load-path)) -eval (let ((dir (pop
> command-line-args-left))) (if (not (string-equal dir "")) (push dir
> load-path))) /Library/Application Support/Emacs -f batch-byte-compile
> preview.el
>
> In toplevel form:
> preview.el:57:11:Error: Cannot open load file: tex-buf
> make: *** [prv-emacs.elc] Error 1
You would get this if a vanilla Emacs can load tex-site.el but
tex-site does not contain the correct load-path to tex-buf.el(c).
tex-site sets the load-path, so this is a symptom that there is
something wrong with your AUCTeX installation.
> tex-buf.el is in
>
> pete 51 /\ ls -l /Library/Application\ Support/Emacs/auctex/tex-buf*
> -rw-r--r-- 1 pete admin 69293 23 Dez 00:16 /Library/Application
> Support/Emacs/auctex/tex-buf.el
> -rw-r--r-- 1 pete admin 58774 23 Dez 00:16 /Library/Application
> Support/Emacs/auctex/tex-buf.elc
>
> Reason might be that Makefile has as line #25:
>
> auctexdir = /Library/Application\ Support/Emacs#
>
> which is definitely wrong!
No, it is correct. tex-site.el is in that directory, is it not? The
auctexdir variable is used to give the load-path to tex-site.el for an
Emacs which is not loading any site or user init files. That is, so
that tex-site.el can be found, even with -no-site-file -no-init-file.
And it works! tex-site.el is loaded first during the compilation, and
it is found since the warning is not for tex-site.el.
But the next file to be loaded is tex-buf.el and this file is not
found, even though the load-path to that file (and all other AUCTeX
files) is set in tex-site.el. There is definetly something wrong with
the value of TeX-lisp-directory in there.
> I invoked configure in any of these two:
>
> ./configure --with-emacs=/sw/bin/emacs
> --with-lispdir=/Library/Application Support/Emacs
> ./configure --with-emacs=/sw/bin/emacs
> --with-lispdir=/Library/Application Support/Emacs
> --with-tex-site=/Library/Application Support/Emacs
You did something to it to keep the spaces, I think. A backslash or
perhaps quotes?
> tex-site.el right now can't give a correct answer because it has
> learned:
>
> (defvar TeX-lisp-directory "/Library/Application\ Support/Emacs/auctex"
> "*The directory where the AUCTeX lisp files are located.")
>
> which is later re-used as:
>
> (add-to-list 'load-path TeX-lisp-directory)
>
> Erroneously. "/Library/Application Support/Emacs/auctex" becomes
> "/Library/ApplicationSupport/Emacs/auctex" and so AUCTeX installation
> can't be found.
A-ha! There is too much shell-escaping here.
<technical mumbo-jumbo>
ISTR writing code in aclocal.m4 with _two_ variables, one to be
shell-escaped and one to be used in the lisp code. This code seems to
have gone. Either I never checked it in (but I doubt that) or
something else has happened. Perhaps this business of sync'ing AUCTeX
and prewiew-latex aclocal.m4. It is too late now (I need some sleep to
fend off this cold I got from my kids), I'll have a look some other
time.
</technical mumbo-jumbo>
> Can it be that the INSTALL file has an incorrect
> description?
No.
> Because when I configure
>
> ./configure --with-emacs=/sw/bin/emacs
> --with-lispdir=/Library/Application Support/Emacs
> --with-tex-site=/Library/Application Support/Emacs/auctex
>
> line #25 of Makefile now has:
>
> auctexdir = /Library/Application\ Support/Emacs/auctex#
>
> Which does not help either because
>
> /sw/bin/emacs -batch -q -no-site-file -no-init-file --eval (setq
> load-path (cons "." load-path)) -eval (let ((dir (pop
> command-line-args-left))) (if (not (string-equal dir "")) (push dir
> load-path))) /Library/Application Support/Emacs/auctex -f
> batch-byte-compile preview.el
>
> In toplevel form:
> preview.el:57:11:Error: Cannot open load file: tex-site
> make: *** [preview.elc] Error 1
Now you'll get the warning about tex-site not being found, as I expected.
See above.
> Maybe configure itself needs an update near line# 1737. And/Or
> Makefile/Makefile.in.
Not really. aclocal.m4 does, and tex-site.el.in (in AUCTeX). Not
configure.ac, though. Note that configure is a generated file.
> Letting GNU Emacs do its batch runs without '-no-site-file' (on ELCC)
> makes everything right.
Sure. Probably you have some customization in the site init file that
allows AUCTeX to run. Do you manually add something to load-path?
This is an AUCTeX bug report, really, no fault of preview-latex.
Cc'ing the auctex list. I'll fix it, but not today.
/JÅ