[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex f52479b 11/26: Improve checking of a TeX distrib
From: |
Tassilo Horn |
Subject: |
[elpa] externals/auctex f52479b 11/26: Improve checking of a TeX distribution and make it optional |
Date: |
Fri, 13 Nov 2015 17:00:35 +0000 |
branch: externals/auctex
commit f52479b816c0e6097293221b8488144cbdea9123
Author: Mosè Giordano <address@hidden>
Commit: Mosè Giordano <address@hidden>
Improve checking of a TeX distribution and make it optional
* tex-buf.el (TeX-check-TeX, TeX-check-TeX-command-not-found): New
customizable options.
(TeX-command): Do a better check for the presence of a TeX
distribution. Run `call-process' instead of `executable-find',
like `TeX-run-command' actually does. The point is that
`call-process' and `start-process' use `PATH' environment
variable, `executable-find' uses `exec-path' variable and they do
not need to match, but we should check what `TeX-run-command' will
really do.
* doc/auctex.texi (Processor Options): Document `TeX-check-TeX'.
* doc/changes.texi: Mention `TeX-check-TeX'.
---
ChangeLog | 16 ++++++++++++++++
doc/auctex.texi | 17 +++++++++++++++++
doc/changes.texi | 10 +++++++---
tex-buf.el | 17 +++++++++++++++--
4 files changed, 55 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 6d8a74b..387c136 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2015-11-06 Mos� Giordano <address@hidden>
+
+ * tex-buf.el (TeX-check-TeX, TeX-check-TeX-command-not-found): New
+ customizable options.
+ (TeX-command): Do a better check for the presence of a TeX
+ distribution. Run `call-process' instead of `executable-find',
+ like `TeX-run-command' actually does. The point is that
+ `call-process' and `start-process' use `PATH' environment
+ variable, `executable-find' uses `exec-path' variable and they do
+ not need to match, but we should check what `TeX-run-command' will
+ really do.
+
+ * doc/auctex.texi (Processor Options): Document `TeX-check-TeX'.
+
+ * doc/changes.texi: Mention `TeX-check-TeX'.
+
2015-11-03 Mos� Giordano <address@hidden>
* doc/auctex.texi (Processor Options): Document
diff --git a/doc/auctex.texi b/doc/auctex.texi
index 6489c44..4b0f001 100644
--- a/doc/auctex.texi
+++ b/doc/auctex.texi
@@ -2989,6 +2989,23 @@ command can either be a variable or a string. An empty
string or nil
means there is no command available.
@end defopt
+In some systems, Emacs cannot inherit the PATH environment variable from
+the shell and thus @AUCTeX{} may not be able to run @TeX{} commands.
+Before running them, @AUCTeX{} checks if it able to find those commands
+and will warn you in case it fails. You can skip this test by changing
+the option @code{TeX-check-TeX}.
+
address@hidden TeX-check-TeX
address@hidden TeX-command
address@hidden TeX-check-TeX-command-not-found
+If non-nil, @AUCTeX{} will check if it is able to find a working @TeX{}
+distribution before running @TeX{}, @LaTeX{}, @ConTeXt{}, etc. It
+actually checks if can run @code{TeX-command} command or the shell
+returns a command not found error. The error code returned by the shell
+in this case can be set in @code{TeX-check-TeX-command-not-found}
+option.
address@hidden defopt
+
Some @LaTeX{} packages requires the document to be compiled with a
specific engine. Notable examples are fontspec and polyglossia
packages, which require address@hidden and address@hidden engines. If you try
to
diff --git a/doc/changes.texi b/doc/changes.texi
index ed3ad01..fb927f6 100644
--- a/doc/changes.texi
+++ b/doc/changes.texi
@@ -56,9 +56,13 @@ built-in expanders. You might want to keep in
@code{TeX-expand-list}
only new expansion strings.
@item
-When new option @code{TeX-check-engine} is non-nil, before running
address@hidden commands @AUCTeX{} will check whether the correct engine has
-been set, based upon known restrictions posed by @LaTeX{} packages.
+Before running commands like @TeX{} and @LaTeX{}, now @AUCTeX{} performs
+some checks. If @code{TeX-check-TeX} is non-nil, it will test whether a
+working @TeX{} distribution is actually present in the system and
+available to Emacs. Instead, when @code{TeX-check-engine} is non-nil,
+before running @LaTeX{} commands @AUCTeX{} will check whether the
+correct engine has been set, based upon known restrictions posed by
address@hidden packages.
@item
Basic support to @ConTeXt{} Mark IV has been added. Users can now
diff --git a/tex-buf.el b/tex-buf.el
index ec3653c..61a61ad 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -437,6 +437,16 @@ Do you want to select one of these engines?"
(add-file-local-variable 'TeX-engine engine)
(save-buffer))))))
+(defcustom TeX-check-TeX t
+ "Whether AUCTeX should check if a working TeX distribution is present."
+ :group 'TeX-command
+ :type 'boolean)
+
+(defcustom TeX-check-TeX-command-not-found 127
+ "Numerical code returned by shell for a command not found error."
+ :group 'TeX-command
+ :type 'integer)
+
(defun TeX-command (name file &optional override-confirm)
"Run command NAME on the file returned by calling FILE.
@@ -481,8 +491,11 @@ been set."
;; Before running some commands, check that AUCTeX is able to find "tex"
;; program.
- (and (member name '("TeX" "LaTeX" "AmSTeX" "ConTeXt" "ConTeXt Full"))
- (not (executable-find TeX-command))
+ (and TeX-check-TeX
+ (member name '("TeX" "LaTeX" "AmSTeX" "ConTeXt" "ConTeXt Full"))
+ (= TeX-check-TeX-command-not-found
+ (call-process TeX-shell nil nil nil
+ TeX-shell-command-option TeX-command))
(error (format "ERROR: AUCTeX cannot find a working TeX distribution.
Make sure you have one and that TeX binaries are in PATH environment
variable%s"
(if (eq system-type 'darwin)
- [elpa] externals/auctex dbeb71f 04/26: Improve style., (continued)
- [elpa] externals/auctex dbeb71f 04/26: Improve style., Tassilo Horn, 2015/11/13
- [elpa] externals/auctex b4f95f9 07/26: Disable special filling of math constructs, Tassilo Horn, 2015/11/13
- [elpa] externals/auctex 6351078 09/26: Use LaTeX-style-list for default classes completion., Tassilo Horn, 2015/11/13
- [elpa] externals/auctex 9dba8fd 15/26: Make View command work no matter how emacs started, Tassilo Horn, 2015/11/13
- [elpa] externals/auctex c39c63f 13/26: Add new style hologo.el., Tassilo Horn, 2015/11/13
- [elpa] externals/auctex d56502e 05/26: Support node name completion in texinfo, Tassilo Horn, 2015/11/13
- [elpa] externals/auctex a2f8bc6 08/26: Fix Texinfo-make-node-list, Tassilo Horn, 2015/11/13
- [elpa] externals/auctex 52275f9 03/26: Improve style., Tassilo Horn, 2015/11/13
- [elpa] externals/auctex b3153ec 16/26: Add function for reverting document buffer, Tassilo Horn, 2015/11/13
- [elpa] externals/auctex 4527e8a 10/26: Update documentation., Tassilo Horn, 2015/11/13
- [elpa] externals/auctex f52479b 11/26: Improve checking of a TeX distribution and make it optional,
Tassilo Horn <=
- [elpa] externals/auctex fb09c26 06/26: Warn about duplicate texinfo nodes, Tassilo Horn, 2015/11/13
- [elpa] externals/auctex a4c6a19 21/26: Update release-related Makefile rules, Tassilo Horn, 2015/11/13
- [elpa] externals/auctex cb4e33e 12/26: Set output extension for Texinfo files, Tassilo Horn, 2015/11/13
- [elpa] externals/auctex d465076 22/26: Update for upcoming release, Tassilo Horn, 2015/11/13
- [elpa] externals/auctex 5179308 18/26: Change default value of LaTeX-fill-break-at-separators, Tassilo Horn, 2015/11/13
- [elpa] externals/auctex cc72777 19/26: More ERT tests, Tassilo Horn, 2015/11/13
- [elpa] externals/auctex df7dbbd 23/26: Release_11.89, Tassilo Horn, 2015/11/13
- [elpa] externals/auctex 3aa4bdb 17/26: Add ChangeLog entry, Tassilo Horn, 2015/11/13
- [elpa] externals/auctex 0c9b98a 14/26: Fix compatibility with XEmacs in tex-info.el, Tassilo Horn, 2015/11/13
- [elpa] externals/auctex 11af8e6 20/26: Improve has-no-display-manager predicate, Tassilo Horn, 2015/11/13