nmh-workers
[Top][All Lists]
Advanced

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

Re: [Nmh-workers] Thoughts: header/address parsing


From: David Levine
Subject: Re: [Nmh-workers] Thoughts: header/address parsing
Date: Sun, 10 Aug 2014 09:53:43 -0400

Ralph wrote:

> Hi Anthony,
> 
> > > Perhaps a new -runes that counts runes/glyphs/codepoints would
> > > sidestep the compatibility issue, -runes trumping -width?
> >
> > But characters can consist of multiple codepoints (see: accents). And
> > characters can be double-width. Or zero-width. Or, or, or...
> 
> OK, so we're normally after columnar output.  How about `-columns C',
> where the string is output, as measured by wcwidth(), until either the
> string ends or C would be exceeded.

How about -outsize, to be consistent with fmttest(1):

   The -outsize switch controls the maximum number of printable
   characters that the format engine will produce.  Characters
   marked as non-printing by the format engine with
   `%(zputlit)', characters with zero width, and extra bytes
   that are part of a multibyte character are not counted
   against this total.  Two special values are supported: “max”,
   which will set the value to the size of the output buffer,
   and “width”, which will set the value to the width of the
   terminal.

> Then pad with ASCII space until C is met.

I don't think that we should add trailing space.  The output
need not be columnar.

David



reply via email to

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