[Top][All Lists]

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

Re: default quoting style

From: Paul Eggert
Subject: Re: default quoting style
Date: Wed, 29 Mar 2006 16:19:05 -0800
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

Eric Blake <address@hidden> writes:

> This raises a couple of questions.  First, when MB_CUR_MAX is 1, the 'ls
> --show-control-chars' option currently keys off of !isprint() for deciding
> whether to replace characters with '?'.  But based on the option name,
> wouldn't it be better if this used iscntrl() instead,

It might be better to be conservative here, and to refuse to print a
character unless it's printable.  The option's name is therefore
perhaps ill-chosen.

> Note that --show-control-characters is independent of the quoting
> style, and that it is dangerous

Yup.  I wouldn't recommend it for normal use.

> Second, ls honors the environment variable QUOTING_STYLE to change its
> default.  Should quote_n() in lib/quote.c do likewise, rather than
> hardcoding a default of 'locale'?

I'm a bit reluctant to do that as well; it would affect lots of programs.
And as time goes on I've gotten leerier and leerier of using environment
variables for program settings.

> Third, should we add a way to make quoting styles pass non-printing
> but non-control characters through untouched, converting only
> control characters to octal?....  I don't know if this would mean
> adding new quoting styles, or adding yet another option to struct
> quoting_options.

Sounds like a quoting option to me.

> Finally, the comments in quotearg.h mentions that the default quoting
> style if not otherwise specified is literal, but that someday it may
> switch to shell.  Is it time to make that swap?

That comment has been in there for years, with no strong sentiment
by users to change anything.  I'd rather leave it alone unless we
have a good reason to change.

reply via email to

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