# HG changeset patch # User Chong Yidong # Date 1217011178 0 # Node ID 910ca036b4b640a0c7acb06f00d3d6295dd6e628 # Parent adb91820c13f98af4912c090b7ea10caeba99a49 (tex-compilation-parse-errors): Check for invalid filename strings when parsing tex errors (bug#376). diff -r adb91820c13f -r 910ca036b4b6 lisp/textmodes/tex-mode.el --- a/lisp/textmodes/tex-mode.el Fri Jul 25 18:39:27 2008 +0000 +++ b/lisp/textmodes/tex-mode.el Fri Jul 25 18:39:38 2008 +0000 @@ -2188,6 +2188,7 @@ (let* ((this-error (copy-marker begin-of-error)) (linenum (string-to-number (match-string 1))) (error-text (regexp-quote (match-string 3))) + try-filename (filename ;; Prefer --file-liner-error filename if we have it. (or errfilename @@ -2195,7 +2196,11 @@ (with-syntax-table tex-error-parse-syntax-table (backward-up-list 1) (skip-syntax-forward "(_") - (while (not (file-readable-p (thing-at-point 'filename))) + (while (not + (and (setq try-filename (thing-at-point + 'filename)) + (not (string= "" try-filename)) + (file-readable-p try-filename))) (skip-syntax-backward "(_") (backward-up-list 1) (skip-syntax-forward "(_"))