[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [AUCTeX] auctex cannot find kpsewhich
From: |
David Kastrup |
Subject: |
Re: [AUCTeX] auctex cannot find kpsewhich |
Date: |
Sun, 03 Jun 2012 10:07:58 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) |
Laurent Hoeltgen <address@hidden> writes:
> Hi all,
>
> I have a small (probably trivial) question. I'm running lubuntu 11.10
> with emacs 23.3.1. and auctex installed from the ubuntu repos.
> However, I installed TeX by hand (e.g. from
> http://www.tug.org/texlive/ and not from the ubuntu repos). Now when I
> want to enter the macro "\usepackage" through "C-c Return" I get the
> following message:
>
> Searching for program: no such file or directory, kpsewhich
>
> I assume that auctex is looking at the wrong place for kpsewhich.
> kpsewhich is installed here:
> /usr/local/texlive/2011/bin/i386-linux/kpsewhich and
> /usr/local/texlive/2011/bin/i386-linux is in my PATH variable. (It's
> being added to the PATH in my .bashrc file in my home folder.
>
> Any ideas on how I can fix this?
Check the settings in
(getenv "PATH")
and
exec-path
Personally, I use
(defun TeXlive (year)
"Use TeXlive with the given year (given as string), nil if no TeXlive."
(interactive
(let* ((year
(directory-files "/usr/local/texlive/" nil "\\`[0-9]+\\'")))
(setq year
(completing-read (format "Year to use (default %s): "
(car (last year)))
(cons "none" year)
nil t nil nil (car (last year))))
(list (unless (string= year "none") year))))
(let ((path (getenv "PATH")))
(while (string-match "/usr/local/texlive/[0-9]+/bin/i386-linux:" path)
(setq path (replace-match "" t t path)))
(when year
(setq path (format "/usr/local/texlive/%s/bin/i386-linux:%s"
year path)))
(setenv "PATH" path)))
to select one of several TeXlive installations. Apparently, exec-path
does not need setting here: at least I don't have problems without it.
--
David Kastrup