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: Ralf Angeli
Subject: Re: [Nicolas Dudebout] Re: [Bug-AUCTeX] 11.84; Filename containing spaces in Mac OS X
Date: Wed, 08 Aug 2007 00:00:31 +0200
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1.50 (gnu/linux)

* David Kastrup (2007-08-07) writes:

> Ralf Angeli <address@hidden> writes:
>
>> -    (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.

Such regexps are rather incomprehensible (at least for me).  How about
shaving off unwanted quotation marks once we have the string with
something like

(while (string-match "\\`\"\\(.*\\)\\'" output-file)
  (setq output-file (match-string 1 output-file)))

and analogous code for trailing quotation marks?

-- 
Ralf




reply via email to

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