From: Chong Yidong <cyd@stupidchicken.com>
To: Ralf Angeli <angeli@caeruleus.net>
Cc: 376@emacsbugs.donarmstrong.com, Nate Eldredge <neldredge@ucsd.edu>
Subject: bug#376: latex error message starts dired
Date: Fri, 25 Jul 2008 13:35:13 -0400 [thread overview]
Message-ID: <878wvpzx2m.fsf@stupidchicken.com> (raw)
>> 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 "(_"))
next reply other threads:[~2008-07-25 17:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-25 17:35 Chong Yidong [this message]
2008-07-25 17:50 ` bug#376: latex error message starts dired Ralf Angeli
-- strict thread matches above, loose matches on Subject: below --
2008-06-08 3:41 Nate Eldredge
2008-06-08 8:03 ` Ralf Angeli
2008-06-08 8:33 ` Nate Eldredge
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878wvpzx2m.fsf@stupidchicken.com \
--to=cyd@stupidchicken.com \
--cc=376@emacsbugs.donarmstrong.com \
--cc=angeli@caeruleus.net \
--cc=neldredge@ucsd.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.