From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: emacs--- via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#55688: Incorrect documentation of "string-pad" Date: Fri, 27 May 2022 18:13:53 -0400 Message-ID: Reply-To: emacs@kaction.cc Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30535"; mail-complaints-to="usenet@ciao.gmane.io" Cc: self@kaction.cc To: 55688@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 28 09:29:30 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 1nuqt7-0007iF-7Q for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 28 May 2022 09:29:29 +0200 Original-Received: from localhost ([::1]:37878 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nuqt5-0008TQ-Lx for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 28 May 2022 03:29:27 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53778) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nuqsg-0008Rc-VK for bug-gnu-emacs@gnu.org; Sat, 28 May 2022 03:29:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42439) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nuqsg-00030P-MI for bug-gnu-emacs@gnu.org; Sat, 28 May 2022 03:29:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nuqsg-0005V4-Fv for bug-gnu-emacs@gnu.org; Sat, 28 May 2022 03:29:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: emacs@kaction.cc Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 28 May 2022 07:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 55688 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.165372293821123 (code B ref -1); Sat, 28 May 2022 07:29:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 28 May 2022 07:28:58 +0000 Original-Received: from localhost ([127.0.0.1]:36334 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nuqsY-0005UY-Lp for submit@debbugs.gnu.org; Sat, 28 May 2022 03:28:58 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:39276) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nuiDg-0001oj-13 for submit@debbugs.gnu.org; Fri, 27 May 2022 18:14:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56656) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nuiDf-0005f9-Q9 for bug-gnu-emacs@gnu.org; Fri, 27 May 2022 18:14:07 -0400 Original-Received: from out2.migadu.com ([2001:41d0:2:aacc::]:18805) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nuiDb-0007jm-Nj for bug-gnu-emacs@gnu.org; Fri, 27 May 2022 18:14:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kaction.cc; s=key1; t=1653689636; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type; bh=nY55p75vyhgSdtkYY7Ss3HeLeh7GTS/Q0OpnORVbpmQ=; b=TZkEP/+C2g99TIHOKmNvaiujQ/m3gCkBFTETVLS25ofkAtbuGUbdqu6Cg5wzJjEFa2gggx t2LCyJ6QoztjaMoQ4ehMN0vYqHNjOJ4RUTYzrRFfL/4PxgtBVP4s15od4w75WHyxgDpRHp QQLt4XHxzVMxiv/k8sxR+CT/pwH/tFystDngWkGTVzRugzYmwk0VI+1ILa3/aoE/gdy2bi spnVOtfY+8vjCxf3s4C4i1sFYRbNY/ZI729aDJVx4Gge3H7LLgNTVuwwvGIpm4BSsr+ogP GmWtccXqeYWEPrrbrXFfHxyY3VVDZ6rLJtUgn56OpzawgXVFVhpiEpiUD6HbIA== X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. Content-Disposition: inline X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: kaction.cc Received-SPF: pass client-ip=2001:41d0:2:aacc::; envelope-from=oht-tah-rznpf#tah.bet#i1@kaction.cc; helo=out2.migadu.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Sat, 28 May 2022 03:28:53 -0400 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:233238 Archived-At: 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.