bug-auctex
[Top][All Lists]
Advanced

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

Re: [Nicolas Dudebout] Re: [Bug-AUCTeX] 11.84; Filename containing space


From: David Kastrup
Subject: Re: [Nicolas Dudebout] Re: [Bug-AUCTeX] 11.84; Filename containing spaces in Mac OS X
Date: Tue, 07 Aug 2007 23:41:19 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux)

Ralf Angeli <address@hidden> writes:

> * Ralf Angeli (2007-08-07) writes:
>
>> I can reproduce the bug with the View command not being shown with a
>> file called "space test.tex" as simple as
>>
>> \documentclass{article}
>> \begin{document}
>> foo
>> \end{document}
>
> The cause is that `TeX-output-extension' is set to something like
> "dvi\"" by `TeX-TeX-sentinel-check'.  The following patch should fix
> this.  Does anybody see a more elegant way?
>
> --- tex-buf.el        10 Jul 2007 22:58:43 +0200      1.261
> +++ tex-buf.el        07 Aug 2007 23:19:53 +0200      
> @@ -836,7 +836,7 @@
>  Return nil ifs no errors were found."
>    (save-excursion
>      (goto-char (point-max))
> -    (if (re-search-backward "^Output written on \\(.*\\) (\\([0-9]+\\) page"
> +    (if (re-search-backward "^Output written on \"?\\([^\"]*\\)\"? 
> (\\([0-9]+\\) page"
>                           nil t)

That is going to be dead slow.  First, "." is equivalent to "[^\n]",
and you don't exclude \n.  Then both quotes are optional, so the *
tries creeping out over everything (a problem with the previous code,
too).  One should use *? here so that the smallest match wins.
Anyway, I'd try something like
"\\(?:\"\\([^\n\\\"]+?\\)\"\\|\\([^\n\\\\" ]\\)\\) (\\([0-9+]\\) page"
or so, adjusting to (or (match-string 1) (match-string 2)) where
necessary.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum




reply via email to

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