bug-texinfo
[Top][All Lists]
Advanced

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

texi2dvi: --file-line-error


From: Akim Demaille
Subject: texi2dvi: --file-line-error
Date: Tue, 13 May 2003 09:08:10 +0200
User-agent: Gnus/5.1001 (Gnus v5.10.1) Emacs/21.3 (gnu/linux)

I recently discovered recent versions of TeX support the GCS style
error messages.  That's great!

I have not tested this patch with an "old" TeX, and I suspect it might
leave some --help.dvi or --help.aux etc. file around.  If someone
observe this, I'll upgrade my patch to cd into the $tmp dir before
running --help, just as we already do to query TeX for the Texinfo
version.

Index: ChangeLog
from  Akim Demaille  <address@hidden>

        * util/texi2dvi (get_xref_files): Pass --file-line-error-style
        to TeX when supported.

Index: util/texi2dvi
===================================================================
RCS file: /cvsroot/texinfo/texinfo/util/texi2dvi,v
retrieving revision 1.17
diff -u -u -r1.17 texi2dvi
--- util/texi2dvi 8 May 2003 12:22:27 -0000 1.17
+++ util/texi2dvi 13 May 2003 07:05:33 -0000
@@ -388,7 +388,7 @@
       EMPTY)
         TEXINPUTS=$TEXINPUTS$path_sep
         ;;
-      [\\/]* | ?:[\\/]*)        # Absolute paths don't need to be expansed.
+      [\\/]* | ?:[\\/]*)        # Absolute paths don't need to be expanded.
         TEXINPUTS=$TEXINPUTS$path_sep$dir
         ;;
       *)
@@ -482,6 +482,12 @@
       ;;
   esac
 
+  # If possible, make TeX report decent error locations.
+  tex_args=
+  case `$tex --help </dev/null 2>&1` in
+   *file-line-error-style*) tex_args='--file-line-error-style';;
+  esac
+
   # Expand macro commands in the original source file using Makeinfo.
   # Always use `end' footnote style, since the `separate' style
   #   generates different output (arguably this is a bug in -E).
@@ -584,7 +590,7 @@
     # Finally, run TeX.
     # Prevent $ESCAPE from being interpreted by the shell if it happens
     # to be `/'.
-    $batch tex_args="\\${escape}nonstopmode\ \\${escape}input"
+    $batch tex_args="$tex_args \\${escape}nonstopmode\ \\${escape}input"
     cmd="$tex $tex_args $filename_input"
     $verbose "Running $cmd ..."
     if $cmd >&5; then :; else




reply via email to

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