bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#12866: 24.3.50; (elisp) `%-Constructs': padded with spaces to the ri


From: Drew Adams
Subject: bug#12866: 24.3.50; (elisp) `%-Constructs': padded with spaces to the right or left?
Date: Sun, 11 Nov 2012 17:12:00 -0800

> >  In any construct except `%%', you can add a decimal 
> >  integer after the`%' to specify a minimum field width.
> >  If the width is less, the field is padded with spaces
> >  to the right.
> 
> I think it was meant to say "is padded, with spaces, to the right", or
> more clearly, "is padded to the right with spaces".

Sorry, I still don't get it.  To me, each of those statements suggests that the
text in the field, in this case the line number indication (e.g. "L25"), gets
padded by adding spaces on the right (i.e., after the text), up to the specified
width.

But what I think I see is that the text gets padded on the left; that is, spaces
are added before (to the left of) the field's text, until it is of the given
width.

E.g., for "%8l":
Field unpadded (i.e., "%l"):  "L25"
Field padded on the left:     "     L25"
Field padded on the right:    "L25     "

"Padding on the right" means adding spaces to the right of the text, AFAIK.  And
I think I am seeing them added to the left of the text.

What am I missing?






reply via email to

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