From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#55688: Incorrect documentation of "string-pad" Date: Sat, 28 May 2022 10:55:42 +0300 Message-ID: <834k1am6pt.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35455"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 55688-done@debbugs.gnu.org To: emacs@kaction.cc Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 28 09:56:35 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nurJL-00095X-BZ for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 28 May 2022 09:56:35 +0200 Original-Received: from localhost ([::1]:43358 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nurJK-0000Ox-9w for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 28 May 2022 03:56:34 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56464) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nurIo-0000Oc-KY for bug-gnu-emacs@gnu.org; Sat, 28 May 2022 03:56:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42470) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nurIo-00078R-Bm for bug-gnu-emacs@gnu.org; Sat, 28 May 2022 03:56:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nurIo-0006CI-Bh for bug-gnu-emacs@gnu.org; Sat, 28 May 2022 03:56:02 -0400 Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Sat, 28 May 2022 07:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 55688 X-GNU-PR-Package: emacs Mail-Followup-To: 55688@debbugs.gnu.org, eliz@gnu.org, emacs@kaction.cc Original-Received: via spool by 55688-done@debbugs.gnu.org id=D55688.165372455223801 (code D ref 55688); Sat, 28 May 2022 07:56:02 +0000 Original-Received: (at 55688-done) by debbugs.gnu.org; 28 May 2022 07:55:52 +0000 Original-Received: from localhost ([127.0.0.1]:36366 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nurId-0006Bp-OQ for submit@debbugs.gnu.org; Sat, 28 May 2022 03:55:51 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:34926) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nurIc-0006Bc-Ak for 55688-done@debbugs.gnu.org; Sat, 28 May 2022 03:55:51 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:53308) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nurIW-000786-WC; Sat, 28 May 2022 03:55:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=nuKJsO3M9WEJCKdC6JV2P9yyf52fbWiGRTAKVAPNjcY=; b=SLGFmMMi48Sw T6oqwSYq3I2JyCamCIZpoQ9aBt3FPv45T3tvMvh6+FCrhIvJ1zVLTZUJDjFrFJDSsS4svWfSmTWHV lanfO+T/zBt9yNd2yZRkX83FWp6mFWF6WUVCLru7H88fq4nyZKtUc0Sdc+pYxYpCkac4qKvto8gFh MUZlZn0XM9Wfk3W6FKgja5Ik/n9LPr0FnmUpzmMR4nQcqU0dgxLAeJ6XS2nmoahPvGqLcGikj54w2 BUzfvNfz2qsn7tYrOqVGt5mIL5nTKSEp9pTXPErI+nIARLA2kIx2+X461ofhJNjfkkjsNIs8bmUHE IHijh80jAvTONR/PfZMCSg==; Original-Received: from [87.69.77.57] (port=4201 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nurIW-000476-Ek; Sat, 28 May 2022 03:55:44 -0400 In-Reply-To: (bug-gnu-emacs@gnu.org) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:233241 Archived-At: > Resent-From: emacs@kaction.cc > Original-Sender: "Debbugs-submit" > 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" > > 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.