2017-03-14 17:23 GMT+09:00 vim-dev ML <[email protected]>: > 2017-03-14 11:09 GMT+03:00 Kazunobu Kuriyama <[email protected]>: > > But it seems strange that we need to restrict [:cntrl:] and [:graph:] to > > ASCII only. > > > > Quite understandable. But otherwise, we will have to either rely > entirely on > > the is*() functions provided by the OS in use or define our own character > > classes independently of any of it. > > > > The former case implies that the behavior of Vim scripts using [:class:] > > depends on the OS in use. Surely, the latter case is expected to resolve > the > > flaw of the former, but I'm not sure we can specify character classes in > > such a way that almost all users on various platforms are satisfied with > > them. > > Normally possible conflict is resolved by pointing to the Unicode > consortium: they say these code points are control characters, we > follow: it is standard and it has no real competitors. Though for > [:graph:] and [:print:] I would suggest pointing to how Vim draws the > character: i.e. for non-whitespaces this would be something like > “character is printable if `strtrans(char) is# char`” (i.e. make it > like `\p`, with the whitespace difference): you mostly use these > categories in relation to displaying data and I remember myself having > to use `\%(\p\@!.\)` in place of simply `[^[:print:]]` at least once. > Though I am not sure what is `[:graph:]` useful for. >
As for [:cntrl:], this suggestion looks attractive to me. Actually, iscntrl() of macOS returns \x80 to \x9f inclusively in addition to the expected value of `cntrlchars` of Dominique's patch (namely, the control characters from the range \x01 to \x1f), and just this addition causes part of the CI test to be failed. So, if we want to extend the range of [:cntrl:] beyond ASCII, we also need to change the expected value of `cntrlchars` accordingly (probably, in such a way that it complies with https://en.wikipedia.org/wiki/C0_and_C1_control_codes). Should we go along that line, or should we stay with the ASCII range for a while? As for [:graph:], I have no better idea for now. > > > > So, I think at the moment that the ASCII restriction is a reasonable > > compromise. But I'm still quite open to other better solutions. > > > > — > > You are receiving this because you commented. > > Reply to this email directly, view it on GitHub > > > > -- > > -- > > 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/d/optout. > > — > You are receiving this because you are subscribed to this thread. > Reply to this email directly, view it on GitHub > <https://github.com/vim/vim/pull/1560#issuecomment-286352333> > > -- > -- > 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/d/optout. > -- -- 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/d/optout.
