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

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

bug#71856: 30.0.50; string-pad length vs width


From: Stefan Monnier
Subject: bug#71856: 30.0.50; string-pad length vs width
Date: Tue, 02 Jul 2024 21:52:18 -0400
User-agent: Gnus/5.13 (Gnus v5.13)

>> Is it just we or we should `s/length/width/` on the doc&code of
>> `string-pad`?  AFAIK counting codepoints rarely makes sense (unless
>> those code points have width==1, of course).
>> Same for `string-fill`.
> I think that makes sense.

Thanks.

>> I'd usually assume it was an oversight, but the doc keeps repeating
>> "length" enough times (and it's right next to `string-limit` which
>> insists it's about length).
>
> Could this have been an oversight there also?

No, this one is definitely done on purpose: for actual width, we already
have another function and `string-limit` explicitly refers to it.
[ Maybe the `coding-system` arg of `string-limit` should be mandatory,
  since it seems to be the most important use-case, tho.  ]


        Stefan






reply via email to

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