From unknown Sat Jun 21 05:05:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#24314: Mistake in GNU Emacs Lisp Reference Manual Resent-From: Eric Wayman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 26 Aug 2016 18:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 24314 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 24314@debbugs.gnu.org, info@fsf.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org, info@fsf.org Received: via spool by submit@debbugs.gnu.org id=B.14722366889884 (code B ref -1); Fri, 26 Aug 2016 18:39:01 +0000 Received: (at submit) by debbugs.gnu.org; 26 Aug 2016 18:38:08 +0000 Received: from localhost ([127.0.0.1]:41684 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bdM12-0002ZM-4m for submit@debbugs.gnu.org; Fri, 26 Aug 2016 14:38:08 -0400 Received: from eggs.gnu.org ([208.118.235.92]:57009) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bdLXz-0001qy-NZ for submit@debbugs.gnu.org; Fri, 26 Aug 2016 14:08:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bdLXt-0003rZ-JN for submit@debbugs.gnu.org; Fri, 26 Aug 2016 14:08:02 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_40,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:54975) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bdLXt-0003rQ-As for submit@debbugs.gnu.org; Fri, 26 Aug 2016 14:08:01 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47972) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bdLXo-0002V8-1m for bug-gnu-emacs@gnu.org; Fri, 26 Aug 2016 14:08:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bdLXn-0003pa-23 for bug-gnu-emacs@gnu.org; Fri, 26 Aug 2016 14:07:55 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:40843) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bdLXk-0003nQ-Ko for bug-gnu-emacs@gnu.org; Fri, 26 Aug 2016 14:07:54 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 216CC2064C; Fri, 26 Aug 2016 14:07:41 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute3.internal (MEProxy); Fri, 26 Aug 2016 14:07:41 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.fm; h= content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=ZgE EugCKIeG+Mpt7D91ejv+1EbQ=; b=pSvbNgnNFwntIL3AFnRFcIvMrN+YMfVTpuc XkMYdrIN4XohhjAhek94rW1VtDgirePttfJHvnvBiGCGph+yyxSJabxM8XI79oFW L/MNPdjEsJzAbSUX2+8ugP/tbZEkavBG5/KNDtJiiQoMTTSkDf133fYIuPaEtjcl kCa6dj48= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=ZgEEugCKIeG+Mpt7D91ejv+1EbQ=; b=ccu/K WZOpDGJi0NEGbJb/ykDSAk4v59DIIYQphgq2kcx0+3XtOCujkrHrLrfW5TuBxSeI hfEiqfptkbueywztrKFbFbHZh3ThpD7PaxGEJMMsrRqYKQJ6dTLbbgKcHtUYNOHU DGQw16JYNMDsw+uewZKYKPK3G4zE3nx6QpsZSM= X-Sasl-enc: uErBkf94E3kJ8jjSmQtemV0z6hydEGbLPYpCEKFkaC5c 1472234860 Received: from debian (c-68-40-195-40.hsd1.mi.comcast.net [68.40.195.40]) by mail.messagingengine.com (Postfix) with ESMTPA id AD6A6F29D1; Fri, 26 Aug 2016 14:07:40 -0400 (EDT) Date: Fri, 26 Aug 2016 14:07:19 -0400 From: Eric Wayman Message-ID: <20160826140719.1c963f67@debian> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.4 (----) X-Mailman-Approved-At: Fri, 26 Aug 2016 14:38:06 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.4 (----) To Whom It May Concern, I believe I have found a mistake in the GNU Emacs Lisp Reference Manual. In section 4.7, Formatting Strings (https://www.gnu.org/software/emacs/manual/html_node/elisp/Formatting-Strin= gs.html#Formatting-Strings) it says: "The precision is a decimal-point =E2=80=98.=E2=80=99 followed by a dig= it-string... Precision has no effect for other specification characters." However, running (format "%.10d" 23) produces 0000000023 which clearly does have an effect (i.e. padding the integer with zeroes to the left). Best regards, Eric Wayman From unknown Sat Jun 21 05:05:36 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Eric Wayman Subject: bug#24314: closed (Re: bug#24314: Mistake in GNU Emacs Lisp Reference Manual) Message-ID: References: <83lgzjcpgu.fsf@gnu.org> <20160826140719.1c963f67@debian> X-Gnu-PR-Message: they-closed 24314 X-Gnu-PR-Package: emacs Reply-To: 24314@debbugs.gnu.org Date: Fri, 26 Aug 2016 19:15:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1472238902-13265-1" This is a multi-part message in MIME format... ------------=_1472238902-13265-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #24314: Mistake in GNU Emacs Lisp Reference Manual which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 24314@debbugs.gnu.org. --=20 24314: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D24314 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1472238902-13265-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 24314-done) by debbugs.gnu.org; 26 Aug 2016 19:14:19 +0000 Received: from localhost ([127.0.0.1]:41698 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bdMa3-0003Qj-MH for submit@debbugs.gnu.org; Fri, 26 Aug 2016 15:14:19 -0400 Received: from eggs.gnu.org ([208.118.235.92]:40173) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bdMa1-0003QS-UO for 24314-done@debbugs.gnu.org; Fri, 26 Aug 2016 15:14:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bdMZt-0004yk-Me for 24314-done@debbugs.gnu.org; Fri, 26 Aug 2016 15:14:12 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_40,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:55426) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bdMZt-0004yT-JH; Fri, 26 Aug 2016 15:14:09 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4336 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bdMZs-0007h1-8k; Fri, 26 Aug 2016 15:14:09 -0400 Date: Fri, 26 Aug 2016 22:14:25 +0300 Message-Id: <83lgzjcpgu.fsf@gnu.org> From: Eli Zaretskii To: Eric Wayman In-reply-to: <20160826140719.1c963f67@debian> (message from Eric Wayman on Fri, 26 Aug 2016 14:07:19 -0400) Subject: Re: bug#24314: Mistake in GNU Emacs Lisp Reference Manual References: <20160826140719.1c963f67@debian> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.3 (-----) X-Debbugs-Envelope-To: 24314-done Cc: 24314-done@debbugs.gnu.org, info@fsf.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.3 (-----) > Date: Fri, 26 Aug 2016 14:07:19 -0400 > From: Eric Wayman > > In section 4.7, Formatting Strings > (https://www.gnu.org/software/emacs/manual/html_node/elisp/Formatting-Strings.html#Formatting-Strings) > it says: > > "The precision is a decimal-point ‘.’ followed by a digit-string... > Precision has no effect for other specification characters." > > However, running > > (format "%.10d" 23) > > produces > > 0000000023 > > which clearly does have an effect (i.e. padding the integer with zeroes > to the left). Thanks. This is already fixed in the development sources of what will become Emacs 25.1. The manual now says: All the specification characters allow an optional “precision” before the character (after the width, if present). The precision is a decimal-point ‘.’ followed by a digit-string. For the floating-point specifications (‘%e’, ‘%f’, ‘%g’), the precision specifies how many decimal places to show; if zero, the decimal-point itself is also omitted. For ‘%s’ and ‘%S’, the precision truncates the string to the given width, so ‘%.3s’ shows only the first three characters of the representation for OBJECT. For other specification characters, the effect of precision is what the local library functions of the ‘printf’ family produce. (I clarified the last sentence just now.) ------------=_1472238902-13265-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 26 Aug 2016 18:38:08 +0000 Received: from localhost ([127.0.0.1]:41684 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bdM12-0002ZM-4m for submit@debbugs.gnu.org; Fri, 26 Aug 2016 14:38:08 -0400 Received: from eggs.gnu.org ([208.118.235.92]:57009) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bdLXz-0001qy-NZ for submit@debbugs.gnu.org; Fri, 26 Aug 2016 14:08:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bdLXt-0003rZ-JN for submit@debbugs.gnu.org; Fri, 26 Aug 2016 14:08:02 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_40,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:54975) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bdLXt-0003rQ-As for submit@debbugs.gnu.org; Fri, 26 Aug 2016 14:08:01 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47972) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bdLXo-0002V8-1m for bug-gnu-emacs@gnu.org; Fri, 26 Aug 2016 14:08:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bdLXn-0003pa-23 for bug-gnu-emacs@gnu.org; Fri, 26 Aug 2016 14:07:55 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:40843) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bdLXk-0003nQ-Ko for bug-gnu-emacs@gnu.org; Fri, 26 Aug 2016 14:07:54 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 216CC2064C; Fri, 26 Aug 2016 14:07:41 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute3.internal (MEProxy); Fri, 26 Aug 2016 14:07:41 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.fm; h= content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=ZgE EugCKIeG+Mpt7D91ejv+1EbQ=; b=pSvbNgnNFwntIL3AFnRFcIvMrN+YMfVTpuc XkMYdrIN4XohhjAhek94rW1VtDgirePttfJHvnvBiGCGph+yyxSJabxM8XI79oFW L/MNPdjEsJzAbSUX2+8ugP/tbZEkavBG5/KNDtJiiQoMTTSkDf133fYIuPaEtjcl kCa6dj48= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=ZgEEugCKIeG+Mpt7D91ejv+1EbQ=; b=ccu/K WZOpDGJi0NEGbJb/ykDSAk4v59DIIYQphgq2kcx0+3XtOCujkrHrLrfW5TuBxSeI hfEiqfptkbueywztrKFbFbHZh3ThpD7PaxGEJMMsrRqYKQJ6dTLbbgKcHtUYNOHU DGQw16JYNMDsw+uewZKYKPK3G4zE3nx6QpsZSM= X-Sasl-enc: uErBkf94E3kJ8jjSmQtemV0z6hydEGbLPYpCEKFkaC5c 1472234860 Received: from debian (c-68-40-195-40.hsd1.mi.comcast.net [68.40.195.40]) by mail.messagingengine.com (Postfix) with ESMTPA id AD6A6F29D1; Fri, 26 Aug 2016 14:07:40 -0400 (EDT) Date: Fri, 26 Aug 2016 14:07:19 -0400 From: Eric Wayman To: bug-gnu-emacs@gnu.org, info@fsf.org Subject: Mistake in GNU Emacs Lisp Reference Manual Message-ID: <20160826140719.1c963f67@debian> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.4 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Fri, 26 Aug 2016 14:38:06 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.4 (----) To Whom It May Concern, I believe I have found a mistake in the GNU Emacs Lisp Reference Manual. In section 4.7, Formatting Strings (https://www.gnu.org/software/emacs/manual/html_node/elisp/Formatting-Strin= gs.html#Formatting-Strings) it says: "The precision is a decimal-point =E2=80=98.=E2=80=99 followed by a dig= it-string... Precision has no effect for other specification characters." However, running (format "%.10d" 23) produces 0000000023 which clearly does have an effect (i.e. padding the integer with zeroes to the left). Best regards, Eric Wayman ------------=_1472238902-13265-1--