On Tue, Jul 30, 2013 at 12:05 PM, Manuel Ortega <[email protected]>wrote:
> On Mon, Jul 29, 2013 at 8:36 PM, Gary Johnson <[email protected]> wrote: > >> >> This should be detected by both of the following patterns in >> $VIMRUNTIME/filetype.vim: >> >> mutt[[:alnum:]_-]\{6\} >> mutt[[:alnum:]._-]\{6\} >> >> Both of those patterns successfully match "muttV1LGjR" when it >> appears as a string in a file and the pattern is used after a / >> command. >> >> That's as far as I've investigated this. >> > > I did some snooping. First, I can confirm the problem on OSX 10.8.4. > Second, bisection has revealed that the commit that caused the issue is > 7.3.1295. 7.3.1294 and earlier are OK. As to what it is about 1295 that > did it, I have zero relevant expertise. > >From vimgrepping in $VIMRUNTIME/filetype.vim, I see that mutt patterns are the ONLY ones that include, in the pattern for the BufNewFile,BufRead autocmds, backslash-escaped curly braces. And I can see by looking at the diffs for 7.3.1295 (the offending patch) in the googlecode page, that in fileio.c, there is a note that says "An escaped { must be unescaped", followed by some code that (I presume) does just that. There's the problem. By the way, I am a bit surprised that the aforementioned patterns in filetype.vim EVER worked. Nothing in :h autocmd-pattern or :h file-pattern suggests that the vim text regex elements '\{' or '\}'---used as quantifiers like with \{6\} or \{-n\}--- are kosher for use in autocmds. Instead those help files seem to say that we only have a relatively small set of patterns that are only slightly better than globbing wildcards. For that matter, the mutt patterns are part of a grand total of FOUR that try to use something like [:alnum:] in them, and nothing in the help files says *that* should work either! Are the docs underselling what's available for use in autocmd file-matching patterns? Bram, if '\{n\}' *is* kosher for autocmd file-patterns, please say so in the docs. Ditto for anything else left out like [:blah:] If OTOH the docs are not underselling, then the autocmds in filetype.vim that attempt to use \{n\} and [:blah:] are incorrect and should be replaced. -Manny -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
