* bug#55688: Incorrect documentation of "string-pad"
@ 2022-05-27 22:13 emacs--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-28 7:55 ` Eli Zaretskii
0 siblings, 1 reply; 2+ messages in thread
From: emacs--- via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-05-27 22:13 UTC (permalink / raw)
To: 55688; +Cc: self
Documentation of "string-pad" function says following (highlighting is
mine).
@defun string-pad string length &optional padding start
Pad @var{string} to the be of @var{length} using @var{padding} as the
padding character (defaulting to the space character).
If @var{string} is shorter than @var{length}, no padding is done.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
If @var{start} is @code{nil} (or not present), the padding is done to the
end of the string, and if it's non-@code{nil}, to the start of the
string.
=> https://git.savannah.gnu.org/cgit/emacs.git/tree/doc/lispref/strings.texi#n445
I don't think highlighted line is correct. I matches neither behaviour of
emacs:
=> (string-pad "foo" 12)
"foo "
nor what is usually meant by word "padding". I believe issue can be
solved by s/shorter/longer or removing highlighted line at all.
^ permalink raw reply [flat|nested] 2+ messages in thread
* bug#55688: Incorrect documentation of "string-pad"
2022-05-27 22:13 bug#55688: Incorrect documentation of "string-pad" emacs--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-05-28 7:55 ` Eli Zaretskii
0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2022-05-28 7:55 UTC (permalink / raw)
To: emacs; +Cc: 55688-done
> Resent-From: emacs@kaction.cc
> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
> Resent-CC: bug-gnu-emacs@gnu.org
> Resent-Sender: help-debbugs@gnu.org
> Cc: self@kaction.cc
> Date: Fri, 27 May 2022 18:13:53 -0400
> From: emacs--- via "Bug reports for GNU Emacs,
> the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
>
> Documentation of "string-pad" function says following (highlighting is
> mine).
>
> @defun string-pad string length &optional padding start
>
> Pad @var{string} to the be of @var{length} using @var{padding} as the
> padding character (defaulting to the space character).
>
> If @var{string} is shorter than @var{length}, no padding is done.
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> If @var{start} is @code{nil} (or not present), the padding is done to the
> end of the string, and if it's non-@code{nil}, to the start of the
> string.
>
> => https://git.savannah.gnu.org/cgit/emacs.git/tree/doc/lispref/strings.texi#n445
>
> I don't think highlighted line is correct. I matches neither behaviour of
> emacs:
>
> => (string-pad "foo" 12)
> "foo "
>
> nor what is usually meant by word "padding". I believe issue can be
> solved by s/shorter/longer or removing highlighted line at all.
It was more than that. Now fixed on the release branch.
Thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-05-28 7:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-27 22:13 bug#55688: Incorrect documentation of "string-pad" emacs--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-28 7:55 ` Eli Zaretskii
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).