all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#376: latex error message starts dired
@ 2008-07-25 17:35 Chong Yidong
  2008-07-25 17:50 ` Ralf Angeli
  0 siblings, 1 reply; 6+ messages in thread
From: Chong Yidong @ 2008-07-25 17:35 UTC (permalink / raw)
  To: Ralf Angeli; +Cc: 376, Nate Eldredge

>> 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 "(_"))






^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-07-25 18:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <87y73pkdmw.fsf@stupidchicken.com>
2008-06-08  3:41 ` bug#376: latex error message starts dired Nate Eldredge
2008-06-08  8:03   ` Ralf Angeli
2008-06-08  8:33     ` Nate Eldredge
2008-07-25 18:50   ` bug#376: marked as done (latex error message starts dired) Emacs bug Tracking System
2008-07-25 17:35 bug#376: latex error message starts dired Chong Yidong
2008-07-25 17:50 ` Ralf Angeli

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.