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

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

bug#55688: closed (Incorrect documentation of "string-pad")


From: GNU bug Tracking System
Subject: bug#55688: closed (Incorrect documentation of "string-pad")
Date: Sat, 28 May 2022 07:56:02 +0000

Your message dated Sat, 28 May 2022 10:55:42 +0300
with message-id <834k1am6pt.fsf@gnu.org>
and subject line Re: bug#55688: Incorrect documentation of "string-pad"
has caused the debbugs.gnu.org bug report #55688,
regarding Incorrect documentation of "string-pad"
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
55688: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=55688
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: Incorrect documentation of "string-pad" Date: Fri, 27 May 2022 18:13:53 -0400
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.



--- End Message ---
--- Begin Message --- Subject: Re: bug#55688: Incorrect documentation of "string-pad" Date: Sat, 28 May 2022 10:55:42 +0300
> 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.


--- End Message ---

reply via email to

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