Re: quotearg improvements [was: filenames in error messages]

2008-02-13 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Karl Berry on 2/13/2008 7:18 PM: | In a nutshell, if the source file name contains : or \ or " or any | control character, we enclose it in quotes and escape as needed. | Otherwise, no quotes needed. Wdyt? If my QA_SPLIT_TRIGRAPHS patch

Re: quotearg improvements [was: filenames in error messages]

2008-02-13 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Bruno Haible on 2/13/2008 8:13 PM: | Sorry, but you lost me here. Where did the C trigraphs come into play? Because the quotearg module _already_ did trigraph quoting (try ls - --quoting-style=c for an example). The question is whether

Re: quotearg improvements [was: filenames in error messages]

2008-02-13 Thread Bruno Haible
Eric Blake wrote: > Consider the original filename of `dir??/file'. Before my patch, the > c_quoting_style converted it to `"dir?\?/file"', since `??/' is a trigraph > for `\', but that is not a valid C string. Right now, the output is > `"dir?""?/file"', i.e. two concatenated C strings, so that

Re: quotearg improvements [was: filenames in error messages]

2008-02-13 Thread Karl Berry
Consider the original filename of `dir??/file'. Thanks, I see now. Now I think rms's implicit desire not to map this too strongly to C strings is a a good thing. The goal is to make it easy/unambiguous for programs like Emacs to parse the filenames out of the message. Doing full parsing o

Re: quotearg improvements [was: filenames in error messages]

2008-02-13 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Karl Berry on 2/13/2008 5:45 PM: | | the "c" quoting style now outputs "\"?\"\"?/\"" | ("?""?/") rather than "\"?\\?/\"" ("?\?/"), | | Sorry, I'm not following this. What's the original filename? Consider the original filename o

Re: quotearg improvements [was: filenames in error messages]

2008-02-13 Thread Karl Berry
quotearg_colon("a:b") should result in "\"a:b\"" ("a:b") rather than "\"a\\:b\"" ("a\:b") (ie. keep the displayed output as a valid C string literal Definitely desirable. the "c" quoting style now outputs "\"?\"\"?/\"" ("?""?/") rather than "\"?\\?/\"" ("?\?/"), Sorry, I'm n

Re: quotearg improvements

2008-02-13 Thread Jim Meyering
Eric Blake <[EMAIL PROTECTED]> wrote: > present in . When coupled with your warning fixes, does this > work for you instead? Yep. Thanks.

Re: quotearg improvements

2008-02-13 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Jim Meyering on 2/13/2008 4:00 AM: | I noticed that something about these changes causes | trouble with coreutils builds (albeit merely because it | runs the new test-quotearg program from gnulib): Aargh. I tested ENABLE_NLS on cygwin,

Re: quotearg improvements

2008-02-13 Thread Jim Meyering
Eric Blake <[EMAIL PROTECTED]> wrote: > I'm committing these three patches as is, plus a fourth. This patch adds ... Hi Eric, Thanks for doing that. I noticed that something about these changes causes trouble with coreutils builds (albeit merely because it runs the new test-quotearg program from