GNU bug report logs -
#376
latex error message starts dired
Previous Next
Reported by: Nate Eldredge <neldredge <at> ucsd.edu>
Date: Sun, 8 Jun 2008 03:50:03 UTC
Severity: normal
Done: Chong Yidong <cyd <at> stupidchicken.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
>> In latex mode, when latex produces an error, sometimes using C-x `
>> (next-error) opens a dired buffer instead of jumping to the error.
>>
>> Here is the output of latex, as it appears in the *tex-shell* buffer.
>>
>> Runaway argument?
>> g(\polar , s) &= \Re \phi (se^{i\polar })\frac {1}{4\pi }s \psi (i(\pi \ETC.
>> ! Paragraph ended before \align was complete.
>
> The parser finds this error and subsequently tries to determine the file
> name. In course of that it checks the "(\pi" construct with point right
> before the backslash. In this case the form
> (file-readable-p (thing-at-point 'filename))
> returns t and the file name is set to an empty string. (This is what
> `(thing-at-point 'filename)' returns.)
How bout the following patch to tex-mode?
*** textmodes/tex-mode.el.~1.213.~ 2008-06-25 18:35:53.000000000 -0400
--- textmodes/tex-mode.el 2008-07-25 13:32:46.000000000 -0400
***************
*** 2188,2193 ****
--- 2188,2194 ----
(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,2201 ****
(with-syntax-table tex-error-parse-syntax-table
(backward-up-list 1)
(skip-syntax-forward "(_")
! (while (not (file-readable-p (thing-at-point 'filename)))
(skip-syntax-backward "(_")
(backward-up-list 1)
(skip-syntax-forward "(_"))
--- 2196,2206 ----
(with-syntax-table tex-error-parse-syntax-table
(backward-up-list 1)
(skip-syntax-forward "(_")
! (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 "(_"))
This bug report was last modified 16 years and 360 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.