auctex
[Top][All Lists]
Advanced

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

Re: [AUCTeX] Package doesn't recognize my Fink teTeX installation


From: David Kastrup
Subject: Re: [AUCTeX] Package doesn't recognize my Fink teTeX installation
Date: Mon, 09 May 2005 09:09:09 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Chad Groft <address@hidden> writes:

> Hi!  I hope someone on this list can help me get AUCTeX and
> preview-latex working.

It does not sound like you have a problem with them, but rather with
Fink.

> Instead, I've installed the Carbon version of Emacs, which functions
> as a standalone Mac application.

There are quite a few compilations of Emacs available.  One that might
be worth looking at is yaced <URL:http://yaced.sourceforge.net>

> I've also installed AUCTeX manually, to work with this version of
> Emacs -- and it does, except that it doesn't find my teTeX
> installation.  (For the record, I installed all of these just
> yesterday, including the CVS version of Emacs, so they should be up
> to date.)
>
> The general problem is that Fink installs its packages into a
> separate directory /sw/bin, which is not included in the usual
> $PATH.  Fink's setup includes creating a file called ".profile" in
> my home directory which adds /sw/bin (among others) to $PATH when I
> work in Terminal.  Emacs, though, doesn't look at this file at all,
> and thus doesn't normally see the outside utilities.

That is not how things are supposed to work.  .profile is to be called
by your _login_ shell, and the whole desktop is supposed to inherit
its settings, including any Emacs you happen to call.

> In the case of ispell, I was able to fix this by modifying the exec-
> path variable through the customize utility.

Which is a spectacularly bad idea since it will stop any changes to
PATH before calling Emacs to have an effect.

> teTeX is a bit different; emacs tries to invoke these programs by
> starting a shell, one which looks at .bashrc instead of .profile.  I
> simply made .bashrc a hard link to .profile, which fixed the problem
> -- *if* I don't load AUCTeX.  If I do, I get an error of the form
> "LaTeX exited abnormally with code 127" etc., which it seems means
> that LaTeX never actually started.
>
> AUCTeX, it appears, also starts a shell to invoke the teTeX
> programs, but it starts one with the command-line option -c -- which
> causes the shell to ignore .bashrc and all other startup scripts,
> and thus makes it difficult to get the $PATH right.

Which is the correct way to call programs.  You don't get .bashrc
loaded for an exec call, either.

> It seemed that the best bet was to hack AUCTeX to somehow invoke
> .bashrc or .profile before running latex or so forth, but I don't
> see how.  I tried changing the string in the definition of TeX-shell
> from "/bin/sh" to "/bin/bash", and I tried changing the string in
> TeX-shell-command-options from "-c" to ""; neither of these worked.

You need to get your Emacs called with a sane environment instead of
trying to patch it up afterwards.  Everything else is going to cause
headaches and continuing trouble.

I recommend you ask on a Fink-related group about how to achieve that.

> Has anyone been able to get this method to work?  Does someone
> possibly have a more elegant method?  And does anyone know of
> additional issues with preview-latex (just in case)?

Well, some TeX installation issues have been skirted in newer CVS
versions, and there has not been a release yet (expected probably some
time this week).  yaced includes them already.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum




reply via email to

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