From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 15 22:29:08 2024 Received: (at submit) by debbugs.gnu.org; 16 Mar 2024 02:29:08 +0000 Received: from localhost ([127.0.0.1]:54563 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rlJnI-0000XA-55 for submit@debbugs.gnu.org; Fri, 15 Mar 2024 22:29:08 -0400 Received: from lists.gnu.org ([209.51.188.17]:33538) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rlJnD-0000Wx-4Z for submit@debbugs.gnu.org; Fri, 15 Mar 2024 22:29:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rlJmb-00028z-1C for bug-gnu-emacs@gnu.org; Fri, 15 Mar 2024 22:28:25 -0400 Received: from flamingo.ash.relay.mailchannels.net ([23.83.222.60]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rlJmY-0005LS-5q for bug-gnu-emacs@gnu.org; Fri, 15 Mar 2024 22:28:24 -0400 X-Sender-Id: dreamhost|x-authsender|adam@alphapapa.net Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 1B8B69417CC for ; Sat, 16 Mar 2024 02:28:17 +0000 (UTC) Received: from pdx1-sub0-mail-a230.dreamhost.com (unknown [127.0.0.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id AB18F94177A for ; Sat, 16 Mar 2024 02:28:16 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1710556096; a=rsa-sha256; cv=none; b=5vC3tOXxskSuJnoJCBSuofyHa5IXxldwplQv+amfjlo2NtamB416FwjycDjcIf+nG2dOY0 qYlrhay/nWCx96iYGcCKYVC5oh+eTq/WitLfkozsXa+YYZptEeloRqAMNbebJkVuqSNqTh hyS1YTFd94vYBi6ltTQ9FnsX5XfBsehWr8mQwTBnNKps/+mJr3jfwH2DlkgD3QZd3Ytq/Y z0/wYOqspz+2VcYAEDbMfTYWvohvl1A9lqviy8H7NPWmQPUFnLLum6ojE8+PaRPexPANIa FUad27+GE1ivyhXLFoo7PdFv+ZbH3C8Yqk/b2cMapVQ50DJt3iQzuS58xVZE3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1710556096; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: dkim-signature; bh=R0FK/17V4+dhrtkk2bv9htXm7C+dq+UujZQOOQ6Lif4=; b=UXUIyOd8lSiYbREEVuHSzLQrCCep9Qxku2fG2e2W2trFTYVgO7o6CLmcvzjhPGlozvL0BU 3BXp6jxFxyptIjNxb0VTDpJXd9rt9lJOhKWZh7fEDVkBugCFGJiYrqMMWQXYcwz04UTTr/ gvsbSSz9qSBHyFUuVku6N4Doq65O3WwhIPjsA9kirIpTaUSkREYIgGXadgiugIr/gDPIdm KnJVaMDbHPvTbk6w0vgY/zF4irCexyfcOpqU2VkgDBFKp2D0LSRjwPM6q617ZgYwurr2r/ lXqm+k/h+U6fF3vBxvQlDoEjWs12GaeZMnFELyVCsfQks8VmUdha6CwSKtefpg== ARC-Authentication-Results: i=1; rspamd-b46fcdc5-6n9vx; auth=pass smtp.auth=dreamhost smtp.mailfrom=adam@alphapapa.net X-Sender-Id: dreamhost|x-authsender|adam@alphapapa.net X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|adam@alphapapa.net X-MailChannels-Auth-Id: dreamhost X-Exultant-Drop: 6154ab3f0b7ba944_1710556096949_1351489603 X-MC-Loop-Signature: 1710556096949:3342695161 X-MC-Ingress-Time: 1710556096949 Received: from pdx1-sub0-mail-a230.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.121.187.15 (trex/6.9.2); Sat, 16 Mar 2024 02:28:16 +0000 Received: from [10.43.0.18] (unknown [193.56.116.15]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: adam@alphapapa.net) by pdx1-sub0-mail-a230.dreamhost.com (Postfix) with ESMTPSA id 4TxQ5X2Gftz3J for ; Fri, 15 Mar 2024 19:28:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alphapapa.net; s=dreamhost; t=1710556096; bh=R0FK/17V4+dhrtkk2bv9htXm7C+dq+UujZQOOQ6Lif4=; h=Content-Type:Date:To:From:Subject; b=nxVfrfGchk4stsbCiHWA2cP5fAdYo3MfOB/lOjdofpPprtZwvs0dsTxGgBoRyRvOp KbX/0VeJa9CHXIOj5NDMNLOLiLVosSH62MhrVSJF3Ik52rmARP5xmQWkpK4ze6vbwS tS5vGDAvU6bKKSl6d4wsRC/4AGs637jbVuzJcXdH3NWy0Do9tQ7QkWDhMxBFN63BGp f7YgYxDRKgc8RaaKx9i5FQQF+MwyERUS0za6T3+DSM5lmrgW7w8f/HchrvYWzL/U2M IY/1knoVe2HlZH/0mQGQd5XP7ha326wxqPP/6NRPxseBJKUNzklJeMemFZuOHinwjN c2lN61zq9iuww== Content-Type: multipart/mixed; boundary="------------Gos20NZT860Vmh9Ch7Qi4iQ0" Message-ID: Date: Fri, 15 Mar 2024 21:28:15 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: bug-gnu-emacs@gnu.org From: Adam Porter Subject: [PATCH] format-spec pads when it should only truncate Received-SPF: neutral client-ip=23.83.222.60; envelope-from=adam@alphapapa.net; helo=flamingo.ash.relay.mailchannels.net X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 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_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NEUTRAL=0.779, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.7 (-) X-Debbugs-Envelope-To: submit 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: -2.7 (--) This is a multi-part message in MIME format. --------------Gos20NZT860Vmh9Ch7Qi4iQ0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi, Please see the attached patch which fixes a bug in `format-spec': that a format spec like "%>15t", which is intended to limit the width of a string to 15 characters, would also pad a string less than that length to be that length. Please note the test case which the patch essentially disables: it calls one of the intermediate functions with arguments which I'm not sure it would be called with in real usage. I added two test cases to cover the behavior which the patch is intended to fix, and after editing the `format-spec--do-flags' to pass the new cases, only that one case failed; so, since I'm not sure whether it indicates an actual bug, I disabled it. Perhaps there exists a real-world scenario to which that test would apply, but such is not encoded as an end-to-end test of `format-spec' with a spec string, so it's hard to say. In other words, this patch fixes a real bug and adds test cases for it. It also causes an existing case to fail, but since I'm not sure whether that represents a real bug, that case is now disabled. All other tests in the file still pass. Thanks, Adam --------------Gos20NZT860Vmh9Ch7Qi4iQ0 Content-Type: text/x-patch; charset=UTF-8; name="0001-format-spec-do-flags-Don-t-pad-when-just-truncating.patch" Content-Disposition: attachment; filename*0="0001-format-spec-do-flags-Don-t-pad-when-just-truncating.pat"; filename*1="ch" Content-Transfer-Encoding: base64 RnJvbSA1YjJmZWY5YzVlY2E1ZWI1YzU0ZTI3ZjdlZTM4OTBkYWQ0NTg3Y2JjIE1vbiBTZX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C4gImxvbmdiYXIiKSkpCiAgICAgICAgICAgICAgICAgICJmb28gZ2JhciB6b3QiKSkKICAg KHNob3VsZCAoZXF1YWwgKGZvcm1hdC1zcGVjICJmb28gJT40YiB6b3QiICcoKD9iIC4gImxv bmdiYXIiKSkpCi0gICAgICAgICAgICAgICAgICJmb28gbG9uZyB6b3QiKSkpCisgICAgICAg ICAgICAgICAgICJmb28gbG9uZyB6b3QiKSkKKyAgKHNob3VsZAorICAgOzsgVGhlIHN0cmlu ZyBzaG91bGQgYmUgdHJ1bmNhdGVkIHRvIDE1IGNoYXJhY3RlcnMuCisgICA7OyBOT1RFOiBT ZWUgbm90ZSBhYm92ZSBpbiBgZm9ybWF0LXNwZWMtZG8tZmxhZ3MnIHRlc3QuCisgICAoZXF1 YWwgKGZvcm1hdC1zcGVjICIlPjE1dCIgJygoP3QgLiAiMDEyMzQ1Njc4OWFiY2RlZmdoaSIp KSkKKyAgICAgICAgICAiMDEyMzQ1Njc4OWFiY2RlIikpCisgIChzaG91bGQKKyAgIDs7IExp a2UgdGhlIHByZXZpb3VzIHRlc3QsIGJ1dCBzaW5jZSB0aGUgc3RyaW5nIGlzIHNob3J0ZXIs IGl0IHNob3VsZAorICAgOzsgKm5vdCogYmUgcGFkZGVkIHRvIDE1IGNoYXJhY3RlcnMuCisg ICAoZXF1YWwgKGZvcm1hdC1zcGVjICIlPjE1dCIgJygoP3QgLiAiMDEyMzQ1Njc4OSIpKSkK KyAgICAgICAgICAiMDEyMzQ1Njc4OSIpKSkKIAogKGVydC1kZWZ0ZXN0IGZvcm1hdC1zcGVj LXNwbGl0ICgpCiAgIChzaG91bGQgKGVxdWFsIChmb3JtYXQtc3BlYyAiZm9vICViIGJhciIg JygoP2IgLiAiem90IikpIG5pbCB0KQotLSAKMi4zMC4yCgo= --------------Gos20NZT860Vmh9Ch7Qi4iQ0-- From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 16 06:23:21 2024 Received: (at 69822) by debbugs.gnu.org; 16 Mar 2024 10:23:21 +0000 Received: from localhost ([127.0.0.1]:54855 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rlRCC-0005Tl-TL for submit@debbugs.gnu.org; Sat, 16 Mar 2024 06:23:21 -0400 Received: from eggs.gnu.org ([209.51.188.92]:55868) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rlRC9-0005TU-LR for 69822@debbugs.gnu.org; Sat, 16 Mar 2024 06:23:19 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rlRBS-0008QY-PK; Sat, 16 Mar 2024 06:22:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=1TTfbv22bGMNX9sDn0uBwXfrAG32BsF7YlQx+bjutqQ=; b=HQrrTdnSxgIHsfg8ktIr J7hgaGdjuBvUnDPLc8zAUf4UR+z+lQnaeLc9ab8I0Is5Un+80WLVTCzClw9TRLmyX9mGEfxRcLD4r XnVcUGNbZqeB4HyFv/0SAqlFlvJec/d0C4ahciUuOftcSpmTpU0C39jPv6FyhU62nd/hXxLDm5W9o 7ijFFW5gimt2eMktwHj2Fzlb4goWVp9DOTCN3+kbJjRmm6ZrC4ZTf180jHAfXDITQX0VpucLdDES8 0kYjdid8xV7PVTZ8dyZUvFvjQhY0UCBI/Ca17fcLkRcX7Fy8n2b6AOh3ToVT2GBp2GcC8bxxKGAXU dT8Dl9ZvKEEQ8Q==; Date: Sat, 16 Mar 2024 12:22:26 +0200 Message-Id: <86bk7e79y5.fsf@gnu.org> From: Eli Zaretskii To: Adam Porter In-Reply-To: (message from Adam Porter on Fri, 15 Mar 2024 21:28:15 -0500) Subject: Re: bug#69822: [PATCH] format-spec pads when it should only truncate References: MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 69822 Cc: 69822@debbugs.gnu.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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Fri, 15 Mar 2024 21:28:15 -0500 > From: Adam Porter > > Please see the attached patch which fixes a bug in `format-spec': that a > format spec like "%>15t", which is intended to limit the width of a > string to 15 characters, would also pad a string less than that length > to be that length. I don't understand why you consider it a bug. According to the doc string (see below), this: (format-spec "%>15t" '((?t . "0123456789"))) should behave the same as this: (format "%15s" "0123456789") And in my testing, it does: both produce " 0123456789". So I don't think I agree that there's a bug here to begin with. The doc string of format-spec says: The width and truncation modifiers behave like the corresponding ones in ‘format’ when applied to %s. From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 16 06:36:07 2024 Received: (at 69822) by debbugs.gnu.org; 16 Mar 2024 10:36:08 +0000 Received: from localhost ([127.0.0.1]:54901 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rlROZ-00069p-Ik for submit@debbugs.gnu.org; Sat, 16 Mar 2024 06:36:07 -0400 Received: from mail-ej1-f43.google.com ([209.85.218.43]:38073) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rlROT-000693-6j for 69822@debbugs.gnu.org; Sat, 16 Mar 2024 06:36:05 -0400 Received: by mail-ej1-f43.google.com with SMTP id a640c23a62f3a-a46ac4dbc81so3294566b.0 for <69822@debbugs.gnu.org>; Sat, 16 Mar 2024 03:35:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710585318; x=1711190118; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=ubNu8JzqC5T17QxsHSJsYgOGnMoaujyV7kiSjAqU3ek=; b=AEKWkN4SzuVzd60O7gw3sBqNXE9JlXih0agxRHo4OLsgITuAZKU/ctvjVNpuuvu4Lp Zx2ULTV2tzSDun757+YURS/k5MG+CJA1XiJSX7eBm0B6ssI07cRZZUrrcym8dsE2oMBj kbcWXLb5uoxiT+Zdf0qmP7L2NRIRfr5D8CAkTPt0p1ZafwUPQSk4bVTk27SSsvLw9h7E QNpb3lg8kKkVuKXy3KV/abYYBeq8SU69Iz2eyyTI1nCVArlIjFS2eLVoCcxm/AyBDy/t xCSb/K+smpPbMtVowAaLSVYpcjRJOLjyG+DtGK8ho1BUr8/lTahHhgmxQmQjqyTw2SzI Xv1Q== X-Gm-Message-State: AOJu0YxJpUFbLDlgsTb6m+WRBv3Mlb40S4JPPK1pNS3bhOCglH15vuXZ +Pm4VKc+MTCffX7+0YxtFmye8TwqSmFAAAtpsRnSuD7Uc1swrvg0v1Ott+mr X-Google-Smtp-Source: AGHT+IHOUGxw395kaziIfiT0Pk/Hx/znmGKro2mhsg44daHH0cpjuD4sSMJgyrVH7nn3zooo0lmGTQ== X-Received: by 2002:a17:907:970f:b0:a46:936a:53a8 with SMTP id jg15-20020a170907970f00b00a46936a53a8mr2463099ejc.2.1710585317984; Sat, 16 Mar 2024 03:35:17 -0700 (PDT) Received: from localhost ([2a02:aa12:b101:f580:7e85:981f:c305:2cf1]) by smtp.gmail.com with ESMTPSA id hg23-20020a170906f35700b00a4380e85e5csm2597000ejb.202.2024.03.16.03.35.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Mar 2024 03:35:17 -0700 (PDT) From: "Basil L. Contovounesios" To: Adam Porter Subject: Re: bug#69822: [PATCH] format-spec pads when it should only truncate In-Reply-To: (Adam Porter's message of "Fri, 15 Mar 2024 21:28:15 -0500") References: Date: Sat, 16 Mar 2024 11:35:16 +0100 Message-ID: <87edcapiqj.fsf@epfl.ch> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 69822 Cc: 69822@debbugs.gnu.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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) Adam Porter [2024-03-15 21:28 -0500] wrote: > Please see the attached patch which fixes a bug in `format-spec': that a format > spec like "%>15t", which is intended to limit the width of a string to 15 > characters, would also pad a string less than that length to be that length. In this format string, 15 is the 'width' (which controls padding), not the 'precision' (which controls truncation). To truncate beyond 15 without padding, specify a precision instead of a width: "%>.15t". So I'm not sure there's a bug here, or at least not the one you describe. What's not clear in the documentation is what happens when one specifies < or > without an explicit precision, as in the example you give. I'm guessing this was the source of confusion here. But I think this can be addressed as a docfix. Or am I missing something? Thanks, -- Basil From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 17 00:12:59 2024 Received: (at 69822) by debbugs.gnu.org; 17 Mar 2024 04:12:59 +0000 Received: from localhost ([127.0.0.1]:57486 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rlhtL-0001y7-HX for submit@debbugs.gnu.org; Sun, 17 Mar 2024 00:12:59 -0400 Received: from bumble.birch.relay.mailchannels.net ([23.83.209.25]:34378) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rlhtI-0001xx-PC for 69822@debbugs.gnu.org; Sun, 17 Mar 2024 00:12:57 -0400 X-Sender-Id: dreamhost|x-authsender|adam@alphapapa.net Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 364EA2C145F; Sun, 17 Mar 2024 04:12:18 +0000 (UTC) Received: from pdx1-sub0-mail-a288.dreamhost.com (unknown [127.0.0.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id CFC842C10F6; Sun, 17 Mar 2024 04:12:17 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1710648737; a=rsa-sha256; cv=none; b=NS2pj1ZjPLdEmxHYAraP2WK5J7OZNs7eGLheqNJJq7ecWs2XA1/9vhIH6Df0UkZOaywrTj 0HtmyN3a+mfsoe5thHy8qBgwBIb+BjzQCNDEwHPqhOX6dR4qH0O3nw7h7pfh8Mlqex/i6S e3Kk6OtwQuqMZZWPrkChmc/pbTcQBgLlPuBR9CX8sEN57bvfrtCqFPxqoqiD7d2hpR6+K0 pDWHmFDq6kWvgvuDOBti10nBs57/YOruKYXK30MFAIEWrdvnU98fMIXNt5Yio3ppmQuHSA fylxEEFx7P628eoCxL9JxCl2n0rdmGssJafueJmwd/BpJSRuHpceLxd6CkJx3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1710648737; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=Bl0wlWDWIU3ftAbkxl0t3buCNqxRb7cN23Pd0MBw8F0=; b=p+6a8N10hpy3A6qxh97xN96onPjHibnF5ZWC5atgZlGDtgEm8C79shsD2aTqlVhLL5kgzM /muos+5xjHhzMMhmQ63kaiVWH+g2O10s7W6zxfCSXqYpzKSeCu8jDAB/4vkRJ8LIR5y8pk +0KIzDrENngUjKJfBHFBuHWa9vOjEwvDXdawUwywI1fbrM/C4Tvu6bnIF3HyqRJ0harbHj 8ua49gogACULV7C/8nJy85mNLwQJNLLmHm0VX7cBBhoGagHySIIsPY0XoYFISbsk7gMUto WZ8l4BofyJirCeIZatI0TqZL6NGsWHVtgq+dYas+5phKL8HuhKdgoIDELE072Q== ARC-Authentication-Results: i=1; rspamd-76c7995f89-nwtdr; auth=pass smtp.auth=dreamhost smtp.mailfrom=adam@alphapapa.net X-Sender-Id: dreamhost|x-authsender|adam@alphapapa.net X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|adam@alphapapa.net X-MailChannels-Auth-Id: dreamhost X-Cooing-Madly: 783c964b2996b3d0_1710648738097_1769251420 X-MC-Loop-Signature: 1710648738097:87202685 X-MC-Ingress-Time: 1710648738097 Received: from pdx1-sub0-mail-a288.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.119.164.55 (trex/6.9.2); Sun, 17 Mar 2024 04:12:18 +0000 Received: from [10.28.0.130] (unknown [45.131.192.18]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: adam@alphapapa.net) by pdx1-sub0-mail-a288.dreamhost.com (Postfix) with ESMTPSA id 4Ty4M52XT7zY0; Sat, 16 Mar 2024 21:12:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alphapapa.net; s=dreamhost; t=1710648737; bh=Bl0wlWDWIU3ftAbkxl0t3buCNqxRb7cN23Pd0MBw8F0=; h=Date:Subject:To:Cc:From:Content-Type:Content-Transfer-Encoding; b=q7rEdQnxrxPUEw+EqJsNsmzijGjqtPcegiEPGqII+9VAHo5zhp4MgVWsF8wodUqz6 NXPWVc1f0aor0apRNUekkFA8ppGsag3dNOUa20ka5+VpR1Bm5wdVDNqZ/rE6mMwd88 ztBgwglVtryeqeEjr3Q5RWQdoLtYIWvkPiL5YwwcPGRXK+EcnUR7V6CUjmEN0BA+Y5 fkW9a07pO9r0iUyXdi6Q/1tPvHiKLb/9KwJuky+6LV9LKzmkqjQK8upI22ExZ3gO0T FG8MrYel+4oA25trfXr9kavv0Ew2cDvTj7r8+yMNv6QoQehmJCRh+6nkxJsJxT8tXe mznK94dKPmr8w== Message-ID: Date: Sat, 16 Mar 2024 23:12:16 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#69822: [PATCH] format-spec pads when it should only truncate Content-Language: en-US To: Eli Zaretskii References: <86bk7e79y5.fsf@gnu.org> From: Adam Porter In-Reply-To: <86bk7e79y5.fsf@gnu.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: 0.6 (/) X-Debbugs-Envelope-To: 69822 Cc: "Basil L. Contovounesios" , 69822@debbugs.gnu.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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.4 (/) Hi Eli, Basil, On 3/16/24 05:22, Eli Zaretskii wrote: > I don't understand why you consider it a bug. According to the doc > string (see below)... > > So I don't think I agree that there's a bug here to begin with. The > doc string of format-spec says: > > The width and truncation modifiers behave like the corresponding ones > in ‘format’ when applied to %s. Thanks, now I understand. Should I close the bug, or do you think the docstring should be changed to help clarify this? From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 17 02:24:20 2024 Received: (at 69822) by debbugs.gnu.org; 17 Mar 2024 06:24:20 +0000 Received: from localhost ([127.0.0.1]:57543 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rljwR-0006L8-PU for submit@debbugs.gnu.org; Sun, 17 Mar 2024 02:24:20 -0400 Received: from eggs.gnu.org ([209.51.188.92]:60416) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rljwQ-0006Kv-6O for 69822@debbugs.gnu.org; Sun, 17 Mar 2024 02:24:19 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rljvj-0006YV-8N; Sun, 17 Mar 2024 02:23:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=e3f7QzCzh08XvzAZBYfw7CFtF9DIidBjgJhaKBdFgwQ=; b=oxlCxyQhd0TMmHilnQm4 5o/N+qXgHY9iyJrZA1st02p+fcF9id+k3z9PMelaZ/i4nisszj9LXjGaIaarOOyLBMBkuZ3uBsV9H 7Fj/2j/Xk6tVeF6WSnNZpfvRw1ZEtECl30XGtuaYt3XK24E7fT4RkZaXNoKZA9+wfKeVK6yVYy6id dKiWYHQKqZiiIzaquS49BqLQfK33HbqajHcuRKsF0sFSxzHw25zmGGsvbRR5CrJYCH5FTE/xVmOnK 2LcdwO2isLjBu7N4XSIC+JokR3/utFo+VWoWC7/ESgSSYIbKbki6khoN9lqZfsGAfNZXapy1+pwme glRowc4p2xKsdg==; Date: Sun, 17 Mar 2024 08:23:26 +0200 Message-Id: <868r2h5qch.fsf@gnu.org> From: Eli Zaretskii To: Adam Porter In-Reply-To: (message from Adam Porter on Sat, 16 Mar 2024 23:12:16 -0500) Subject: Re: bug#69822: [PATCH] format-spec pads when it should only truncate References: <86bk7e79y5.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 69822 Cc: basil@contovou.net, 69822@debbugs.gnu.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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Sat, 16 Mar 2024 23:12:16 -0500 > Cc: 69822@debbugs.gnu.org, "Basil L. Contovounesios" > From: Adam Porter > > Hi Eli, Basil, > > On 3/16/24 05:22, Eli Zaretskii wrote: > > > I don't understand why you consider it a bug. According to the doc > > string (see below)... > > > > So I don't think I agree that there's a bug here to begin with. The > > doc string of format-spec says: > > > > The width and truncation modifiers behave like the corresponding ones > > in ‘format’ when applied to %s. > > Thanks, now I understand. > > Should I close the bug, or do you think the docstring should be changed > to help clarify this? If there's something in the doc string that is unclear, please tell what that is, and let's by all means try to find ways to clarify that. From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 17 08:12:13 2024 Received: (at 69822) by debbugs.gnu.org; 17 Mar 2024 12:12:13 +0000 Received: from localhost ([127.0.0.1]:57734 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rlpN6-0005sB-Vu for submit@debbugs.gnu.org; Sun, 17 Mar 2024 08:12:13 -0400 Received: from mail-ed1-f43.google.com ([209.85.208.43]:40141) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rlpN4-0005rw-H9 for 69822@debbugs.gnu.org; Sun, 17 Mar 2024 08:12:11 -0400 Received: by mail-ed1-f43.google.com with SMTP id 4fb4d7f45d1cf-568b9188673so506079a12.0 for <69822@debbugs.gnu.org>; Sun, 17 Mar 2024 05:11:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710677487; x=1711282287; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=bjI6Raer2XnRoBIsrPsrxWE9KbgtMbnpqEkijdVeffA=; b=a1cYhMg65DPrlP6HlOk4DgyfGsUtxDz7jDH3whmbC+cDD0hDULpaV/fRBY7R3lc/J7 MNxpSRl1tWnxnKOjVPa092KYQXTV5en7/HrmzKYVM0WuoCPXYcNDSjD01WB9bB44Fazf sTBL8lzom7SrOF3NPS1+chFQcsgye0lWInDLpWurPgKV21AaY9iNh0Ve3DmJcvAD4DHn osI7OlpfUMoV9H4Hxfrf/MRc0hUOlubJYg8n55kvbkF+fxUC2i/JPd/fkte7b9kFLKve D5JuvM6WdwwaLDlFwyYuEB7Gh1A+vYa3oIMSwB5QFeks3sOwXKE4iZPq5JN1xyuSPmkg xEEQ== X-Forwarded-Encrypted: i=1; AJvYcCWBxc8vColC9P3zxhPbFRT4X9B4BTG2gbhr7KAwu0LNjaLiVJ/0UiGVSX6qxxd0ZYhJxsYT8VnUpBJrw+5mVMxYcU0eyF4= X-Gm-Message-State: AOJu0YwrL8GCfhkh/ccN44VeP1rAEIM+zuO++fvYXaYEeU6D3kXCQX7A 42MdmNcPr+LqPJoOvnTIaj1h89CDOevl2YXnE5jlu6snRD/TX3co X-Google-Smtp-Source: AGHT+IHSJai/T0pQqImeQ+w8wcWcJtmM7+ql+oBUxhZLj4TIetwpwJogK7yq7FOQULY6987iyq1/tA== X-Received: by 2002:a17:907:78c6:b0:a46:6a59:44c4 with SMTP id kv6-20020a17090778c600b00a466a5944c4mr6700568ejc.3.1710677486756; Sun, 17 Mar 2024 05:11:26 -0700 (PDT) Received: from localhost ([2a02:aa12:b101:f580:7e85:981f:c305:2cf1]) by smtp.gmail.com with ESMTPSA id lc17-20020a170906dff100b00a46bdffd002sm53744ejc.158.2024.03.17.05.11.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Mar 2024 05:11:26 -0700 (PDT) From: "Basil L. Contovounesios" To: Eli Zaretskii Subject: Re: bug#69822: [PATCH] format-spec pads when it should only truncate In-Reply-To: <868r2h5qch.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 17 Mar 2024 08:23:26 +0200") References: <86bk7e79y5.fsf@gnu.org> <868r2h5qch.fsf@gnu.org> Date: Sun, 17 Mar 2024 13:11:25 +0100 Message-ID: <87frwpxdle.fsf@epfl.ch> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 69822 Cc: Adam Porter , 69822@debbugs.gnu.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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Eli Zaretskii [2024-03-17 08:23 +0200] wrote: >> Date: Sat, 16 Mar 2024 23:12:16 -0500 >> Cc: 69822@debbugs.gnu.org, "Basil L. Contovounesios" >> From: Adam Porter >>=20 >> Hi Eli, Basil, >>=20 >> On 3/16/24 05:22, Eli Zaretskii wrote: >>=20 >> > I don't understand why you consider it a bug. According to the doc=20 >> > string (see below)... >> >=20 >> > So I don't think I agree that there's a bug here to begin with. The=20 >> > doc string of format-spec says: >> >=20 >> > The width and truncation modifiers behave like the corresponding ones >> > in =E2=80=98format=E2=80=99 when applied to %s. >>=20 >> Thanks, now I understand. >>=20 >> Should I close the bug, or do you think the docstring should be changed= =20 >> to help clarify this? > > If there's something in the doc string that is unclear, please tell > what that is, and let's by all means try to find ways to clarify that. How about this for now? --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Clarify-description-of-format-spec-truncation.patch >From a4ffad9891b607e432ce246773b1f2d75d3cdeeb Mon Sep 17 00:00:00 2001 From: "Basil L. Contovounesios" Date: Sun, 17 Mar 2024 13:04:32 +0100 Subject: [PATCH] Clarify description of format-spec truncation * doc/lispref/strings.texi (Custom Format Strings): Mention that precision specifier affects both '<' and '>' truncation (bug#69822). * lisp/format-spec.el (format-spec, format-spec--do-flags): Use same terminology as 'format', especially when referring to its behavior. --- doc/lispref/strings.texi | 2 +- lisp/format-spec.el | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/lispref/strings.texi b/doc/lispref/strings.texi index a364fef3aab..eca69002779 100644 --- a/doc/lispref/strings.texi +++ b/doc/lispref/strings.texi @@ -1369,7 +1369,7 @@ Custom Format Strings @item > This flag causes the substitution to be truncated on the right to the -given width, if specified. +given width and precision, if specified. @item ^ This flag converts the substituted text to upper case (@pxref{Case diff --git a/lisp/format-spec.el b/lisp/format-spec.el index cf34017b994..73f9fccd793 100644 --- a/lisp/format-spec.el +++ b/lisp/format-spec.el @@ -38,7 +38,7 @@ format-spec (?l . \"ls\"))) Each %-spec may contain optional flag, width, and precision -modifiers, as follows: +specifiers, as follows: %character @@ -51,7 +51,7 @@ format-spec * ^: Convert to upper case. * _: Convert to lower case. -The width and truncation modifiers behave like the corresponding +The width and precision specifiers behave like the corresponding ones in `format' when applied to %s. For example, \"%<010b\" means \"substitute into the output the @@ -145,7 +145,7 @@ format-spec--do-flags "Return STR formatted according to FLAGS, WIDTH, and TRUNC. FLAGS is a list of keywords as returned by `format-spec--parse-flags'. WIDTH and TRUNC are either nil or -string widths corresponding to `format-spec' modifiers." +string widths corresponding to `format-spec' specifiers." (let (diff str-width) ;; Truncate original string first, like `format' does. (when trunc -- 2.43.0 --=-=-= Content-Type: text/plain I don't know why I added 'and precision' to the description of '<' but not '>' in: Fix and extend format-spec (bug#41758) 0185d76e742 2020-06-18 12:46:21 +0100 https://git.sv.gnu.org/cgit/emacs.git/commit/?id=0185d76e742 Thanks, -- Basil --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 17 21:16:57 2024 Received: (at 69822) by debbugs.gnu.org; 18 Mar 2024 01:16:57 +0000 Received: from localhost ([127.0.0.1]:52071 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rm1cX-0001aU-0R for submit@debbugs.gnu.org; Sun, 17 Mar 2024 21:16:57 -0400 Received: from sienna.cherry.relay.mailchannels.net ([23.83.223.165]:49313) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rm1cV-0001aI-Bm for 69822@debbugs.gnu.org; Sun, 17 Mar 2024 21:16:56 -0400 X-Sender-Id: dreamhost|x-authsender|adam@alphapapa.net Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 89B1D3616C9; Mon, 18 Mar 2024 01:16:16 +0000 (UTC) Received: from pdx1-sub0-mail-a313.dreamhost.com (unknown [127.0.0.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 18756361EEC; Mon, 18 Mar 2024 01:16:16 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1710724576; a=rsa-sha256; cv=none; b=YAUx5JLJ626aY1cfmOQRtEgU/Q0478R2NzWUB2OhrGs17/XvfWJE01r2NOohhXhREoOLsA qdYdc37n1J9bCf8ETnmGLfK2P3fiT+v7C/9KlT5X1El8L7gJ7WHRUGIEAT849C30ERXf+b Jsg/yfb297EpuL8JyEPUdsd29tUFowOxuFEqSMrKAAIpBRvnLIbZsigTOIoLFs2vu8paEX mfKnj7OPL4I16DDEit+FWcoW0ImEne9xb8NR1Te+I2LL29jm/YIq1XzPZF903AtvA9hmyh dnKCL0nkBVr1TfhmLI29GdzXX24EuS7JNIHkMxe7QkIQNAbwAdOcuvmDANNrgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1710724576; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=3cQwky4ocBc+qBrW/f2YaxpUW3KsKCcHmwP46GvTfwM=; b=wpNaDlGoSGXdSvxg+4g/3d14gn3g2JFB6s0+7bodd9SCM5VlpRpeqhZga0wHEbzTPE0WYS RH2H0/fiTGZuP5MyaktKxCh7e/f1pJpV2Zx20KZd2xZ3lQ10mmU8owKMS2M8YUkFoS94Gg qgLny52oMiUGx1VccQP0izbYO4h1hMLmTbhIRO4o3TXoUm8bwZ5Z+Tcr9QdvhJCOZA90Ep c0QXkUFcf+ZlSC2jULTc7XHKSaJWkkADgMs8FqDXTVgqkPGZLdVAsDFVs2D9v1iMkRSKnJ 2odshI1ApcXVrtTqj5bLw3lQSQqJheDIUCAClkPUd1JOf1otnMmmeg7l6rC/HA== ARC-Authentication-Results: i=1; rspamd-76c7995f89-nq4zg; auth=pass smtp.auth=dreamhost smtp.mailfrom=adam@alphapapa.net X-Sender-Id: dreamhost|x-authsender|adam@alphapapa.net X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|adam@alphapapa.net X-MailChannels-Auth-Id: dreamhost X-Society-Stop: 479d5540369b65a9_1710724576331_1290859826 X-MC-Loop-Signature: 1710724576331:2981643607 X-MC-Ingress-Time: 1710724576331 Received: from pdx1-sub0-mail-a313.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.127.222.112 (trex/6.9.2); Mon, 18 Mar 2024 01:16:16 +0000 Received: from [10.28.0.30] (unknown [45.131.192.18]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: adam@alphapapa.net) by pdx1-sub0-mail-a313.dreamhost.com (Postfix) with ESMTPSA id 4TycPW40L2z7K; Sun, 17 Mar 2024 18:16:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alphapapa.net; s=dreamhost; t=1710724575; bh=3cQwky4ocBc+qBrW/f2YaxpUW3KsKCcHmwP46GvTfwM=; h=Date:Subject:To:Cc:From:Content-Type:Content-Transfer-Encoding; b=QIz7BZolg30GMxXwo30qnRIAElx6e9izMqmHTVLdMGj4LBChBbmkhessvkc3Tbqwk srxeLokqvjFNRrZB6f86A7uGWKew5zcrqnqgG9s1DzzbPDyv9bHHcPQwyO0GnpTcz8 NzDfA/Uh9eYQLdgODOdxO4vIAYNW3oQA2XOgTZKWX1Q99uTosJooQV9j09gij9thW6 oZ/U8EscMwGpUrROZUdiOK0hDwFxQjr5uU8N04cozTU93KLwMnsG4w1bSc1lr20whP wJyKGakvLu9p5U6h2dQZ2OXiCN2jf4cvLK4ty3buTpqcJBxd0rw4pR7D5Eqwg6E0R7 K7pTbC7FQCBCw== Message-ID: <88c585b2-80dd-41fc-a0f2-3fe9f47391c6@alphapapa.net> Date: Sun, 17 Mar 2024 20:16:14 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#69822: [PATCH] format-spec pads when it should only truncate To: "Basil L. Contovounesios" , Eli Zaretskii References: <86bk7e79y5.fsf@gnu.org> <868r2h5qch.fsf@gnu.org> <87frwpxdle.fsf@epfl.ch> Content-Language: en-US From: Adam Porter In-Reply-To: <87frwpxdle.fsf@epfl.ch> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.6 (/) X-Debbugs-Envelope-To: 69822 Cc: 69822@debbugs.gnu.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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.4 (/) Hi Basil, Eli, On 3/17/24 07:11, Basil L. Contovounesios wrote: >>> Should I close the bug, or do you think the docstring should be changed >>> to help clarify this? >> >> If there's something in the doc string that is unclear, please tell >> what that is, and let's by all means try to find ways to clarify that. > > How about this for now? Thanks, I think that will be helpful. --Adam From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 21 05:53:47 2024 Received: (at 69822) by debbugs.gnu.org; 21 Mar 2024 09:53:48 +0000 Received: from localhost ([127.0.0.1]:35183 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rnF7L-0002ru-Im for submit@debbugs.gnu.org; Thu, 21 Mar 2024 05:53:47 -0400 Received: from mail-ej1-f41.google.com ([209.85.218.41]:38983) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rnF7J-0002rh-8o for 69822@debbugs.gnu.org; Thu, 21 Mar 2024 05:53:46 -0400 Received: by mail-ej1-f41.google.com with SMTP id a640c23a62f3a-a469ba7e230so27359266b.0 for <69822@debbugs.gnu.org>; Thu, 21 Mar 2024 02:53:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711014779; x=1711619579; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=C3AimCOLvk0X8RXRIjoQh+IkGr4t1oJBETHTgV/edHw=; b=uuhnUipMEK8DC1VUPb9VZ+La6nCs21X2gn7Bj6C5TeAVJjESrGXMeArEO129pEv/D2 SLBNxi5IGOwJkzrSXED41LllcG8nw68TM7/MvJFNpAGAP5+d9GW0Jx0ToCmVpwZ63ASZ 8sEWJVsZsgA9P3R6ZwyRuOHR6TyxAPYDnXuhTGUGkSYXOzZAfUZH96wifnZrZbAZyC8D q2uRAFhO7rYLjoGtvD7MfgoD/Jo7oUrWOGx+E+DIQtsr9S5j38LHfcLCl5Ym4jN96qjw AdiFtCTEDsSvHrD3IpxWo6aT66z6ID5DSWQZtGdosusOQgbRcy69GGD4ceXC0/hFqltb w6GQ== X-Forwarded-Encrypted: i=1; AJvYcCUwmR9k4AZqXXuVwY3uL2FYLzJ+ZjUZRJa/cGn7JvooIBYTGHpNojCrEb4Mu/H5MqdF1bM7j2QHI8YILPhEpCs1tIr4bCw= X-Gm-Message-State: AOJu0Yy9gEdYlT8hYM0K4DKCN+CuNFJU0dmWhNomKFC/9biGSJeEm7X7 J2EK8MxcK1DVyVktYlNuW8NAa1YmNPpP4I3Cnip/QkWxzs/D3PxBZIL3GuAY X-Google-Smtp-Source: AGHT+IEzxV7auADdW+SqnmnPwG6ne33qa5tvuyqy/siUZ9I+JSO8n0odD0zE8r7N+AN8rmadr0RGFw== X-Received: by 2002:a17:906:b4c:b0:a47:1b34:30fb with SMTP id v12-20020a1709060b4c00b00a471b3430fbmr328269ejg.7.1711014779234; Thu, 21 Mar 2024 02:52:59 -0700 (PDT) Received: from localhost ([2001:620:618:5c0:2:80b3:0:e5c]) by smtp.gmail.com with ESMTPSA id bf8-20020a170907098800b00a46bcfe4f16sm4628307ejc.37.2024.03.21.02.52.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Mar 2024 02:52:58 -0700 (PDT) From: "Basil L. Contovounesios" To: Adam Porter Subject: Re: bug#69822: [PATCH] format-spec pads when it should only truncate In-Reply-To: <88c585b2-80dd-41fc-a0f2-3fe9f47391c6@alphapapa.net> (Adam Porter's message of "Sun, 17 Mar 2024 20:16:14 -0500") References: <86bk7e79y5.fsf@gnu.org> <868r2h5qch.fsf@gnu.org> <87frwpxdle.fsf@epfl.ch> <88c585b2-80dd-41fc-a0f2-3fe9f47391c6@alphapapa.net> Date: Thu, 21 Mar 2024 10:52:57 +0100 Message-ID: <87jzlvx66e.fsf@epfl.ch> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 69822 Cc: Eli Zaretskii , 69822@debbugs.gnu.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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) Adam Porter [2024-03-17 20:16 -0500] wrote: > On 3/17/24 07:11, Basil L. Contovounesios wrote: >>>> Should I close the bug, or do you think the docstring should be changed >>>> to help clarify this? >>> If there's something in the doc string that is unclear, please tell >>> what that is, and let's by all means try to find ways to clarify that. >> How about this for now? > Thanks, I think that will be helpful. Pushed to emacs-29: Clarify description of format-spec truncation 689f04a2ddf 2024-03-21 10:43:17 +0100 https://git.sv.gnu.org/cgit/emacs.git/commit/?id=689f04a2ddf Feel free to keep this open if you think there's more to be done here. Or can the report be closed? Thanks, -- Basil From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 21 06:48:34 2024 Received: (at 69822) by debbugs.gnu.org; 21 Mar 2024 10:48:34 +0000 Received: from localhost ([127.0.0.1]:35248 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rnFyM-0004Sh-1S for submit@debbugs.gnu.org; Thu, 21 Mar 2024 06:48:34 -0400 Received: from black.elm.relay.mailchannels.net ([23.83.212.19]:49940) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rnFyH-0004Rx-Ml for 69822@debbugs.gnu.org; Thu, 21 Mar 2024 06:48:33 -0400 X-Sender-Id: dreamhost|x-authsender|adam@alphapapa.net Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 4725F902682; Thu, 21 Mar 2024 10:47:47 +0000 (UTC) Received: from pdx1-sub0-mail-a235.dreamhost.com (unknown [127.0.0.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id DD176902E1F; Thu, 21 Mar 2024 10:47:46 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1711018066; a=rsa-sha256; cv=none; b=hXQQYP0ncUUrNevD9enjygiguecsW/6jyV2Yx0xh91d6+WH/zh3r1lLSfiGyzC9PjZf/lO qrLyM8qItSjQJZTyJ/y1GEslSD3wqWC1c/IVrYba/hCJ5wujgf+/LNv8BoWi/INzEZnzuR dCfMowIMtIfEf/x9d7wFLR88GGgo4+UfLzNtlBi931s1sNGBMB7ljFWWfY0VHme+AYpyOF cp8hMACe4JByvzOYv/d3MTSEgQfa+RElRy/3VrHNCNSmg3oWoI9Hh7xbMqUCDRprXl9FzT JHAdVtDDnDncR62clnJkoKLXZyZRYJwqUR0kH3GKnVaXh7cQ0AgY3laFzDw4Fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1711018066; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=pQhLzSrlFPOhkwbEdGtLDX7ks/Lff0ee5CD6L2JCS9s=; b=ey7hIUn4oQTK6KszJFtOujabYyc0JITsJOp11BqvEIUq/fUMzKkBY7cay+VOT1C7qkleqf +tFenByieNT51XH5A2tBeIVwgyuy/4v93eUAfQWpMDKm+ZLSd8E83vl4wmWdwiHXhFtRRV ee9mybs3PoCIXdFnQOcDYyfjMqgwrj2537nC9+sRI4UUuxVRSXsXg/F2ATT+xvBHCphB0c ybS+Sr5jM87tTR9cd5mwcpn47ixDk6M35/iolwCrSu3zNP3b7NB931Q0d32I95jW9Jgtok nt5iRxnF3eeFc9RoVrEBscR0VGu5vjZpFSNNdEPmETnnQQTbLodMzB02FbRwcg== ARC-Authentication-Results: i=1; rspamd-b46fcdc5-7drxb; auth=pass smtp.auth=dreamhost smtp.mailfrom=adam@alphapapa.net X-Sender-Id: dreamhost|x-authsender|adam@alphapapa.net X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|adam@alphapapa.net X-MailChannels-Auth-Id: dreamhost X-Troubled-Reaction: 4387a33a6f2c546d_1711018067162_2983790079 X-MC-Loop-Signature: 1711018067162:3594922237 X-MC-Ingress-Time: 1711018067162 Received: from pdx1-sub0-mail-a235.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.126.173.87 (trex/6.9.2); Thu, 21 Mar 2024 10:47:47 +0000 Received: from [10.43.2.138] (unknown [193.56.116.15]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: adam@alphapapa.net) by pdx1-sub0-mail-a235.dreamhost.com (Postfix) with ESMTPSA id 4V0hxY6r06z96; Thu, 21 Mar 2024 03:47:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alphapapa.net; s=dreamhost; t=1711018066; bh=pQhLzSrlFPOhkwbEdGtLDX7ks/Lff0ee5CD6L2JCS9s=; h=Date:Subject:To:Cc:From:Content-Type:Content-Transfer-Encoding; b=pgUfu7tjM3YkJPgb5f8HmZldEIzzV+LrIqZLVNl49dNTGx84gg3oCe4dnYA744Q+F 1Hu5WmjXPwIG61d8nCviLj1xBiNr/RjghJ4deLRXMVBRJVR+gt0E4yuK66Pr/+VXPw xDY2ebHTDT8apXBwuCo+oTj+8EvsIF5I0CyfZgFoIA5iT+PmiBzSvPsNXsK4k7uN4p zFajkiGZDRdK2yU6/FOu6zn9e2wmqdl988q7hnQAAwKtsV5xpvubkRvyvKqFpR/L3G sUdVWcb3QiuEe+ILQxFL9bE5qloA9aPKhc4G/m2Auxyf3kSHZ3xIDHN5VZyk49ySET bkU+ORL5mfqcg== Message-ID: <57fac169-d33d-40b5-aa3f-70f4b8f348bc@alphapapa.net> Date: Thu, 21 Mar 2024 05:47:39 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#69822: [PATCH] format-spec pads when it should only truncate To: "Basil L. Contovounesios" References: <86bk7e79y5.fsf@gnu.org> <868r2h5qch.fsf@gnu.org> <87frwpxdle.fsf@epfl.ch> <88c585b2-80dd-41fc-a0f2-3fe9f47391c6@alphapapa.net> <87jzlvx66e.fsf@epfl.ch> Content-Language: en-US From: Adam Porter In-Reply-To: <87jzlvx66e.fsf@epfl.ch> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.6 (/) X-Debbugs-Envelope-To: 69822 Cc: Eli Zaretskii , 69822@debbugs.gnu.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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.4 (/) Hi Basil, On 3/21/24 04:52, Basil L. Contovounesios wrote: > Adam Porter [2024-03-17 20:16 -0500] wrote: >> On 3/17/24 07:11, Basil L. Contovounesios wrote: >>>>> Should I close the bug, or do you think the docstring should be changed >>>>> to help clarify this? >>>> If there's something in the doc string that is unclear, please tell >>>> what that is, and let's by all means try to find ways to clarify that. >>> How about this for now? >> Thanks, I think that will be helpful. > > Pushed to emacs-29: > > Clarify description of format-spec truncation > 689f04a2ddf 2024-03-21 10:43:17 +0100 > https://git.sv.gnu.org/cgit/emacs.git/commit/?id=689f04a2ddf > > Feel free to keep this open if you think there's more to be done here. > Or can the report be closed? Thank you. I'm happy for it to be closed. (Can the reporter do that, or does it have to be a maintainer? I can't remember, and the tracker's Web pages don't seem to say for certain.) --Adam From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 21 07:04:26 2024 Received: (at 69822) by debbugs.gnu.org; 21 Mar 2024 11:04:26 +0000 Received: from localhost ([127.0.0.1]:35273 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rnGDi-000547-6A for submit@debbugs.gnu.org; Thu, 21 Mar 2024 07:04:26 -0400 Received: from mail-ed1-f50.google.com ([209.85.208.50]:40281) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rnGDe-00053s-9n for 69822@debbugs.gnu.org; Thu, 21 Mar 2024 07:04:25 -0400 Received: by mail-ed1-f50.google.com with SMTP id 4fb4d7f45d1cf-565c4d0fa48so300912a12.1 for <69822@debbugs.gnu.org>; Thu, 21 Mar 2024 04:03:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711019016; x=1711623816; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=NAPBVgrWMsu7WhqlLa4M9yugjyfUEZYVvGk8g8It+cA=; b=DyMDFX+wZWz+mFQEPpN8Owr6XM7Wzdc0mVKM9i2I5bZQvC/U+dLOMUQIcs+v3RXu4E f9SGf87jCikxCvSS15BJX+gD4VaeFmAchpoGBbWYhpz3P/AleaswLS2Yav7GMnbkULxX vYQ1fuPsyphgJTB2UQGXTa8qVAhW1jVXlcS6Hb8VgRXDDzabyPQ0JBbBUFLaz28lrkVO CisX7rpkYpZY1xP/fdvNTHOeCAdBeYldYWvqNzV6DREKcrqDovbsQquM/4dmwLEutksv qiwFKELH9HJXhjrI8UCDROymaosdPE8Xvzny0BAv9jCeQfFCEyzyjdUK5Y9juqF4QeSX sO6Q== X-Forwarded-Encrypted: i=1; AJvYcCWcDTJNz2DYUx0pMaFKEaPg6+ZvWm0teLcHyeBRKHFMb2bH+rY/yRYM5Rj2a1IF5q1PEEenvd7fAWyouRAFdXUt3h9QvsE= X-Gm-Message-State: AOJu0Yyiu3F20NwiKUJCcXwDeXWcQNp8bd2pMGffrBRfZU6x3pMOdfUE AM+fw1Xi6wVmBNyjnPElpp+hj1rCvjPDbYKQrKRq3wpSYzGs0scR X-Google-Smtp-Source: AGHT+IFTlZCtAA/1E8V93sQKrnEMSfZ1RRSLXNA0/h8G+q/+FEPNHWBk6rP6k3Z3Jf8Ev0rXWAiafw== X-Received: by 2002:a17:906:6d06:b0:a46:a42b:96ea with SMTP id m6-20020a1709066d0600b00a46a42b96eamr5357988ejr.7.1711019016076; Thu, 21 Mar 2024 04:03:36 -0700 (PDT) Received: from localhost ([2001:620:618:5c0:2:80b3:0:239]) by smtp.gmail.com with ESMTPSA id bx21-20020a170906a1d500b00a4655976025sm8260644ejb.82.2024.03.21.04.03.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Mar 2024 04:03:35 -0700 (PDT) From: "Basil L. Contovounesios" To: Adam Porter Subject: Re: bug#69822: [PATCH] format-spec pads when it should only truncate In-Reply-To: <57fac169-d33d-40b5-aa3f-70f4b8f348bc@alphapapa.net> (Adam Porter's message of "Thu, 21 Mar 2024 05:47:39 -0500") References: <86bk7e79y5.fsf@gnu.org> <868r2h5qch.fsf@gnu.org> <87frwpxdle.fsf@epfl.ch> <88c585b2-80dd-41fc-a0f2-3fe9f47391c6@alphapapa.net> <87jzlvx66e.fsf@epfl.ch> <57fac169-d33d-40b5-aa3f-70f4b8f348bc@alphapapa.net> Date: Thu, 21 Mar 2024 12:03:35 +0100 Message-ID: <8734sjvoc8.fsf@epfl.ch> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 69822 Cc: Eli Zaretskii , 69822@debbugs.gnu.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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) Adam Porter [2024-03-21 05:47 -0500] wrote: > I'm happy for it to be closed. (Can the reporter do that, or does > it have to be a maintainer? I can't remember, and the tracker's Web pages don't > seem to say for certain.) Anyone can close it. The easiest way is to change the To/Cc address from 69822@debbugs.gnu.org to 69822-done@debbugs.gnu.org. [Details are in the file admin/notes/bugtracker.] Alternatively you can email or Bcc control@debbugs.gnu.org and start your message with Debbugs commands. I tend to rely on the command debbugs-gnu-make-control-message from the debbugs package. HTH, -- Basil From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 23 09:59:54 2024 Received: (at 69822-done) by debbugs.gnu.org; 23 Mar 2024 13:59:54 +0000 Received: from localhost ([127.0.0.1]:58626 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ro1uc-0007VV-BT for submit@debbugs.gnu.org; Sat, 23 Mar 2024 09:59:54 -0400 Received: from bumble.maple.relay.mailchannels.net ([23.83.214.25]:18739) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ro1uZ-0007V6-63 for 69822-done@debbugs.gnu.org; Sat, 23 Mar 2024 09:59:52 -0400 X-Sender-Id: dreamhost|x-authsender|adam@alphapapa.net Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id AC8C38017F1; Sat, 23 Mar 2024 13:59:08 +0000 (UTC) Received: from pdx1-sub0-mail-a310.dreamhost.com (unknown [127.0.0.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 54368801A6F; Sat, 23 Mar 2024 13:59:08 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1711202348; a=rsa-sha256; cv=none; b=QZ2Ky0GMvc/cazp0DYr6fc99uoxuPMDP40J3lwEwJIFqIGzOuCLNCK0RZLhJbBIME99AdT dYrg+vU5DwI66MofoLm6MTlTKksuBuUlBujU3z3A2foVIqcCa4cLABnhBP7e3t5pPbIWt8 8BJ9CnG8mkQIIm1hu1eS5rbNNSq0w+R6CSlBNpov6Nz4rTS+JCDbHNLxYwT65NVN7sgA75 zUzxLGe0b92xHbGenPNLDwVH5fLZJxllkYpO+E4X6xvsa6yhHtmkk0OKCYTakZtt9Rw84n Jlv3n7eA4j2BimmKaX7fqfoT5I8JlnCdVNPHlkNNZW56dVQR6yKsu1p97z+iyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1711202348; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=jdZ4jpBcrq885awl8vH3iFrGA+9U74B7GfsA5zDAb/o=; b=3eWMbbkUJku/ObnoAAs8nQ2svrOFvzEkVLHNjqyJZg7TP28wHfD7Yvu6i9/sgBLkL0bl+g JqvX8OsGil9zxSNBPBK/tbIDgQvLt3mKABatUhTlsVD3/75F5ewqKeyicMAxeAyh2/Uze3 SMdPDfu3YpQI3YhK8SFMBqlFmpcPqLASV0+JAinSPnR9tZxKk9cHiCWe4jDkuvZkjUtFYO RBdYTcEFvG98UCJr6DY1pE9P4dlG4x7MYlxhfr4bLRZfiwDOlVt/V4tQwBzODu6jtWan+6 CZH9xm2Y7H9ydB5gwoEg8O4mbOm/mKxKoRUrB5VmavpS6USIPLNjaMiJtf8rhQ== ARC-Authentication-Results: i=1; rspamd-dbbfdf895-jffqm; auth=pass smtp.auth=dreamhost smtp.mailfrom=adam@alphapapa.net X-Sender-Id: dreamhost|x-authsender|adam@alphapapa.net X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|adam@alphapapa.net X-MailChannels-Auth-Id: dreamhost X-Soft-Snatch: 66ab7b195c1a262e_1711202348574_944668288 X-MC-Loop-Signature: 1711202348574:1349951473 X-MC-Ingress-Time: 1711202348573 Received: from pdx1-sub0-mail-a310.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.118.191.199 (trex/6.9.2); Sat, 23 Mar 2024 13:59:08 +0000 Received: from [10.43.2.138] (unknown [193.56.116.15]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: adam@alphapapa.net) by pdx1-sub0-mail-a310.dreamhost.com (Postfix) with ESMTPSA id 4V215R69STz23; Sat, 23 Mar 2024 06:59:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alphapapa.net; s=dreamhost; t=1711202348; bh=jdZ4jpBcrq885awl8vH3iFrGA+9U74B7GfsA5zDAb/o=; h=Date:Subject:To:Cc:From:Content-Type:Content-Transfer-Encoding; b=oDKm+A4BmMh70u7mNbhANKf+oHkiLVSNuZ4N6nvE1ALnM8IX56NHCcfKDKTFiaoms n8I7KHm6JCuxpRHYMMajH2lOexNtloYbknn/DllBJSFLiyCGWTu344ZP4ZSu7ikTBT c/K3h/GR8cRpbUAHqtmgGPANbtOJVmo2o7wCg/utCOzwqxVkAVvCPc2szrnrXaiEkY oWdnfrcxoSfGGw3b7SsNf5rL0p/xy4UCUj4/3VsddVd5vRgWS8hQSRKsZy76XOuKEo jkda1UozzdtLvCqqCIX5d94bLuQlV5DqAP6vN+RSR3NUEsavRN61P/yAI++Rw7ODac h3oQHFfrL58hw== Message-ID: <9daed9f2-67d4-4e38-80e8-4a20d4184202@alphapapa.net> Date: Sat, 23 Mar 2024 08:59:06 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#69822: [PATCH] format-spec pads when it should only truncate To: "Basil L. Contovounesios" References: <86bk7e79y5.fsf@gnu.org> <868r2h5qch.fsf@gnu.org> <87frwpxdle.fsf@epfl.ch> <88c585b2-80dd-41fc-a0f2-3fe9f47391c6@alphapapa.net> <87jzlvx66e.fsf@epfl.ch> <57fac169-d33d-40b5-aa3f-70f4b8f348bc@alphapapa.net> <8734sjvoc8.fsf@epfl.ch> Content-Language: en-US From: Adam Porter In-Reply-To: <8734sjvoc8.fsf@epfl.ch> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.6 (/) X-Debbugs-Envelope-To: 69822-done Cc: 69822-done@debbugs.gnu.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: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.4 (/) On 3/21/24 06:03, Basil L. Contovounesios wrote: > Adam Porter [2024-03-21 05:47 -0500] wrote: > >> I'm happy for it to be closed. (Can the reporter do that, or does >> it have to be a maintainer? I can't remember, and the tracker's Web pages don't >> seem to say for certain.) > > Anyone can close it. The easiest way is to change the To/Cc address > from 69822@debbugs.gnu.org to 69822-done@debbugs.gnu.org. Thanks, Basil. Closing... From unknown Tue Jun 17 01:35:39 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 21 Apr 2024 11:24:12 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator