[Top][All Lists]

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

[AUCTeX-devel] [RFC] Add new TeX-file-line-error option

From: Davide G. M. Salvetti
Subject: [AUCTeX-devel] [RFC] Add new TeX-file-line-error option
Date: Sat, 01 Nov 2014 17:07:13 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Hello developers,

I would like to have file:line:error style error messages on by default
in Debian without asking users to customize
"/etc/texmf/web2c/texmf.cnf", therefore I wrote the attached patch.

This is a known issue that has been already discussed here many times,
also recently, (see also FAQ number eight); if you deem it acceptable, I
could apply it upstream as well (I have write access to Savannah).

>From 19cb9af5a6f0bd810d97ab1d9645cc0a72ac2db7 Mon Sep 17 00:00:00 2001
From: "Davide G. M. Salvetti" <address@hidden>
Date: Fri, 31 Oct 2014 22:07:22 +0100
Subject: [PATCH] Add new TeX-file-line-error option

This new option allows the user to select the style TeX prints error
messages with (also see FAQ number 8).

* tex.el (TeX-file-line-error): New customizable option.
  (TeX-expand-list): New expander "$(file-line-error)".
  (TeX-command-list): Use it.
  (LaTeX-command-style): Use it.

* doc/auctex.texi (Processor Options): Document `TeX-file-line-error'.

* doc/changes.texi: Mention `TeX-file-line-error'.
 ChangeLog        | 12 ++++++++++++
 doc/auctex.texi  |  9 ++++++++-
 doc/changes.texi |  8 ++++++++
 tex.el           | 11 +++++++++--
 4 files changed, 37 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 126fdb8..00cce5d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2014-11-01  Davide G. M. Salvetti  <address@hidden>
+        * tex.el (TeX-file-line-error): New customizable option.
+        (TeX-expand-list): New expander "$(file-line-error)".
+        (TeX-command-list): Use it.
+        (LaTeX-command-style): Use it.
+        * doc/auctex.texi (Processor Options): Document
+        `TeX-file-line-error'.
+        * doc/changes.texi: Mention `TeX-file-line-error'.
 2014-10-31  Mosè Giordano  <address@hidden>
        * (CTANDIR): New variable.
diff --git a/doc/auctex.texi b/doc/auctex.texi
index 08bf8cf..10af8dc 100644
--- a/doc/auctex.texi
+++ b/doc/auctex.texi
@@ -2786,7 +2786,7 @@ should be produced, if @TeX{} should be started in 
interactive or
 nonstop mode, if source specials or a address@hidden file should be produced
 for making inverse and forward search possible or which @TeX{} engine
 should be used instead of regular @TeX{}, like address@hidden, Omega or
address@hidden, and the style error messages are printed with.
 @deffn Command TeX-PDF-mode
 @kindex C-c C-t C-p
@@ -2929,6 +2929,13 @@ produced.
 If non-nil, the output of @TeX{} compilation is shown in another window.
 @end defopt
+You can instruct @TeX{} to print error messages in the form
+file:line:error which is similar to the way many compilers format them.
address@hidden TeX-file-line-error
+If non-nil, @TeX{} will produce file:line:error style error messages.
address@hidden defopt
 @node Viewing
 @section Viewing the Formatted Output
 @cindex Viewing
diff --git a/doc/changes.texi b/doc/changes.texi
index 056177e..0dd30bd 100644
--- a/doc/changes.texi
+++ b/doc/changes.texi
@@ -8,6 +8,14 @@
 @end ifset
address@hidden News since 11.88
address@hidden @bullet
+New option @code{TeX-file-line-error} allows to select file:line:error
+style for error messages.
address@hidden itemize
 @heading News in 11.88
 @itemize @bullet
diff --git a/tex.el b/tex.el
index b634a74..a675ab0 100644
--- a/tex.el
+++ b/tex.el
@@ -79,6 +79,11 @@
   :group 'TeX-command
   :type 'string)
+(defcustom TeX-file-line-error t
+  "Whether to have TeX produce file:line:error style error messages."
+  :group 'TeX-command
+  :type 'boolean)
 (defcustom ConTeXt-engine nil
   "Engine to use for --engine in the texexec command.
 If nil, none is specified."
@@ -112,7 +117,7 @@ If nil, none is specified."
 ;; TeX-expand-list for a description of the % escapes
 (defcustom TeX-command-list
-  `(("TeX" "%(PDF)%(tex) %(extraopts) %`%S%(PDFout)%(mode)%' %t"
+  `(("TeX" "%(PDF)%(tex) %(file-line-error) %(extraopts) 
%`%S%(PDFout)%(mode)%' %t"
      TeX-run-TeX nil
      (plain-tex-mode ams-tex-mode texinfo-mode) :help "Run plain TeX")
     ("LaTeX" "%`%l%(mode)%' %t"
@@ -301,7 +306,7 @@ The executable `latex' is LaTeX version 2e."
 (defcustom LaTeX-command-style
   ;; They have all been combined in LaTeX 2e.
-  '(("" "%(PDF)%(latex) %(extraopts) %S%(PDFout)"))
+  '(("" "%(PDF)%(latex) %(file-line-error) %(extraopts) %S%(PDFout)"))
 "List of style options and LaTeX commands.
 If the first element (a regular expression) matches the name of one of
@@ -456,6 +461,8 @@ string."
                 (if TeX-interactive-mode
                   " -interaction=nonstopmode")))
+    ("%(file-line-error)"
+     (lambda () (if TeX-file-line-error " -file-line-error" "")))
     ("%(o?)" (lambda () (if (eq TeX-engine 'omega) "o" "")))
     ("%(tex)" (lambda () (eval (nth 2 (assq TeX-engine (TeX-engine-alist))))))
     ("%(latex)" (lambda () (eval (nth 3 (assq TeX-engine 

reply via email to

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