auctex-devel
[Top][All Lists]
Advanced

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

[AUCTeX-devel] Should we offer something like that?


From: David Kastrup
Subject: [AUCTeX-devel] Should we offer something like that?
Date: Sun, 18 Mar 2007 22:36:52 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.95 (gnu/linux)

Hi,
any idea whether or how to integrate something like that into AUCTeX?

(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)))

It is convenient for switching around between various TeXlive versions
and the system default, but it is not really general enough (how to
guess the correct system-specific binary directory?) to work on all
platforms.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum




reply via email to

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