all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Stefan Kangas <stefankangas@gmail.com>
Cc: 71856@debbugs.gnu.org, Lars Ingebrigtsen <larsi@gnus.org>
Subject: bug#71856: 30.0.50; string-pad length vs width
Date: Tue, 02 Jul 2024 21:52:18 -0400	[thread overview]
Message-ID: <jwvsewri6qi.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <CADwFkmno_Vssc_8AnTGdi=cB2qH=oVjercT12PGJ44CSuy_Ddg@mail.gmail.com> (Stefan Kangas's message of "Wed, 3 Jul 2024 01:29:26 +0000")

>> 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	other threads:[~2024-07-03  1:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-30 15:37 bug#71856: 30.0.50; string-pad length vs width Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-03  1:29 ` Stefan Kangas
2024-07-03  1:52   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2024-07-06  8:33 ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvsewri6qi.fsf-monnier+emacs@gnu.org \
    --to=bug-gnu-emacs@gnu.org \
    --cc=71856@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=stefankangas@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.