From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 10 08:20:13 2021 Received: (at submit) by debbugs.gnu.org; 10 Feb 2021 13:20:13 +0000 Received: from localhost ([127.0.0.1]:55732 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l9pPf-0008As-S8 for submit@debbugs.gnu.org; Wed, 10 Feb 2021 08:20:13 -0500 Received: from lists.gnu.org ([209.51.188.17]:48476) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l9opP-0007GU-SP for submit@debbugs.gnu.org; Wed, 10 Feb 2021 07:42:46 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:45500) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l9opP-0000ol-D9 for bug-coreutils@gnu.org; Wed, 10 Feb 2021 07:42:43 -0500 Received: from relay.yourmailgateway.de ([46.38.247.118]:47605) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l9opM-0007m0-RC for bug-coreutils@gnu.org; Wed, 10 Feb 2021 07:42:43 -0500 Received: from mors-relay-8404.netcup.net (localhost [127.0.0.1]) by mors-relay-8404.netcup.net (Postfix) with ESMTPS id 4DbKCw5DXqz8nSv for ; Wed, 10 Feb 2021 13:42:36 +0100 (CET) Authentication-Results: mors-relay-8404.netcup.net; dkim=permerror (bad message/signature format) Received: from policy01-mors.netcup.net (unknown [46.38.225.35]) by mors-relay-8404.netcup.net (Postfix) with ESMTPS id 4DbKCw4s67z4x6r for ; Wed, 10 Feb 2021 13:42:36 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at policy01-mors.netcup.net X-Spam-Flag: NO X-Spam-Score: -2.4 X-Spam-Level: X-Spam-Status: No, score=-2.4 required=6.31 tests=[ALL_TRUSTED=-1, BAYES_00=-1.9, PDS_BTC_ID=0.499, URIBL_BLOCKED=0.001] autolearn=no autolearn_force=no Received: from mxe217.netcup.net (unknown [10.243.12.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by policy01-mors.netcup.net (Postfix) with ESMTPS id 4DbKCq0FVwz8sXD for ; Wed, 10 Feb 2021 13:42:30 +0100 (CET) Received: from [192.168.1.141] (ip5b420012.dynamic.kabel-deutschland.de [91.66.0.18]) by mxe217.netcup.net (Postfix) with ESMTPSA id 95FEF80272 for ; Wed, 10 Feb 2021 13:42:30 +0100 (CET) Message-ID: Subject: 'pr' screws up tabstops in multicolumn outpt? From: Leonard Janis Robert =?ISO-8859-1?Q?K=F6nig?= To: bug-coreutils@gnu.org Date: Wed, 10 Feb 2021 13:42:29 +0100 Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.3 (by Flathub.org) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-NC-CID: E+CzGy8cdjJ9zzBtVQuTcJhsQ2WLneI9NJRH8CU= Received-SPF: none client-ip=46.38.247.118; envelope-from=ljrk@ljrk.org; helo=relay.yourmailgateway.de X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, PDS_BTC_ID=0.498, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-0.001, SPF_NONE=0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.8 (-) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Wed, 10 Feb 2021 08:20:09 -0500 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.8 (--) I'm sorry if I this is not a bug but to be expected, but I thnk pr doesn't get the alignment of tabs in multicolumn output right. Consider the following test input, where everything from x->x is a tab (with tabs 8): 123456781234567812345678123456781 x x x x x 123456781234567812345678123456781 x x x x x Run it through multicolumn pr, e.g., pr -t -2 test > out The output looks like: 123456781234567812345678123456781 123456781234567812345678123456781 x x x x x x x x x x That is, the x's aren't aligned anymore. In contrast, on a SunOS 5.10 machine, I get: 123456781234567812345678123456781 123456781234567812345678123456781 x x x x x x x x Basically, SunOS pr notices, that it cannot print "\tx\tx\tx\tx" anymore, since the separation between the pages messed that up. Instead it prints "\t x\t x\t x\t x". This bug only occurs with certain page widths, obviously. A first workaround can be to use `-s` to separate both columns by tabs. Unfortunately, this only works as long as the line lengths actually allow for the next column to start at a multiple of 8. E.g., if I pass `-w 132` as well, this won't work again -- again, SunOS does the expected thing here. This seems *kind* of related to multi-column merged output, as was discussed some years ago here: https://lists.gnu.org/archive/html/bug-coreutils/2007-03/msg00121.html Unfortunately the POSIX spec is, in my reading, a bit unclear here. But I think the behavior of GNU/pr is rather unexpected when printing multicolumn source code and not in line what the original authors intended. The outline of the fix would be to calculate the starting column position and then re-tab. In my case, I could workaround with the following for now: $ pr -e -t test | pr -t -2 > out What do you think? ~leo $ pr --version pr (GNU coreutils) 8.32 Copyright (C) 2020 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later . This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by Pete TerMaat and Roland Huebner. $ uname -a Linux hoopyfrood 5.10.14-arch1-1 #1 SMP PREEMPT Sun, 07 Feb 2021 22:42:17 +0000 x86_64 GNU/Linux From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 10 10:44:19 2021 Received: (at 46422) by debbugs.gnu.org; 10 Feb 2021 15:44:19 +0000 Received: from localhost ([127.0.0.1]:56934 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l9rf9-0005cQ-Jc for submit@debbugs.gnu.org; Wed, 10 Feb 2021 10:44:19 -0500 Received: from mailgw1.uni-kl.de ([131.246.120.220]:54735) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l9rf6-0005cF-SL for 46422@debbugs.gnu.org; Wed, 10 Feb 2021 10:44:18 -0500 Received: from sushi.unix-ag.uni-kl.de (sushi.unix-ag.uni-kl.de [IPv6:2001:638:208:ef34:0:ff:fe00:65]) by mailgw1.uni-kl.de (8.14.4/8.14.4/Debian-8+deb8u2) with ESMTP id 11AFiEsM193285 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 10 Feb 2021 16:44:15 +0100 Received: from sushi.unix-ag.uni-kl.de (ip6-localhost [IPv6:::1]) by sushi.unix-ag.uni-kl.de (8.14.4/8.14.4/Debian-4+deb7u1) with ESMTP id 11AFiEY7018779 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 10 Feb 2021 16:44:14 +0100 Received: (from auerswal@localhost) by sushi.unix-ag.uni-kl.de (8.14.4/8.14.4/Submit) id 11AFiEDW018777; Wed, 10 Feb 2021 16:44:14 +0100 Date: Wed, 10 Feb 2021 16:44:14 +0100 From: Erik Auerswald To: Leonard Janis Robert =?iso-8859-1?Q?K=F6nig?= Subject: Re: bug#46422: 'pr' screws up tabstops in multicolumn outpt? Message-ID: <20210210154414.GA2457@unix-ag.uni-kl.de> References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, hits=-0.501, tests=ALL_TRUSTED=-1, PDS_BTC_ID=0.498, URIBL_BLOCKED=0.001 X-Spam-Score: (-0.501) X-Spam-Flag: NO X-Spam-Score: -1.8 (-) X-Debbugs-Envelope-To: 46422 Cc: 46422@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: -2.8 (--) Hi, On Wed, Feb 10, 2021 at 01:42:29PM +0100, Leonard Janis Robert König wrote: > I'm sorry if I this is not a bug but to be expected, but I thnk pr > doesn't get the alignment of tabs in multicolumn output right. > > Consider the following test input, where everything from x->x is a tab > (with tabs 8): Email quoting disturbs the alignment with tabs, thus I omit those examples. > Run it through multicolumn pr, e.g., > > pr -t -2 test > out > > The output looks [garbled.] > [...] > In contrast, on a SunOS 5.10 machine, I get: > > 123456781234567812345678123456781 123456781234567812345678123456781 > x x x x x x x x This is lacking the first 'x', did you use a different input file? > Basically, SunOS pr notices, that it cannot print "\tx\tx\tx\tx" > anymore, since the separation between the pages messed that up. > Instead it prints "\t x\t x\t x\t x". You can work around the issue by using "expand" to change tabs into spaces before using "pr": $ expand test | pr -t -2 123456781234567812345678123456781 123456781234567812345678123456781 x x x x x x x x x x > [...] > This seems *kind* of related to multi-column merged > output, as was discussed some years ago here: > https://lists.gnu.org/archive/html/bug-coreutils/2007-03/msg00121.html Just keeping tabs for the second column cannot always work. > [...] > What do you think? It seems to me the approach of "expand"ing the tabs to spaces before using "pr" is the most general. Thanks, Erik -- Be water, my friend. -- Bruce Lee From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 10 11:06:55 2021 Received: (at 46422) by debbugs.gnu.org; 10 Feb 2021 16:06:55 +0000 Received: from localhost ([127.0.0.1]:56965 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l9s11-0008GM-9q for submit@debbugs.gnu.org; Wed, 10 Feb 2021 11:06:55 -0500 Received: from mailgw1.uni-kl.de ([131.246.120.220]:57978) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l9s0y-0008GC-Ac for 46422@debbugs.gnu.org; Wed, 10 Feb 2021 11:06:54 -0500 Received: from sushi.unix-ag.uni-kl.de (sushi.unix-ag.uni-kl.de [IPv6:2001:638:208:ef34:0:ff:fe00:65]) by mailgw1.uni-kl.de (8.14.4/8.14.4/Debian-8+deb8u2) with ESMTP id 11AG6ofJ012174 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 10 Feb 2021 17:06:50 +0100 Received: from sushi.unix-ag.uni-kl.de (ip6-localhost [IPv6:::1]) by sushi.unix-ag.uni-kl.de (8.14.4/8.14.4/Debian-4+deb7u1) with ESMTP id 11AG6nI3021581 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 10 Feb 2021 17:06:50 +0100 Received: (from auerswal@localhost) by sushi.unix-ag.uni-kl.de (8.14.4/8.14.4/Submit) id 11AG6nBG021580; Wed, 10 Feb 2021 17:06:49 +0100 Date: Wed, 10 Feb 2021 17:06:49 +0100 From: Erik Auerswald To: Leonard Janis Robert =?iso-8859-1?Q?K=F6nig?= Subject: Re: bug#46422: 'pr' screws up tabstops in multicolumn outpt? Message-ID: <20210210160649.GA20233@unix-ag.uni-kl.de> References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, hits=-0.999, tests=ALL_TRUSTED=-1,URIBL_BLOCKED=0.001 X-Spam-Score: (-0.999) X-Spam-Flag: NO X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 46422 Cc: 46422@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 (---) Hi, On Wed, Feb 10, 2021 at 01:42:29PM +0100, Leonard Janis Robert König wrote: > I'm sorry if I this is not a bug but to be expected, but I thnk pr > doesn't get the alignment of tabs in multicolumn output right. > [...] > Unfortunately the POSIX spec is, in my reading, a bit unclear here. I do not think so: -column Produce multi-column output that is arranged in column columns[...]. The options -e and -i shall be assumed for multiple text-column output. -e[char][gap] Expand each input to the next greater column position[...]. -i[char][gap] In output, replace multiple s with s wherever[...]. https://pubs.opengroup.org/onlinepubs/009695399/utilities/pr.html https://pubs.opengroup.org/onlinepubs/9699919799/utilities/pr.html The way I read the POSIX spec, "pr" needs to account for the column separation by adjusting whitespace while still using tab characters in the output. > But I think the behavior of GNU/pr is rather unexpected when printing > multicolumn source code and not in line what the original authors > intended. I concur. Thanks, Erik -- [M]ost parts of this industry just work by chance. -- Thomas Gleixner From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 10 11:38:19 2021 Received: (at 46422) by debbugs.gnu.org; 10 Feb 2021 16:38:19 +0000 Received: from localhost ([127.0.0.1]:57006 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l9sVO-0000af-5Z for submit@debbugs.gnu.org; Wed, 10 Feb 2021 11:38:19 -0500 Received: from relay.yourmailgateway.de ([188.68.63.173]:53137) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l9s4V-0008Lq-VY for 46422@debbugs.gnu.org; Wed, 10 Feb 2021 11:10:35 -0500 Received: from mors-relay8204.netcup.net (localhost [127.0.0.1]) by mors-relay8204.netcup.net (Postfix) with ESMTPS id 4DbPql6vNmz8cVk; Wed, 10 Feb 2021 16:10:27 +0000 (UTC) Authentication-Results: mors-relay8204.netcup.net; dkim=permerror (bad message/signature format) Received: from policy02-mors.netcup.net (unknown [46.38.225.35]) by mors-relay8204.netcup.net (Postfix) with ESMTPS id 4DbPql6W4pz8cVF; Wed, 10 Feb 2021 16:10:27 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at policy02-mors.netcup.net X-Spam-Flag: NO X-Spam-Score: -2.899 X-Spam-Level: X-Spam-Status: No, score=-2.899 required=6.31 tests=[ALL_TRUSTED=-1, BAYES_00=-1.9, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no Received: from mxe217.netcup.net (unknown [10.243.12.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by policy02-mors.netcup.net (Postfix) with ESMTPS id 4DbPql1W6nz8scj; Wed, 10 Feb 2021 17:10:26 +0100 (CET) Received: from [192.168.1.141] (ip5b420012.dynamic.kabel-deutschland.de [91.66.0.18]) by mxe217.netcup.net (Postfix) with ESMTPSA id 06AAE805CA; Wed, 10 Feb 2021 17:10:24 +0100 (CET) Message-ID: <05dd3db670086fd5613ff6661b29826df9419015.camel@ljrk.org> Subject: Re: bug#46422: 'pr' screws up tabstops in multicolumn outpt? From: Leonard Janis Robert =?ISO-8859-1?Q?K=F6nig?= To: Erik Auerswald Date: Wed, 10 Feb 2021 17:10:23 +0100 In-Reply-To: <20210210154414.GA2457@unix-ag.uni-kl.de> References: <20210210154414.GA2457@unix-ag.uni-kl.de> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.3 (by Flathub.org) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-NC-CID: L/004H7sgt+tVJ9mgiSL9wZB5VEwFMELpEizqno= X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 46422 X-Mailman-Approved-At: Wed, 10 Feb 2021 11:38:17 -0500 Cc: 46422@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.5 (/) Hi, On Wed, 2021-02-10 at 16:44 +0100, Erik Auerswald wrote: > Hi, > > On Wed, Feb 10, 2021 at 01:42:29PM +0100, Leonard Janis Robert König > wrote: > > I'm sorry if I this is not a bug but to be expected, but I thnk pr > > doesn't get the alignment of tabs in multicolumn output right. > > > > Consider the following test input, where everything from x->x is a > > tab > > (with tabs 8): > > Email quoting disturbs the alignment with tabs, thus I omit those > examples. > > > Run it through multicolumn pr, e.g., > > > >     pr -t -2 test > out > > > > The output looks [garbled.] > > [...] > > In contrast, on a SunOS 5.10 machine, I get: > > > > 123456781234567812345678123456781   > > 123456781234567812345678123456781 > >         x       x       x       x           x       x       x       > > x > > This is lacking the first 'x', did you use a different input file? Yes, my bad, I toyed around a bit. The result, with the same input file, is as I described: 123456781234567812345678123456781 123456781234567812345678123456781 x x x x x x x x x x > > > Basically, SunOS pr notices, that it cannot print "\tx\tx\tx\tx" > > anymore, since the separation between the pages messed that up. > > Instead it prints "\t     x\t     x\t     x\t     x". > > You can work around the issue by using "expand" to change tabs into > spaces before using "pr": > > $ expand test | pr -t -2 > 123456781234567812345678123456781   123456781234567812345678123456781 > x       x       x       x       x   x       x       x       x       x > > > [...] > > This seems *kind* of related to multi-column merged > > output, as was discussed some years ago here: > > > > https://lists.gnu.org/archive/html/bug-coreutils/2007-03/msg00121.html > > Just keeping tabs for the second column cannot always work. But that seems to be what GNU pr tries to do. > > [...] > > What do you think? > > It seems to me the approach of "expand"ing the tabs to spaces before > using > "pr" is the most general It is indeed the most general approach, but this would be quite a caveat for anyone who prints tabbed source code in a multicolumn format, where the columns do not happen to be starting at n*8 characters. I could confirm that FreeBSD does mirror the SunOS behavior as well. ~ leo From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 10 13:32:01 2021 Received: (at 46422) by debbugs.gnu.org; 10 Feb 2021 18:32:02 +0000 Received: from localhost ([127.0.0.1]:57216 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l9uHQ-0003SX-Tw for submit@debbugs.gnu.org; Wed, 10 Feb 2021 13:32:01 -0500 Received: from relay.yourmailgateway.de ([188.68.63.161]:47555) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l9uHO-0003SM-4d for 46422@debbugs.gnu.org; Wed, 10 Feb 2021 13:32:00 -0500 Received: from mors-relay-8201.netcup.net (localhost [127.0.0.1]) by mors-relay-8201.netcup.net (Postfix) with ESMTPS id 4DbSyy5s4nz4h81 for <46422@debbugs.gnu.org>; Wed, 10 Feb 2021 19:31:54 +0100 (CET) Authentication-Results: mors-relay-8201.netcup.net; dkim=permerror (bad message/signature format) Received: from policy02-mors.netcup.net (unknown [46.38.225.35]) by mors-relay-8201.netcup.net (Postfix) with ESMTPS id 4DbSyy5TsXz4h7y for <46422@debbugs.gnu.org>; Wed, 10 Feb 2021 19:31:54 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at policy02-mors.netcup.net X-Spam-Flag: NO X-Spam-Score: -1.878 X-Spam-Level: X-Spam-Status: No, score=-1.878 required=6.31 tests=[ALL_TRUSTED=-1, BAYES_00=-1.9, MISSING_HEADERS=1.021, URIBL_BLOCKED=0.001] autolearn=no autolearn_force=no Received: from mxe217.netcup.net (unknown [10.243.12.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by policy02-mors.netcup.net (Postfix) with ESMTPS id 4DbSyx0yZ5z8scj for <46422@debbugs.gnu.org>; Wed, 10 Feb 2021 19:31:52 +0100 (CET) Received: from [192.168.1.141] (ip5b420012.dynamic.kabel-deutschland.de [91.66.0.18]) by mxe217.netcup.net (Postfix) with ESMTPSA id 5883F7FE2B for <46422@debbugs.gnu.org>; Wed, 10 Feb 2021 19:31:52 +0100 (CET) Message-ID: <06a1b5e816d7d61fdd710f5e6bc74857c81e2c9d.camel@ljrk.org> Subject: Re: bug#46422: 'pr' screws up tabstops in multicolumn outpt? From: Leonard Janis Robert =?ISO-8859-1?Q?K=F6nig?= Date: Wed, 10 Feb 2021 19:31:49 +0100 In-Reply-To: <20210210160649.GA20233@unix-ag.uni-kl.de> References: <20210210160649.GA20233@unix-ag.uni-kl.de> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.3 (by Flathub.org) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-NC-CID: GaUhZDWk5su63IEw9mip2BL4uPxg5EetE5z1zyk= X-Spam-Score: 1.7 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On Wed, 2021-02-10 at 17:06 +0100, Erik Auerswald wrote: > Hi, > > On Wed, Feb 10, 2021 at 01:42:29PM +0100, Leonard Janis Robert König > wrote: > > I'm sorry if I this is not a bug but to be expecte [...] Content analysis details: (1.7 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [188.68.63.161 listed in list.dnswl.org] 0.0 SPF_NONE SPF: sender does not publish an SPF Record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 1.2 MISSING_HEADERS Missing To: header 0.5 PDS_BTC_ID FP reduced Bitcoin ID X-Debbugs-Envelope-To: 46422 Cc: 46422@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.7 (/) On Wed, 2021-02-10 at 17:06 +0100, Erik Auerswald wrote: > Hi, > > On Wed, Feb 10, 2021 at 01:42:29PM +0100, Leonard Janis Robert König > wrote: > > I'm sorry if I this is not a bug but to be expected, but I thnk pr > > doesn't get the alignment of tabs in multicolumn output right. > > [...] > > Unfortunately the POSIX spec is, in my reading, a bit unclear here. > > I do not think so: > > -column > Produce multi-column output that is arranged in column > columns[...]. > The options -e and -i shall be assumed for multiple text-column > output. > > -e[char][gap] > Expand each input to the next greater column position[...]. > > -i[char][gap] > In output, replace multiple s with s wherever[...]. > > https://pubs.opengroup.org/onlinepubs/009695399/utilities/pr.html > https://pubs.opengroup.org/onlinepubs/9699919799/utilities/pr.html > > The way I read the POSIX spec, "pr" needs to account for the column > separation by adjusting whitespace while still using tab characters > in > the output. What's unclear however, whether this adjusting whitespace (replacing space by tab, as is the default) should happen on input or after arranging the text into columns. The former produces something resembling the GNU output as the tabs in the input files are kept, despite not aligning to 8 characters anymore. The latter produces the SunOS/FreeBSD output, as first the text is arranged and then tabs recalculated. > > But I think the behavior of GNU/pr is rather unexpected when > > printing > > multicolumn source code and not in line what the original authors > > intended. > > I concur. This makes tabs as input while using column or merge basically unusable though, as the characters are completely misaligned. This is especially bad for code. My use case is a script that prints the UNIX v6 source code in fashion of John Lion (see v6.cuzoco.com) and it breaks under GNU pr, but not on BSD, Solaris. And it seems to have worked also on Amdahl UTS in the late 80s for that matter. With regards to the original intent, I just tested this on Research UNIX v6 with SIMH (https://gunkies.org/wiki/Installing_Unix_v6_(PDP-11)_on_SIMH), and indeed the output is like the SunOS and FreeBSD version do: # pr -t -2 foo 123456781234567812345678123456781 123456781234567812345678123456781 x x x x x x x x x x N.B. that the input file must be little longer since the original version didn't produce identical vertical lengths as is allowed as per the standard: > Whether or not text columns are produced with identical vertical > lengths is unspecified [...] . At least to me this behavior of GNU pr came as a big surprise, maybe this should be described in the FAQ/Gotchas or the BUGS section of the manual? ~ leo From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 11 07:00:32 2021 Received: (at 46422) by debbugs.gnu.org; 11 Feb 2021 12:00:32 +0000 Received: from localhost ([127.0.0.1]:57954 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lAAe8-0001cZ-0J for submit@debbugs.gnu.org; Thu, 11 Feb 2021 07:00:32 -0500 Received: from mailgw1.uni-kl.de ([131.246.120.220]:42398) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lAAe5-0001cQ-MO for 46422@debbugs.gnu.org; Thu, 11 Feb 2021 07:00:30 -0500 Received: from sushi.unix-ag.uni-kl.de (sushi.unix-ag.uni-kl.de [IPv6:2001:638:208:ef34:0:ff:fe00:65]) by mailgw1.uni-kl.de (8.14.4/8.14.4/Debian-8+deb8u2) with ESMTP id 11BC0R6L096670 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 11 Feb 2021 13:00:27 +0100 Received: from sushi.unix-ag.uni-kl.de (ip6-localhost [IPv6:::1]) by sushi.unix-ag.uni-kl.de (8.14.4/8.14.4/Debian-4+deb7u1) with ESMTP id 11BC0RKS002260 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 11 Feb 2021 13:00:27 +0100 Received: (from auerswal@localhost) by sushi.unix-ag.uni-kl.de (8.14.4/8.14.4/Submit) id 11BC0RQt002257; Thu, 11 Feb 2021 13:00:27 +0100 Date: Thu, 11 Feb 2021 13:00:27 +0100 From: Erik Auerswald To: Leonard Janis Robert =?iso-8859-1?Q?K=F6nig?= Subject: Re: bug#46422: 'pr' screws up tabstops in multicolumn outpt? Message-ID: <20210211120027.GA722@unix-ag.uni-kl.de> References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, hits=-1, tests=ALL_TRUSTED=-1 X-Spam-Score: (-1) X-Spam-Flag: NO X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 46422 Cc: 46422@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 (---) Hi, On Wed, Feb 10, 2021 at 01:42:29PM +0100, Leonard Janis Robert König wrote: > I'm sorry if I this is not a bug but to be expected, but I thnk pr > doesn't get the alignment of tabs in multicolumn output right. > [...] > This seems *kind* of related to multi-column merged output, as was > discussed some years ago here: > https://lists.gnu.org/archive/html/bug-coreutils/2007-03/msg00121.html This thread contains the bug-introducing patch in message https://lists.gnu.org/archive/html/bug-coreutils/2007-03/msg00160.html This is commit 553d347d3e08e00ee4f9df520b37c964c3f26e28. That commit removed the 'assume -e' part of the POSIX description of the -COLUMN option from GNU pr. Reverting this patch (i.e., adding the one deleted line back to pr.c) fixes *this* bug, but then re-introduces the bug reported in 2007, i.e., sub-test 'merge-w-tabs' of test 'pr-tests.pl' fails. Thanks, Erik -- If it ain't broke, don't fix it. From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 11 12:09:36 2021 Received: (at 46422) by debbugs.gnu.org; 11 Feb 2021 17:09:36 +0000 Received: from localhost ([127.0.0.1]:59222 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lAFTD-00075k-Rs for submit@debbugs.gnu.org; Thu, 11 Feb 2021 12:09:36 -0500 Received: from relay.yourmailgateway.de ([194.59.204.23]:40377) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lAFTB-00075b-L4 for 46422@debbugs.gnu.org; Thu, 11 Feb 2021 12:09:34 -0500 Received: from relay02-mors.netcup.net (localhost [127.0.0.1]) by relay02-mors.netcup.net (Postfix) with ESMTPS id 4Dc35S0lsRz4L8r; Thu, 11 Feb 2021 18:09:32 +0100 (CET) Authentication-Results: relay02-mors.netcup.net; dkim=permerror (bad message/signature format) Received: from policy01-mors.netcup.net (unknown [46.38.225.35]) by relay02-mors.netcup.net (Postfix) with ESMTPS id 4Dc35S0MJJz7tdJ; Thu, 11 Feb 2021 18:09:32 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at policy01-mors.netcup.net X-Spam-Flag: NO X-Spam-Score: -1 X-Spam-Level: X-Spam-Status: No, score=-1 required=6.31 tests=[ALL_TRUSTED=-1, BAYES_20=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no Received: from mxe217.netcup.net (unknown [10.243.12.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by policy01-mors.netcup.net (Postfix) with ESMTPS id 4Dc35R2SCQz8sZ9; Thu, 11 Feb 2021 18:09:31 +0100 (CET) Received: from [192.168.1.113] (ip5b420012.dynamic.kabel-deutschland.de [91.66.0.18]) by mxe217.netcup.net (Postfix) with ESMTPSA id CFEC5806BD; Thu, 11 Feb 2021 18:09:29 +0100 (CET) Message-ID: <326ad1d11d8bbcf9a22ef572bb7f2cdfab13a6e5.camel@ljrk.org> Subject: Re: bug#46422: 'pr' screws up tabstops in multicolumn outpt? From: Leonard Janis Robert =?ISO-8859-1?Q?K=F6nig?= To: Erik Auerswald Date: Thu, 11 Feb 2021 18:09:28 +0100 In-Reply-To: <20210211154546.GA31693@unix-ag.uni-kl.de> References: <20210211120027.GA722@unix-ag.uni-kl.de> <20210211154546.GA31693@unix-ag.uni-kl.de> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.3 (by Flathub.org) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-NC-CID: e7Zg/v9odx3aEU5D3gDTjatX1S7NjIgBnSrDXcw= X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 46422 Cc: 46422@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: -1.0 (-) Hi, On Thu, 2021-02-11 at 16:45 +0100, Erik Auerswald wrote: > Hi, > > On Thu, Feb 11, 2021 at 04:12:54PM +0100, Leonard Janis Robert König > wrote: > > On Thu, 2021-02-11 at 13:00 +0100, Erik Auerswald wrote: > > > On Wed, Feb 10, 2021 at 01:42:29PM +0100, Leonard Janis Robert > > > König > > > wrote: > > > > I'm sorry if I this is not a bug but to be expected, but I thnk > > > > pr > > > > doesn't get the alignment of tabs in multicolumn output right. > > > > [...] > > > > This seems *kind* of related to multi-column merged output, as > > > > was > > > > discussed some years ago here: > > > > https://lists.gnu.org/archive/html/bug-coreutils/2007-03/msg00121.html > > > > > > This thread contains the bug-introducing patch in message > > > https://lists.gnu.org/archive/html/bug-coreutils/2007-03/msg00160.html > > > > > > This is commit 553d347d3e08e00ee4f9df520b37c964c3f26e28. > > > > ah, thanks for digging, I read the message but must have missed > > the patch. > > > > > That commit removed the 'assume -e' part of the POSIX description > > > of the -COLUMN option from GNU pr. > > > > Which is definitely against POSIX yeah.  The problem however, is > > not > > POSIX, but that the test case would succeed on a POSIX confirming > > implementation, despite -e being assumed.  The process should be: > > > > 1. read in while untabify input (-i) > > 2. write out while (re-)tabify output (-e) > > The options are the other way around: -e expands tabs while reading > input, > -i unexpands spaces on output. Ah, yes, but the same thought applies. > Your test case requires expanding tabs > during input, which is the reason that "expand | pr" could be used as > a > workaround (with "expand | pr | unexpand", pr would not need to mess > with > tabs at all, but I do think that GNU pr is currently buggy and should > be fixed). Absolutely, expand would be a workaround (I happen to use `pr -e | pr` in my script, for other reasons). I've looked a bit further through the code but there's hardly a single place that needs to be touched in order to not introduce other bugs again. For now I can only put it on my to-do list to fix, but no idea when I get around doing it. ~leo > P.S. Feel free to re-add the bug tracker / list email address if you > like. P.P.S: Yeah, I should configure my mailer to warn if I don't answer everyone. From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 11 14:20:11 2021 Received: (at 46422) by debbugs.gnu.org; 11 Feb 2021 19:20:11 +0000 Received: from localhost ([127.0.0.1]:59285 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lAHVa-0003kX-Qk for submit@debbugs.gnu.org; Thu, 11 Feb 2021 14:20:11 -0500 Received: from mailgw1.uni-kl.de ([131.246.120.220]:58518) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lAHVX-0003kK-Sy for 46422@debbugs.gnu.org; Thu, 11 Feb 2021 14:20:09 -0500 Received: from sushi.unix-ag.uni-kl.de (sushi.unix-ag.uni-kl.de [IPv6:2001:638:208:ef34:0:ff:fe00:65]) by mailgw1.uni-kl.de (8.14.4/8.14.4/Debian-8+deb8u2) with ESMTP id 11BJK5jh196200 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 11 Feb 2021 20:20:06 +0100 Received: from sushi.unix-ag.uni-kl.de (ip6-localhost [IPv6:::1]) by sushi.unix-ag.uni-kl.de (8.14.4/8.14.4/Debian-4+deb7u1) with ESMTP id 11BJK5jA027605 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 11 Feb 2021 20:20:05 +0100 Received: (from auerswal@localhost) by sushi.unix-ag.uni-kl.de (8.14.4/8.14.4/Submit) id 11BJK5wT027604; Thu, 11 Feb 2021 20:20:05 +0100 Date: Thu, 11 Feb 2021 20:20:05 +0100 From: Erik Auerswald To: Leonard Janis Robert =?iso-8859-1?Q?K=F6nig?= Subject: Re: bug#46422: 'pr' screws up tabstops in multicolumn outpt? Message-ID: <20210211192005.GA25500@unix-ag.uni-kl.de> References: <20210211120027.GA722@unix-ag.uni-kl.de> <20210211154546.GA31693@unix-ag.uni-kl.de> <326ad1d11d8bbcf9a22ef572bb7f2cdfab13a6e5.camel@ljrk.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <326ad1d11d8bbcf9a22ef572bb7f2cdfab13a6e5.camel@ljrk.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, hits=-1, tests=ALL_TRUSTED=-1 X-Spam-Score: (-1) X-Spam-Flag: NO X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 46422 Cc: 46422@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 (---) Hi, On Thu, Feb 11, 2021 at 06:09:28PM +0100, Leonard Janis Robert König wrote: > On Thu, 2021-02-11 at 16:45 +0100, Erik Auerswald wrote: > > On Thu, Feb 11, 2021 at 04:12:54PM +0100, Leonard Janis Robert > > König wrote: > > > On Thu, 2021-02-11 at 13:00 +0100, Erik Auerswald wrote: > > > > On Wed, Feb 10, 2021 at 01:42:29PM +0100, Leonard Janis Robert > > > > König wrote: > > > > > I'm sorry if I this is not a bug but to be expected, but I thnk > > > > > pr doesn't get the alignment of tabs in multicolumn output > > > > > right. [...] This seems *kind* of related to multi-column > > > > > merged output, as was discussed some years ago here: > > > > > https://lists.gnu.org/archive/html/bug-coreutils/2007-03/msg00121.html > > > > > > > > This thread contains the bug-introducing patch in message > > > > https://lists.gnu.org/archive/html/bug-coreutils/2007-03/msg00160.html > > > > > > > > This is commit 553d347d3e08e00ee4f9df520b37c964c3f26e28. > > > > > > ah, thanks for digging, I read the message but must have missed > > > the patch. > > > > > > > That commit removed the 'assume -e' part of the POSIX description > > > > of the -COLUMN option from GNU pr. > > > [...] > > Your test case requires expanding tabs during input, which is > > the reason that "expand | pr" could be used as a workaround (with > > "expand | pr | unexpand", pr would not need to mess with tabs at all, > > but I do think that GNU pr is currently buggy and should be fixed). > > Absolutely, expand would be a workaround (I happen to use `pr -e | pr` > in my script, for other reasons). > > I've looked a bit further through the code but there's hardly a single > place that needs to be touched in order to not introduce other bugs > again. For now I can only put it on my to-do list to fix, but no idea > when I get around doing it. I have found a fix to the problem described by you. I am quite sure that this is not *correct*, but I did not find a way to make print_sep_string() account for tabs that did not break quite a few existing tests, even if the merged files problem from 2007 and this columnating bug were both fixed. Thus I just tighten the 2007 bug fix to apply in less cases. This way all existing tests pass, and a new one pertaining to this bug report passes, too. I do think this is in the same spirit as the "fix" from 2007 (commit 553d347d3e08e00ee4f9df520b37c964c3f26e28). See the following inline patch: --------8<-------- diff --git a/src/pr.c b/src/pr.c index 22d032ba3..ad1e36769 100644 --- a/src/pr.c +++ b/src/pr.c @@ -1237,6 +1237,8 @@ init_parameters (int number_of_files) col_sep_string = column_separator; truncate_lines = true; + if (!parallel_files) + untabify_input = true; tabify_output = true; } else diff --git a/tests/pr/pr-tests.pl b/tests/pr/pr-tests.pl index b7d868cf8..0894d3804 100755 --- a/tests/pr/pr-tests.pl +++ b/tests/pr/pr-tests.pl @@ -474,6 +474,12 @@ push @Tests, {IN=>{2=>"a\n"}}, {OUT=>"a\t\t\t\t \t\t\ta\n"} ]; +# Exercise a bug with pr -t -2 (bug #46422) +push @Tests, + ['mcol-w-tabs', '-t -2', + {IN=>"x\tx\tx\tx\tx\nx\tx\tx\tx\tx\n"}, + {OUT=>"x\tx\tx\tx\tx x\t x\t x\t x\t x\n"} ]; + @Tests = triple_test \@Tests; my $save_temps = $ENV{DEBUG}; -------->8-------- It is up to the GNU Coreutils maintainers if they want to add this additional band-aid to the interesting 'pr' code or not. Adherents to test-driven development would probably like this approach. ;-) Thanks, Erik -- Bugs are like mushrooms - found one, look around for more... -- Al Viro From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 13 09:17:29 2021 Received: (at 46422) by debbugs.gnu.org; 13 Feb 2021 14:17:29 +0000 Received: from localhost ([127.0.0.1]:33871 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lAvjl-0003h6-1v for submit@debbugs.gnu.org; Sat, 13 Feb 2021 09:17:29 -0500 Received: from mailgw1.uni-kl.de ([131.246.120.220]:46553) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lAvjg-0003gt-6S for 46422@debbugs.gnu.org; Sat, 13 Feb 2021 09:17:27 -0500 Received: from [172.20.10.3] (dynamic-046-114-003-126.46.114.pool.telefonica.de [46.114.3.126]) (authenticated bits=0) by mailgw1.uni-kl.de (8.14.4/8.14.4/Debian-8+deb8u2) with ESMTP id 11DEHA6p025811 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 13 Feb 2021 15:17:21 +0100 Subject: [PATCH] Re: bug#46422: 'pr' screws up tabstops in multicolumn outpt? From: Erik Auerswald To: =?UTF-8?Q?Leonard_Janis_Robert_K=c3=b6nig?= References: <20210211120027.GA722@unix-ag.uni-kl.de> <20210211154546.GA31693@unix-ag.uni-kl.de> <326ad1d11d8bbcf9a22ef572bb7f2cdfab13a6e5.camel@ljrk.org> <20210211192005.GA25500@unix-ag.uni-kl.de> Message-ID: Date: Sat, 13 Feb 2021 15:17:08 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20210211192005.GA25500@unix-ag.uni-kl.de> Content-Type: multipart/mixed; boundary="------------171605EEF86888E786568F53" Content-Language: en-GB X-Spam-Status: No, hits=0.4, tests=KHOP_HELO_FCRDNS=0.399,URIBL_BLOCKED=0.001 X-Spam-Score: (0.4) X-Spam-Flag: NO X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 46422 Cc: 46422@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 (---) This is a multi-part message in MIME format. --------------171605EEF86888E786568F53 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit On 11.02.21 20:20, Erik Auerswald wrote: > On Thu, Feb 11, 2021 at 06:09:28PM +0100, Leonard Janis Robert König wrote: >> On Thu, 2021-02-11 at 16:45 +0100, Erik Auerswald wrote: >>> On Thu, Feb 11, 2021 at 04:12:54PM +0100, Leonard Janis Robert >>> König wrote: >>>> On Thu, 2021-02-11 at 13:00 +0100, Erik Auerswald wrote: >>>>> On Wed, Feb 10, 2021 at 01:42:29PM +0100, Leonard Janis Robert >>>>> König wrote: >>>>>> I'm sorry if I this is not a bug but to be expected, but I thnk >>>>>> pr doesn't get the alignment of tabs in multicolumn output >>>>>> right. [...] This seems *kind* of related to multi-column >>>>>> merged output, as was discussed some years ago here: >>>>>> https://lists.gnu.org/archive/html/bug-coreutils/2007-03/msg00121.html >>>>> >>>>> This thread contains the bug-introducing patch in message >>>>> https://lists.gnu.org/archive/html/bug-coreutils/2007-03/msg00160.html >>>>> >>>>> This is commit 553d347d3e08e00ee4f9df520b37c964c3f26e28. >>>> >>>> ah, thanks for digging, I read the message but must have missed >>>> the patch. >>>> >>>>> That commit removed the 'assume -e' part of the POSIX description >>>>> of the -COLUMN option from GNU pr. >>>> [...] >>> Your test case requires expanding tabs during input, which is >>> the reason that "expand | pr" could be used as a workaround (with >>> "expand | pr | unexpand", pr would not need to mess with tabs at all, >>> but I do think that GNU pr is currently buggy and should be fixed). >> >> Absolutely, expand would be a workaround (I happen to use `pr -e | pr` >> in my script, for other reasons). >> [...] > I have found a fix to the problem described by you. I am quite sure that > this is not *correct*, but I did not find a way to make print_sep_string() > account for tabs that did not break quite a few existing tests, even if > the merged files problem from 2007 and this columnating bug were both > fixed. Thus I just tighten the 2007 bug fix to apply in less cases. > This way all existing tests pass, and a new one pertaining to this bug > report passes, too. I do think this is in the same spirit as the "fix" > from 2007 (commit 553d347d3e08e00ee4f9df520b37c964c3f26e28). I think the attached patch is a better fix than my previous one, because it applies the special treatment of TAB as separator more consistently. It may still not be complete (the code seems quite convoluted to me) but I do think it improves the situation significantly, and does not make it worse. The code does not try to create equal width columns when using a TAB as column separator. This is made clear through comments: 1018 /* Tabification is assumed for multiple columns. */ ... 1031 /* It's rather pointless to define a TAB separator with column 1032 alignment */ Thus the intent of the code seems to be follow the general idea of using equal width columns by "assuming Tabification," i.e., working as if the options -e and -i were given, as specified by POSIX, unless the column separator has been changed to a TAB. The attached patch results in following through with this in more cases, fixing this bug (bug#46422) without introducing known regressions. The patch adds more test cases. One identical to the new test from my previous patch, another generalizes the case from 2007 to use '-2 -s' to trigger special treatment with TAB as separator. Creating three column output as done in the bug report from 2007 automatically aligns the columns with the default TAB stops of pr, thus the patch adds another variant of the 2007 case merging two files. Merging files (-m) is done with a slightly different code path from -NUMBER, while both create columns. I'd like to ask the GNU Coreutils maintainers to consider merging the attached patch. Thanks, Erik --------------171605EEF86888E786568F53 Content-Type: text/x-patch; charset=UTF-8; name="coreutils-pr-fix_bug_46422.v2.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="coreutils-pr-fix_bug_46422.v2.patch" diff --git a/src/pr.c b/src/pr.c index 22d032ba3..d518b81ab 100644 --- a/src/pr.c +++ b/src/pr.c @@ -1226,7 +1226,10 @@ init_parameters (int number_of_files) if (join_lines) col_sep_string = line_separator; else - col_sep_string = column_separator; + { + col_sep_string = column_separator; + untabify_input = true; + } col_sep_length = 1; use_col_separator = true; diff --git a/tests/pr/pr-tests.pl b/tests/pr/pr-tests.pl index b7d868cf8..ed5c61dc9 100755 --- a/tests/pr/pr-tests.pl +++ b/tests/pr/pr-tests.pl @@ -467,6 +467,14 @@ push @Tests, {IN=>{3=>"x\ty\tz\n"}}, {OUT=>join("\t", qw(a b c m n o x y z)) . "\n"} ]; +# Exercise a variant of the bug with pr -m -s (commit 553d347) +# test 2 files, too (merging 3 files automatically aligns columns on TAB stops) +push @Tests, + ['merge-2-w-tabs', '-m -s -t', + {IN=>{1=>"a\tb\tc\n"}}, + {IN=>{2=>"m\tn\to\n"}}, + {OUT=>join("\t", qw(a b c m n o)) . "\n"} ]; + # This resulted in reading invalid memory before coreutils-8.26 push @Tests, ['asan1', "-m -S'\t\t\t' -t", @@ -474,6 +482,18 @@ push @Tests, {IN=>{2=>"a\n"}}, {OUT=>"a\t\t\t\t \t\t\ta\n"} ]; +# Exercise a bug with pr -t -2 (bug #46422) +push @Tests, + ['mcol-w-tabs', '-t -2', + {IN=>"x\tx\tx\tx\tx\nx\tx\tx\tx\tx\n"}, + {OUT=>"x\tx\tx\tx\tx x\t x\t x\t x\t x\n"} ]; + +# generalize case from commit 553d347 (problem results from -s, not -m) +push @Tests, + ['mcol-w-tabs-w-tabsep', '-t -2 -s', + {IN=>"x\tx\tx\tx\tx\nx\tx\tx\tx\tx\n"}, + {OUT=>"x\tx\tx\tx\tx\tx\tx\tx\tx\tx\n"} ]; + @Tests = triple_test \@Tests; my $save_temps = $ENV{DEBUG}; --------------171605EEF86888E786568F53-- From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 13 11:58:51 2021 Received: (at 46422) by debbugs.gnu.org; 13 Feb 2021 16:58:51 +0000 Received: from localhost ([127.0.0.1]:34971 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lAyFv-0007su-91 for submit@debbugs.gnu.org; Sat, 13 Feb 2021 11:58:51 -0500 Received: from mailgw1.uni-kl.de ([131.246.120.220]:58688) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lAyFs-0007sl-B7 for 46422@debbugs.gnu.org; Sat, 13 Feb 2021 11:58:49 -0500 Received: from [172.20.10.3] (dynamic-046-114-003-126.46.114.pool.telefonica.de [46.114.3.126]) (authenticated bits=0) by mailgw1.uni-kl.de (8.14.4/8.14.4/Debian-8+deb8u2) with ESMTP id 11DGwYVe112060 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 13 Feb 2021 17:58:46 +0100 Subject: Re: bug#46422: [PATCH] Re: bug#46422: 'pr' screws up tabstops in multicolumn outpt? From: Erik Auerswald To: =?UTF-8?Q?Leonard_Janis_Robert_K=c3=b6nig?= References: <20210211120027.GA722@unix-ag.uni-kl.de> <20210211154546.GA31693@unix-ag.uni-kl.de> <326ad1d11d8bbcf9a22ef572bb7f2cdfab13a6e5.camel@ljrk.org> <20210211192005.GA25500@unix-ag.uni-kl.de> Message-ID: <19f17160-6644-5e6b-218c-58c478f3e88e@unix-ag.uni-kl.de> Date: Sat, 13 Feb 2021 17:58:33 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/mixed; boundary="------------C62FE2B581A56A97FE43BCCD" Content-Language: en-GB X-Spam-Status: No, hits=0.281, tests=KHOP_HELO_FCRDNS=0.399, NICE_REPLY_A=-0.119, URIBL_BLOCKED=0.001 X-Spam-Score: (0.281) X-Spam-Flag: NO X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 46422 Cc: 46422@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 (---) This is a multi-part message in MIME format. --------------C62FE2B581A56A97FE43BCCD Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Hi, On 13.02.21 15:17, Erik Auerswald wrote: > On 11.02.21 20:20, Erik Auerswald wrote: >> On Thu, Feb 11, 2021 at 06:09:28PM +0100, Leonard Janis Robert König >> wrote: >>> On Thu, 2021-02-11 at 16:45 +0100, Erik Auerswald wrote: >>>> On Thu, Feb 11, 2021 at 04:12:54PM +0100, Leonard Janis Robert >>>> König wrote: >>>>> On Thu, 2021-02-11 at 13:00 +0100, Erik Auerswald wrote: >>>>>> On Wed, Feb 10, 2021 at 01:42:29PM +0100, Leonard Janis Robert >>>>>> König wrote: >>>>>>> I'm sorry if I this is not a bug but to be expected, but I thnk >>>>>>> pr doesn't get the alignment of tabs in multicolumn output >>>>>>> right.  [...]  This seems *kind* of related to multi-column >>>>>>> merged output, as was discussed some years ago here: >>>>>>> https://lists.gnu.org/archive/html/bug-coreutils/2007-03/msg00121.html >>>>>>> >>>>>> >>>>>> This thread contains the bug-introducing patch in message >>>>>> https://lists.gnu.org/archive/html/bug-coreutils/2007-03/msg00160.html >>>>>> >>>>>> >>>>>> This is commit 553d347d3e08e00ee4f9df520b37c964c3f26e28. >>>>> >>>>> ah, thanks for digging, I read the message but must have missed >>>>> the patch. >>>>> >>>>>> That commit removed the 'assume -e' part of the POSIX description >>>>>> of the -COLUMN option from GNU pr. >>>>> [...] >>>> Your test case requires expanding tabs during input, which is >>>> the reason that "expand | pr" could be used as a workaround (with >>>> "expand | pr | unexpand", pr would not need to mess with tabs at all, >>>> but I do think that GNU pr is currently buggy and should be fixed). >>> >>> Absolutely, expand would be a workaround (I happen to use `pr -e | pr` >>> in my script, for other reasons). >>> [...] >> I have found a fix to the problem described by you.  I am quite sure that >> this is not *correct*, but I did not find a way to make >> print_sep_string() >> account for tabs that did not break quite a few existing tests, even if >> the merged files problem from 2007 and this columnating bug were both >> fixed.  Thus I just tighten the 2007 bug fix to apply in less cases. >> This way all existing tests pass, and a new one pertaining to this bug >> report passes, too.  I do think this is in the same spirit as the "fix" >> from 2007 (commit 553d347d3e08e00ee4f9df520b37c964c3f26e28). > > I think the attached patch is a better fix than my previous one, > because it applies the special treatment of TAB as separator more > consistently.  It may still not be complete (the code seems quite > convoluted to me) but I do think it improves the situation > significantly, and does not make it worse. It seems to me as if "untabify_input = true;" should be re-introduced in one additional place to fix the regression from commit 553d347, please see the attached patch version 3. > I'd like to ask the GNU Coreutils maintainers to consider merging > the attached patch. The latest version, i.e., v3 for now. Thanks, Erik --------------C62FE2B581A56A97FE43BCCD Content-Type: text/x-patch; charset=UTF-8; name="coreutils-pr-fix_bug_46422.v3.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="coreutils-pr-fix_bug_46422.v3.patch" diff --git a/src/pr.c b/src/pr.c index 22d032ba3..e193d632c 100644 --- a/src/pr.c +++ b/src/pr.c @@ -1226,7 +1226,10 @@ init_parameters (int number_of_files) if (join_lines) col_sep_string = line_separator; else - col_sep_string = column_separator; + { + col_sep_string = column_separator; + untabify_input = true; + } col_sep_length = 1; use_col_separator = true; @@ -1235,6 +1238,8 @@ init_parameters (int number_of_files) alignment */ else if (!join_lines && col_sep_length == 1 && *col_sep_string == '\t') col_sep_string = column_separator; + else + untabify_input = true; truncate_lines = true; tabify_output = true; diff --git a/tests/pr/pr-tests.pl b/tests/pr/pr-tests.pl index b7d868cf8..ed5c61dc9 100755 --- a/tests/pr/pr-tests.pl +++ b/tests/pr/pr-tests.pl @@ -467,6 +467,14 @@ push @Tests, {IN=>{3=>"x\ty\tz\n"}}, {OUT=>join("\t", qw(a b c m n o x y z)) . "\n"} ]; +# Exercise a variant of the bug with pr -m -s (commit 553d347) +# test 2 files, too (merging 3 files automatically aligns columns on TAB stops) +push @Tests, + ['merge-2-w-tabs', '-m -s -t', + {IN=>{1=>"a\tb\tc\n"}}, + {IN=>{2=>"m\tn\to\n"}}, + {OUT=>join("\t", qw(a b c m n o)) . "\n"} ]; + # This resulted in reading invalid memory before coreutils-8.26 push @Tests, ['asan1', "-m -S'\t\t\t' -t", @@ -474,6 +482,18 @@ push @Tests, {IN=>{2=>"a\n"}}, {OUT=>"a\t\t\t\t \t\t\ta\n"} ]; +# Exercise a bug with pr -t -2 (bug #46422) +push @Tests, + ['mcol-w-tabs', '-t -2', + {IN=>"x\tx\tx\tx\tx\nx\tx\tx\tx\tx\n"}, + {OUT=>"x\tx\tx\tx\tx x\t x\t x\t x\t x\n"} ]; + +# generalize case from commit 553d347 (problem results from -s, not -m) +push @Tests, + ['mcol-w-tabs-w-tabsep', '-t -2 -s', + {IN=>"x\tx\tx\tx\tx\nx\tx\tx\tx\tx\n"}, + {OUT=>"x\tx\tx\tx\tx\tx\tx\tx\tx\tx\n"} ]; + @Tests = triple_test \@Tests; my $save_temps = $ENV{DEBUG}; --------------C62FE2B581A56A97FE43BCCD-- From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 13 13:29:54 2021 Received: (at 46422) by debbugs.gnu.org; 13 Feb 2021 18:29:54 +0000 Received: from localhost ([127.0.0.1]:35031 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lAzg2-0001dt-BK for submit@debbugs.gnu.org; Sat, 13 Feb 2021 13:29:54 -0500 Received: from relay.yourmailgateway.de ([188.68.63.161]:44589) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lAzfz-0001di-1o for 46422@debbugs.gnu.org; Sat, 13 Feb 2021 13:29:52 -0500 Received: from mors-relay-8201.netcup.net (localhost [127.0.0.1]) by mors-relay-8201.netcup.net (Postfix) with ESMTPS id 4DdJn935lyz4X3x; Sat, 13 Feb 2021 19:29:49 +0100 (CET) Authentication-Results: mors-relay-8201.netcup.net; dkim=permerror (bad message/signature format) Received: from policy02-mors.netcup.net (unknown [46.38.225.35]) by mors-relay-8201.netcup.net (Postfix) with ESMTPS id 4DdJn92hJcz4Ww7; Sat, 13 Feb 2021 19:29:49 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at policy02-mors.netcup.net X-Spam-Flag: NO X-Spam-Score: -2.899 X-Spam-Level: X-Spam-Status: No, score=-2.899 required=6.31 tests=[ALL_TRUSTED=-1, BAYES_00=-1.9, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no Received: from mxe217.netcup.net (unknown [10.243.12.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by policy02-mors.netcup.net (Postfix) with ESMTPS id 4DdJn33ghdz8scj; Sat, 13 Feb 2021 19:29:43 +0100 (CET) Received: from [192.168.1.113] (ip5b420012.dynamic.kabel-deutschland.de [91.66.0.18]) by mxe217.netcup.net (Postfix) with ESMTPSA id DCEEE80667; Sat, 13 Feb 2021 19:29:41 +0100 (CET) Message-ID: Subject: Re: bug#46422: [PATCH] Re: bug#46422: 'pr' screws up tabstops in multicolumn outpt? From: Leonard Janis Robert =?ISO-8859-1?Q?K=F6nig?= To: Erik Auerswald Date: Sat, 13 Feb 2021 19:29:40 +0100 In-Reply-To: <19f17160-6644-5e6b-218c-58c478f3e88e@unix-ag.uni-kl.de> References: <20210211120027.GA722@unix-ag.uni-kl.de> <20210211154546.GA31693@unix-ag.uni-kl.de> <326ad1d11d8bbcf9a22ef572bb7f2cdfab13a6e5.camel@ljrk.org> <20210211192005.GA25500@unix-ag.uni-kl.de> <19f17160-6644-5e6b-218c-58c478f3e88e@unix-ag.uni-kl.de> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.4 (by Flathub.org) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-NC-CID: zM0ysCXY++lIG9ak7HhiHrD/vMaWrkL7GHkrCGg= X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 46422 Cc: 46422@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: -1.0 (-) Hi, first: Thank you very much for the work, I really owe you one! On Sat, 2021-02-13 at 17:58 +0100, Erik Auerswald wrote: > On 13.02.21 15:17, Erik Auerswald wrote: > > On 11.02.21 20:20, Erik Auerswald wrote: > > > On Thu, Feb 11, 2021 at 06:09:28PM +0100, Leonard Janis Robert > > > König > > > wrote: > > > > On Thu, 2021-02-11 at 16:45 +0100, Erik Auerswald wrote: > > > > > On Thu, Feb 11, 2021 at 04:12:54PM +0100, Leonard Janis > > > > > Robert > > > > > König wrote: > > > > > > On Thu, 2021-02-11 at 13:00 +0100, Erik Auerswald wrote: > > > > > > > On Wed, Feb 10, 2021 at 01:42:29PM +0100, Leonard Janis > > > > > > > Robert > > > > > > > König wrote: > > > > > > > > I'm sorry if I this is not a bug but to be expected, > > > > > > > > but I thnk > > > > > > > > pr doesn't get the alignment of tabs in multicolumn > > > > > > > > output > > > > > > > > right.  [...]  This seems *kind* of related to multi- > > > > > > > > column > > > > > > > > merged output, as was discussed some years ago here: > > > > > > > > https://lists.gnu.org/archive/html/bug-coreutils/2007-03/msg00121.html > > > > > > > >   > > > > > > > > > > > > > > > > > > > > > > This thread contains the bug-introducing patch in message > > > > > > > https://lists.gnu.org/archive/html/bug-coreutils/2007-03/msg00160.html > > > > > > >   > > > > > > > > > > > > > > > > > > > > > This is commit 553d347d3e08e00ee4f9df520b37c964c3f26e28. > > > > > > > > > > > > ah, thanks for digging, I read the message but must have > > > > > > missed > > > > > > the patch. > > > > > > > > > > > > > That commit removed the 'assume -e' part of the POSIX > > > > > > > description > > > > > > > of the -COLUMN option from GNU pr. > > > > > > [...] > > > > > Your test case requires expanding tabs during input, which is > > > > > the reason that "expand | pr" could be used as a workaround > > > > > (with > > > > > "expand | pr | unexpand", pr would not need to mess with tabs > > > > > at all, > > > > > but I do think that GNU pr is currently buggy and should be > > > > > fixed). > > > > > > > > Absolutely, expand would be a workaround (I happen to use `pr - > > > > e | pr` > > > > in my script, for other reasons). > > > > [...] > > > I have found a fix to the problem described by you.  I am quite > > > sure that > > > this is not *correct*, but I did not find a way to make > > > print_sep_string() > > > account for tabs that did not break quite a few existing tests, > > > even if > > > the merged files problem from 2007 and this columnating bug were > > > both > > > fixed.  Thus I just tighten the 2007 bug fix to apply in less > > > cases. > > > This way all existing tests pass, and a new one pertaining to > > > this bug > > > report passes, too.  I do think this is in the same spirit as the > > > "fix" > > > from 2007 (commit 553d347d3e08e00ee4f9df520b37c964c3f26e28). > > > > I think the attached patch is a better fix than my previous one, > > because it applies the special treatment of TAB as separator more > > consistently.  It may still not be complete (the code seems quite > > convoluted to me) but I do think it improves the situation > > significantly, and does not make it worse. Hm, I'm not sure whether I understand this special case. When we have a tab as column separator, doesn't this imply that the second column is starting on a position n*8, (effectively equivalent to the first column), thus guaranteeing that the alignment is honored? So, if my brain isn't completely off the track, with -s'\t' there shouldn't be a difference whether we do -e -i or not, thus there needs not to be a special case. That being said, I don't see this exact distinction reflected in the code, so perhaps I just misunderstood. > > It seems to me as if "untabify_input = true;" should be re-introduced > in one additional place to fix the regression from commit 553d347, > please see the attached patch version 3. > > > I'd like to ask the GNU Coreutils maintainers to consider merging > > the attached patch. > > The latest version, i.e., v3 for now. I can only second this, with the patch my rather obscure (and complex) use case of printing thousands of lines of code works properly now! ~leo From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 13 15:16:14 2021 Received: (at 46422) by debbugs.gnu.org; 13 Feb 2021 20:16:14 +0000 Received: from localhost ([127.0.0.1]:35110 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lB1Kw-0004Bt-B6 for submit@debbugs.gnu.org; Sat, 13 Feb 2021 15:16:14 -0500 Received: from mailgw1.uni-kl.de ([131.246.120.220]:45688) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lB1Kt-0004Bi-Th for 46422@debbugs.gnu.org; Sat, 13 Feb 2021 15:16:13 -0500 Received: from [172.20.10.3] (dynamic-046-114-004-016.46.114.pool.telefonica.de [46.114.4.16]) (authenticated bits=0) by mailgw1.uni-kl.de (8.14.4/8.14.4/Debian-8+deb8u2) with ESMTP id 11DKFvY6017754 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 13 Feb 2021 21:16:08 +0100 Subject: Re: bug#46422: [PATCH] Re: bug#46422: 'pr' screws up tabstops in multicolumn outpt? To: =?UTF-8?Q?Leonard_Janis_Robert_K=c3=b6nig?= References: <20210211120027.GA722@unix-ag.uni-kl.de> <20210211154546.GA31693@unix-ag.uni-kl.de> <326ad1d11d8bbcf9a22ef572bb7f2cdfab13a6e5.camel@ljrk.org> <20210211192005.GA25500@unix-ag.uni-kl.de> <19f17160-6644-5e6b-218c-58c478f3e88e@unix-ag.uni-kl.de> From: Erik Auerswald Message-ID: <521f368c-3977-ca29-2e53-8b3da505a4af@unix-ag.uni-kl.de> Date: Sat, 13 Feb 2021 21:15:56 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 8bit X-Spam-Status: No, hits=0.281, tests=KHOP_HELO_FCRDNS=0.399, NICE_REPLY_A=-0.119, URIBL_BLOCKED=0.001 X-Spam-Score: (0.281) X-Spam-Flag: NO X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 46422 Cc: 46422@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 (---) Hi, On 13.02.21 19:29, Leonard Janis Robert König wrote: > > first: Thank you very much for the work, I really owe you one! You're welcome. :-) > On Sat, 2021-02-13 at 17:58 +0100, Erik Auerswald wrote: >> On 13.02.21 15:17, Erik Auerswald wrote: >>> On 11.02.21 20:20, Erik Auerswald wrote: >>>> On Thu, Feb 11, 2021 at 06:09:28PM +0100, Leonard Janis Robert >>>> König >>>> wrote: >>>>> On Thu, 2021-02-11 at 16:45 +0100, Erik Auerswald wrote: >>>>>> On Thu, Feb 11, 2021 at 04:12:54PM +0100, Leonard Janis >>>>>> Robert >>>>>> König wrote: >>>>>>> On Thu, 2021-02-11 at 13:00 +0100, Erik Auerswald wrote: >>>>>>>> On Wed, Feb 10, 2021 at 01:42:29PM +0100, Leonard Janis >>>>>>>> Robert >>>>>>>> König wrote: >>>>>>>>> I'm sorry if I this is not a bug but to be expected, >>>>>>>>> but I thnk >>>>>>>>> pr doesn't get the alignment of tabs in multicolumn >>>>>>>>> output >>>>>>>>> right.  [...]  This seems *kind* of related to multi- >>>>>>>>> column >>>>>>>>> merged output, as was discussed some years ago here: >>>>>>>>> https://lists.gnu.org/archive/html/bug-coreutils/2007-03/msg00121.html >>>>>>>> >>>>>>>> This thread contains the bug-introducing patch in message >>>>>>>> https://lists.gnu.org/archive/html/bug-coreutils/2007-03/msg00160.html >>>>>>>> >>>>>>>> This is commit 553d347d3e08e00ee4f9df520b37c964c3f26e28. >>>>>>>> That commit removed the 'assume -e' part of the POSIX >>>>>>>> description >>>>>>>> of the -COLUMN option from GNU pr. >>>>>>> [...] >>>> I have found a fix to the problem described by you.  I am quite >>>> sure that >>>> this is not *correct*, but I did not find a way to make >>>> print_sep_string() >>>> account for tabs that did not break quite a few existing tests, >>>> even if >>>> the merged files problem from 2007 and this columnating bug were >>>> both >>>> fixed.  Thus I just tighten the 2007 bug fix to apply in less >>>> cases. >>>> This way all existing tests pass, and a new one pertaining to >>>> this bug >>>> report passes, too.  I do think this is in the same spirit as the >>>> "fix" >>>> from 2007 (commit 553d347d3e08e00ee4f9df520b37c964c3f26e28). >>> >>> I think the attached patch is a better fix than my previous one, >>> because it applies the special treatment of TAB as separator more >>> consistently.  It may still not be complete (the code seems quite >>> convoluted to me) but I do think it improves the situation >>> significantly, and does not make it worse. > > Hm, I'm not sure whether I understand this special case. When we have > a tab as column separator, doesn't this imply that the second column is > starting on a position n*8, (effectively equivalent to the first > column), thus guaranteeing that the alignment is honored? So, if my Whatever the reason (perhaps conforming to POSIX, perhaps other pr implementations doing the same), GNU pr implements a special treatment for TAB as column separator, and the thread from 2007 implies that the pr from HP-UX does as well. The POSIX spec says: "-s[char] Separate text columns by the single character char instead of by the appropriate number of characters (default for char shall be )." https://pubs.opengroup.org/onlinepubs/9699919799/utilities/pr.html So use of -s needs to always result in one separator character between columns. This is implemented by GNU pr, and seemingly by pr from HP-UX, too (https://lists.gnu.org/archive/html/bug-coreutils/2007-03/msg00121.html) Of all the printable ASCII characters, only TAB results in interactions with "Tabification," i.e., turning TABs into spaces on input and spaces into TABs on output. Thus only TAB as separator may require the special treatment of disabling "Tabification." Omitting this special treatment resulted in the bug from 2007. Removing the implicit "-e" and "-i" from "-NUMBER" and "-m" to fix the 2007 bug resulted in this bug (bug#46422), and does not conform to the POSIX specification nor to the GNU pr info documentation. My v3 patch restricts this special treatment of "-s" to just the cases where it is used without specifying a separator and thus using the default of TAB, or when it is used with a single TAB ("-s$'\t'"). Thus it restricts the 2007 change from commit 553d347d3e08e00ee4f9df520b37c964c3f26e28 to affect only those use cases it should affect, instead of all multi-column use cases. It may be possible to add some appropriate special treatment for TAB as separator without disabling "Tabification." But I do not know how. Just accounting for the output position change resulting from printing a TAB in print_sep_string() does not work, i.e., breaks many of the existing tests. > [...] > That being said, I don't see this exact distinction reflected in the > code, so perhaps I just misunderstood. Disabling "Tabification" only when "-s" was active is missing. That resulted in the 2007 bug. Making the needed special treatment always used fixed the 2007 bug, but broke your use case. That some special treatment is needed and intended can be gleaned from the following comment (with line numbers from pr.c in the current master branch @ 2de30c7350a77b091afa1eb284acdf082c0f6aa5): 1031 /* It's rather pointless to define a TAB separator with column 1032 alignment */ My patch adds the special treatment, since it works both for the 2007 bug and this bug (bug#46422). >> It seems to me as if "untabify_input = true;" should be re-introduced >> in one additional place to fix the regression from commit 553d347, >> please see the attached patch version 3. >> >>> I'd like to ask the GNU Coreutils maintainers to consider merging >>> the attached patch. >> >> The latest version, i.e., v3 for now. > > I can only second this, with the patch my rather obscure (and complex) > use case of printing thousands of lines of code works properly now! Thanks for testing! Thanks, Erik From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 13 15:28:59 2021 Received: (at 46422) by debbugs.gnu.org; 13 Feb 2021 20:28:59 +0000 Received: from localhost ([127.0.0.1]:35132 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lB1XG-0004V0-Pb for submit@debbugs.gnu.org; Sat, 13 Feb 2021 15:28:59 -0500 Received: from relay.yourmailgateway.de ([185.244.192.111]:54249) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lB1XC-0004Up-Au for 46422@debbugs.gnu.org; Sat, 13 Feb 2021 15:28:57 -0500 Received: from relay01-mors.netcup.net (localhost [127.0.0.1]) by relay01-mors.netcup.net (Postfix) with ESMTPS id 4DdMQX60sLz8K6g; Sat, 13 Feb 2021 21:28:52 +0100 (CET) Authentication-Results: relay01-mors.netcup.net; dkim=permerror (bad message/signature format) Received: from policy02-mors.netcup.net (unknown [46.38.225.35]) by relay01-mors.netcup.net (Postfix) with ESMTPS id 4DdMQX5dNzz858h; Sat, 13 Feb 2021 21:28:52 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at policy02-mors.netcup.net X-Spam-Flag: NO X-Spam-Score: -2.899 X-Spam-Level: X-Spam-Status: No, score=-2.899 required=6.31 tests=[ALL_TRUSTED=-1, BAYES_00=-1.9, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no Received: from mxe217.netcup.net (unknown [10.243.12.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by policy02-mors.netcup.net (Postfix) with ESMTPS id 4DdMQW6BGBz8sjw; Sat, 13 Feb 2021 21:28:51 +0100 (CET) Received: from [192.168.1.113] (ip5b420012.dynamic.kabel-deutschland.de [91.66.0.18]) by mxe217.netcup.net (Postfix) with ESMTPSA id 5B0FF8068D; Sat, 13 Feb 2021 21:28:50 +0100 (CET) Message-ID: <27bd2fa658c7105d646e259fbe0bb08f3c86b824.camel@ljrk.org> Subject: Re: bug#46422: [PATCH] Re: bug#46422: 'pr' screws up tabstops in multicolumn outpt? From: Leonard Janis Robert =?ISO-8859-1?Q?K=F6nig?= To: Erik Auerswald Date: Sat, 13 Feb 2021 21:28:49 +0100 In-Reply-To: <521f368c-3977-ca29-2e53-8b3da505a4af@unix-ag.uni-kl.de> References: <20210211120027.GA722@unix-ag.uni-kl.de> <20210211154546.GA31693@unix-ag.uni-kl.de> <326ad1d11d8bbcf9a22ef572bb7f2cdfab13a6e5.camel@ljrk.org> <20210211192005.GA25500@unix-ag.uni-kl.de> <19f17160-6644-5e6b-218c-58c478f3e88e@unix-ag.uni-kl.de> <521f368c-3977-ca29-2e53-8b3da505a4af@unix-ag.uni-kl.de> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.4 (by Flathub.org) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-NC-CID: PjYB2CGVrV/gWX1fb8Sg9KqP4SWPIDk+vN0ISO8= X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 46422 Cc: 46422@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: -1.0 (-) On Sat, 2021-02-13 at 21:15 +0100, Erik Auerswald wrote: > Hi, > > On 13.02.21 19:29, Leonard Janis Robert König wrote: > > > > first:  Thank you very much for the work, I really owe you one! > > You're welcome. :-) > > > On Sat, 2021-02-13 at 17:58 +0100, Erik Auerswald wrote: > > > On 13.02.21 15:17, Erik Auerswald wrote: > > > > On 11.02.21 20:20, Erik Auerswald wrote: > > > > > On Thu, Feb 11, 2021 at 06:09:28PM +0100, Leonard Janis > > > > > Robert > > > > > König > > > > > wrote: > > > > > > On Thu, 2021-02-11 at 16:45 +0100, Erik Auerswald wrote: > > > > > > > On Thu, Feb 11, 2021 at 04:12:54PM +0100, Leonard Janis > > > > > > > Robert > > > > > > > König wrote: > > > > > > > > On Thu, 2021-02-11 at 13:00 +0100, Erik Auerswald > > > > > > > > wrote: > > > > > > > > > On Wed, Feb 10, 2021 at 01:42:29PM +0100, Leonard > > > > > > > > > Janis > > > > > > > > > Robert > > > > > > > > > König wrote: > > > > > > > > > > I'm sorry if I this is not a bug but to be > > > > > > > > > > expected, > > > > > > > > > > but I thnk > > > > > > > > > > pr doesn't get the alignment of tabs in multicolumn > > > > > > > > > > output > > > > > > > > > > right.  [...]  This seems *kind* of related to > > > > > > > > > > multi- > > > > > > > > > > column > > > > > > > > > > merged output, as was discussed some years ago > > > > > > > > > > here: > > > > > > > > > > https://lists.gnu.org/archive/html/bug-coreutils/2007-03/msg00121.html > > > > > > > > > > > > > > > > > > This thread contains the bug-introducing patch in > > > > > > > > > message > > > > > > > > > https://lists.gnu.org/archive/html/bug-coreutils/2007-03/msg00160.html > > > > > > > > >   > > > > > > > > > This is commit > > > > > > > > > 553d347d3e08e00ee4f9df520b37c964c3f26e28. > > > > > > > > > That commit removed the 'assume -e' part of the POSIX > > > > > > > > > description > > > > > > > > > of the -COLUMN option from GNU pr. > > > > > > > > [...] > > > > > I have found a fix to the problem described by you.  I am > > > > > quite > > > > > sure that > > > > > this is not *correct*, but I did not find a way to make > > > > > print_sep_string() > > > > > account for tabs that did not break quite a few existing > > > > > tests, > > > > > even if > > > > > the merged files problem from 2007 and this columnating bug > > > > > were > > > > > both > > > > > fixed.  Thus I just tighten the 2007 bug fix to apply in less > > > > > cases. > > > > > This way all existing tests pass, and a new one pertaining to > > > > > this bug > > > > > report passes, too.  I do think this is in the same spirit as > > > > > the > > > > > "fix" > > > > > from 2007 (commit 553d347d3e08e00ee4f9df520b37c964c3f26e28). > > > > > > > > I think the attached patch is a better fix than my previous > > > > one, > > > > because it applies the special treatment of TAB as separator > > > > more > > > > consistently.  It may still not be complete (the code seems > > > > quite > > > > convoluted to me) but I do think it improves the situation > > > > significantly, and does not make it worse. > > > > Hm, I'm not sure whether I understand this special case.  When we > > have > > a tab as column separator, doesn't this imply that the second > > column is > > starting on a position n*8, (effectively equivalent to the first > > column), thus guaranteeing that the alignment is honored?  So, if > > my > > Whatever the reason (perhaps conforming to POSIX, perhaps other pr > implementations doing the same), GNU pr implements a special > treatment for TAB as column separator, and the thread from 2007 > implies that the pr from HP-UX does as well. > > The POSIX spec says: > >      "-s[char] > >       Separate text columns by the single character char instead of >       by the appropriate number of characters (default for >       char shall be )." > > https://pubs.opengroup.org/onlinepubs/9699919799/utilities/pr.html > > So use of -s needs to always result in one separator character > between columns. > > This is implemented by GNU pr, and seemingly by pr from HP-UX, too > ( > https://lists.gnu.org/archive/html/bug-coreutils/2007-03/msg00121.html > ) > > Of all the printable ASCII characters, only TAB results in > interactions with "Tabification," i.e., turning TABs into spaces > on input and spaces into TABs on output.  Thus only TAB as > separator may require the special treatment of disabling > "Tabification." > > Omitting this special treatment resulted in the bug from 2007. > > Removing the implicit "-e" and "-i" from "-NUMBER" and "-m" > to fix the 2007 bug resulted in this bug (bug#46422), and does > not conform to the POSIX specification nor to the GNU pr info > documentation. > > My v3 patch restricts this special treatment of "-s" to just > the cases where it is used without specifying a separator and > thus using the default of TAB, or when it is used with a single > TAB ("-s$'\t'").  Thus it restricts the 2007 change from commit > 553d347d3e08e00ee4f9df520b37c964c3f26e28 to affect only those > use cases it should affect, instead of all multi-column use cases. > > It may be possible to add some appropriate special treatment for > TAB as separator without disabling "Tabification."  But I do not > know how.  Just accounting for the output position change resulting > from printing a TAB in print_sep_string() does not work, i.e., > breaks many of the existing tests. This makes sense then, yes. In theory, this'd be the best approach, but I don't see that happening with the current code base... . The issue is less with enabling/disabling tabification, since a tab character should, as I wrote, always align the second column -- but with the rather weird behavior of pr sometimes "miscounting" that I outlined a few mails earlier, after which I gave up fixing :-) > > > [...] > > That being said, I don't see this exact distinction reflected in > > the > > code, so perhaps I just misunderstood. > > Disabling "Tabification" only when "-s" was active is missing.  That > resulted in the 2007 bug.  Making the needed special treatment always > used fixed the 2007 bug, but broke your use case. > > That some special treatment is needed and intended can be gleaned > from the following comment (with line numbers from pr.c in the > current master branch @ 2de30c7350a77b091afa1eb284acdf082c0f6aa5): > > 1031  /* It's rather pointless to define a TAB separator with column > 1032     alignment */ > > My patch adds the special treatment, since it works both for the 2007 > bug and this bug (bug#46422). > > > > It seems to me as if "untabify_input = true;" should be re- > > > introduced > > > in one additional place to fix the regression from commit > > > 553d347, > > > please see the attached patch version 3. > > > > > > > I'd like to ask the GNU Coreutils maintainers to consider > > > > merging > > > > the attached patch. > > > > > > The latest version, i.e., v3 for now. > > > > I can only second this, with the patch my rather obscure (and > > complex) > > use case of printing thousands of lines of code works properly now! > > Thanks for testing! Thanks all to you ~leo From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 14 14:22:46 2021 Received: (at 46422) by debbugs.gnu.org; 14 Feb 2021 19:22:46 +0000 Received: from localhost ([127.0.0.1]:36760 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lBMyk-0004Z4-3v for submit@debbugs.gnu.org; Sun, 14 Feb 2021 14:22:46 -0500 Received: from mailgw1.uni-kl.de ([131.246.120.220]:49306) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lBMyg-0004Yt-N4 for 46422@debbugs.gnu.org; Sun, 14 Feb 2021 14:22:44 -0500 Received: from [172.20.10.3] (dynamic-046-114-003-110.46.114.pool.telefonica.de [46.114.3.110]) (authenticated bits=0) by mailgw1.uni-kl.de (8.14.4/8.14.4/Debian-8+deb8u2) with ESMTP id 11EJMTH7093017 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 14 Feb 2021 20:22:39 +0100 Subject: Re: bug#46422: [PATCH] Re: bug#46422: 'pr' screws up tabstops in multicolumn outpt? To: =?UTF-8?Q?Leonard_Janis_Robert_K=c3=b6nig?= References: <20210211120027.GA722@unix-ag.uni-kl.de> <20210211154546.GA31693@unix-ag.uni-kl.de> <326ad1d11d8bbcf9a22ef572bb7f2cdfab13a6e5.camel@ljrk.org> <20210211192005.GA25500@unix-ag.uni-kl.de> <19f17160-6644-5e6b-218c-58c478f3e88e@unix-ag.uni-kl.de> <521f368c-3977-ca29-2e53-8b3da505a4af@unix-ag.uni-kl.de> <27bd2fa658c7105d646e259fbe0bb08f3c86b824.camel@ljrk.org> From: Erik Auerswald Message-ID: <62d163c0-d918-ee5b-8f14-624c98a7ea9a@unix-ag.uni-kl.de> Date: Sun, 14 Feb 2021 20:22:28 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <27bd2fa658c7105d646e259fbe0bb08f3c86b824.camel@ljrk.org> Content-Type: multipart/mixed; boundary="------------2991FA34007AFB0DBE0942E8" Content-Language: en-GB X-Spam-Status: No, hits=0.399, tests=KHOP_HELO_FCRDNS=0.4,NICE_REPLY_A=-0.001 X-Spam-Score: (0.399) X-Spam-Flag: NO X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 46422 Cc: 46422@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 (---) This is a multi-part message in MIME format. --------------2991FA34007AFB0DBE0942E8 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Hi, On 13.02.21 21:28, Leonard Janis Robert König wrote: > On Sat, 2021-02-13 at 21:15 +0100, Erik Auerswald wrote: >> On 13.02.21 19:29, Leonard Janis Robert König wrote: >>> [...] >>> That being said, I don't see this exact distinction reflected in >>> the >>> code, so perhaps I just misunderstood. >> >> Disabling "Tabification" only when "-s" was active is missing.  That >> resulted in the 2007 bug.  Making the needed special treatment always >> used fixed the 2007 bug, but broke your use case. >> >> That some special treatment is needed and intended can be gleaned >> from the following comment (with line numbers from pr.c in the >> current master branch @ 2de30c7350a77b091afa1eb284acdf082c0f6aa5): >> >> 1031  /* It's rather pointless to define a TAB separator with column >> 1032     alignment */ The code after that comment does not disable alignment, but changes the separator from a TAB to a space. >> My patch adds the special treatment, since it works both for the 2007 >> bug and this bug (bug#46422). The attached version 4 of my patch does that in a way that more clearly shows the intent. I think this is a better fix for the 2007 bug than commit 553d347d3e08e00ee4f9df520b37c964c3f26e28. Expanding TABs on input is enabled unless when a single TAB is used as column separator. This conforms better to POSIX and does not introduce the regression that causes the current bug (bug#46422). I have added more test cases, because manual testing showed that the options "-s" and "-s$'\t'" were treated differently by pr. Using "-s" to activate the default TAB separator should result in the same output as using "-s$'\t'" to specify one TAB character as separator, i.e., the default, explicitly. >>> [...] with the patch my rather obscure (and complex) >>> use case of printing thousands of lines of code works properly now! >> >> Thanks for testing! > > Thanks all to you May I ask you to test the new patch (v4) as well? Thanks, Erik --------------2991FA34007AFB0DBE0942E8 Content-Type: text/x-patch; charset=UTF-8; name="coreutils-pr-fix_bug_46422.v4.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="coreutils-pr-fix_bug_46422.v4.patch" diff --git a/src/pr.c b/src/pr.c index 22d032ba3..5b003cb9a 100644 --- a/src/pr.c +++ b/src/pr.c @@ -1237,6 +1237,8 @@ init_parameters (int number_of_files) col_sep_string = column_separator; truncate_lines = true; + if (! (col_sep_length == 1 && *col_sep_string == '\t')) + untabify_input = true; tabify_output = true; } else diff --git a/tests/pr/pr-tests.pl b/tests/pr/pr-tests.pl index b7d868cf8..d0ac40520 100755 --- a/tests/pr/pr-tests.pl +++ b/tests/pr/pr-tests.pl @@ -466,6 +466,27 @@ push @Tests, {IN=>{2=>"m\tn\to\n"}}, {IN=>{3=>"x\ty\tz\n"}}, {OUT=>join("\t", qw(a b c m n o x y z)) . "\n"} ]; +# -s and -s$'\t' use different code paths +push @Tests, + ['merge-w-tabs-sepstr', "-m -s'\t' -t", + {IN=>{1=>"a\tb\tc\n"}}, + {IN=>{2=>"m\tn\to\n"}}, + {IN=>{3=>"x\ty\tz\n"}}, + {OUT=>join("\t", qw(a b c m n o x y z)) . "\n"} ]; + +# Exercise a variant of the bug with pr -m -s (commit 553d347) +# test 2 files, too (merging 3 files automatically aligns columns on TAB stops) +push @Tests, + ['merge-2-w-tabs', '-m -s -t', + {IN=>{1=>"a\tb\tc\n"}}, + {IN=>{2=>"m\tn\to\n"}}, + {OUT=>join("\t", qw(a b c m n o)) . "\n"} ]; +# -s and -s$'\t' use different code paths +push @Tests, + ['merge-2-w-tabs-sepstr', "-m -s'\t' -t", + {IN=>{1=>"a\tb\tc\n"}}, + {IN=>{2=>"m\tn\to\n"}}, + {OUT=>join("\t", qw(a b c m n o)) . "\n"} ]; # This resulted in reading invalid memory before coreutils-8.26 push @Tests, @@ -474,6 +495,23 @@ push @Tests, {IN=>{2=>"a\n"}}, {OUT=>"a\t\t\t\t \t\t\ta\n"} ]; +# Exercise a bug with pr -t -2 (bug #46422) +push @Tests, + ['mcol-w-tabs', '-t -2', + {IN=>"x\tx\tx\tx\tx\nx\tx\tx\tx\tx\n"}, + {OUT=>"x\tx\tx\tx\tx x\t x\t x\t x\t x\n"} ]; + +# generalize case from commit 553d347 (problem results from -s, not -m) +push @Tests, + ['mcol-w-tabs-w-tabsep', '-t -2 -s', + {IN=>"x\tx\tx\tx\tx\nx\tx\tx\tx\tx\n"}, + {OUT=>"x\tx\tx\tx\tx\tx\tx\tx\tx\tx\n"} ]; +# -s and -s$'\t' use different code paths +push @Tests, + ['mcol-w-tabs-w-tabsep-sepstr', "-t -2 -s'\t'", + {IN=>"x\tx\tx\tx\tx\nx\tx\tx\tx\tx\n"}, + {OUT=>"x\tx\tx\tx\tx\tx\tx\tx\tx\tx\n"} ]; + @Tests = triple_test \@Tests; my $save_temps = $ENV{DEBUG}; --------------2991FA34007AFB0DBE0942E8-- From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 14 14:34:08 2021 Received: (at 46422) by debbugs.gnu.org; 14 Feb 2021 19:34:08 +0000 Received: from localhost ([127.0.0.1]:36786 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lBN9j-0004tC-Sh for submit@debbugs.gnu.org; Sun, 14 Feb 2021 14:34:08 -0500 Received: from relay.yourmailgateway.de ([188.68.63.165]:60885) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lBN9h-0004t1-9v for 46422@debbugs.gnu.org; Sun, 14 Feb 2021 14:34:06 -0500 Received: from mors-relay-8202.netcup.net (localhost [127.0.0.1]) by mors-relay-8202.netcup.net (Postfix) with ESMTPS id 4Ddy8q3xsfz4WCw; Sun, 14 Feb 2021 20:34:03 +0100 (CET) Authentication-Results: mors-relay-8202.netcup.net; dkim=permerror (bad message/signature format) Received: from policy02-mors.netcup.net (unknown [46.38.225.35]) by mors-relay-8202.netcup.net (Postfix) with ESMTPS id 4Ddy8q3ZKrz4W9H; Sun, 14 Feb 2021 20:34:03 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at policy02-mors.netcup.net X-Spam-Flag: NO X-Spam-Score: -2.9 X-Spam-Level: X-Spam-Status: No, score=-2.9 required=6.31 tests=[ALL_TRUSTED=-1, BAYES_00=-1.9] autolearn=ham autolearn_force=no Received: from mxe217.netcup.net (unknown [10.243.12.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by policy02-mors.netcup.net (Postfix) with ESMTPS id 4Ddy8p6lk7z8t38; Sun, 14 Feb 2021 20:34:02 +0100 (CET) Received: from [192.168.2.218] (p4fe0a55b.dip0.t-ipconnect.de [79.224.165.91]) by mxe217.netcup.net (Postfix) with ESMTPSA id 4919780667; Sun, 14 Feb 2021 20:34:01 +0100 (CET) Message-ID: <0b8417936bf07833c40536794b09bbd5f3958727.camel@ljrk.org> Subject: Re: bug#46422: [PATCH] Re: bug#46422: 'pr' screws up tabstops in multicolumn outpt? From: Leonard Janis Robert =?ISO-8859-1?Q?K=F6nig?= To: Erik Auerswald Date: Sun, 14 Feb 2021 20:34:00 +0100 In-Reply-To: <62d163c0-d918-ee5b-8f14-624c98a7ea9a@unix-ag.uni-kl.de> References: <20210211120027.GA722@unix-ag.uni-kl.de> <20210211154546.GA31693@unix-ag.uni-kl.de> <326ad1d11d8bbcf9a22ef572bb7f2cdfab13a6e5.camel@ljrk.org> <20210211192005.GA25500@unix-ag.uni-kl.de> <19f17160-6644-5e6b-218c-58c478f3e88e@unix-ag.uni-kl.de> <521f368c-3977-ca29-2e53-8b3da505a4af@unix-ag.uni-kl.de> <27bd2fa658c7105d646e259fbe0bb08f3c86b824.camel@ljrk.org> <62d163c0-d918-ee5b-8f14-624c98a7ea9a@unix-ag.uni-kl.de> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.4 (by Flathub.org) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-NC-CID: Adaia5iGnIDbnZaz+CpOJffqeNekZpcyWk4vtvA= X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 46422 Cc: 46422@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: -1.0 (-) On Sun, 2021-02-14 at 20:22 +0100, Erik Auerswald wrote: > Hi, > > On 13.02.21 21:28, Leonard Janis Robert König wrote: > > On Sat, 2021-02-13 at 21:15 +0100, Erik Auerswald wrote: > > > On 13.02.21 19:29, Leonard Janis Robert König wrote: > > > > [...] > > > > That being said, I don't see this exact distinction reflected > > > > in > > > > the > > > > code, so perhaps I just misunderstood. > > > > > > Disabling "Tabification" only when "-s" was active is missing.  > > > That > > > resulted in the 2007 bug.  Making the needed special treatment > > > always > > > used fixed the 2007 bug, but broke your use case. > > > > > > That some special treatment is needed and intended can be gleaned > > > from the following comment (with line numbers from pr.c in the > > > current master branch @ > > > 2de30c7350a77b091afa1eb284acdf082c0f6aa5): > > > > > > 1031  /* It's rather pointless to define a TAB separator with > > > column > > > 1032     alignment */ > > The code after that comment does not disable alignment, but changes > the separator from a TAB to a space. > > > > My patch adds the special treatment, since it works both for the > > > 2007 > > > bug and this bug (bug#46422). > > The attached version 4 of my patch does that in a way that more > clearly shows the intent.  I think this is a better fix for the > 2007 bug than commit 553d347d3e08e00ee4f9df520b37c964c3f26e28. > Expanding TABs on input is enabled unless when a single TAB is > used as column separator.  This conforms better to POSIX and > does not introduce the regression that causes the current bug > (bug#46422). > > I have added more test cases, because manual testing showed that > the options "-s" and "-s$'\t'" were treated differently by pr. > > Using "-s" to activate the default TAB separator should result > in the same output as using "-s$'\t'" to specify one TAB character > as separator, i.e., the default, explicitly. > > > > > [...] with the patch my rather obscure (and complex) > > > > use case of printing thousands of lines of code works properly > > > > now! > > > > > > Thanks for testing! > > > > Thanks all to you > > May I ask you to test the new patch (v4) as well? Sure! I got identical output compared to the previous version (I don't use `-s`) so it doesn't seem to break anything, but fixes the bug as intended. Thanks again! ~leo From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 14 18:04:31 2021 Received: (at 46422) by debbugs.gnu.org; 14 Feb 2021 23:04:31 +0000 Received: from localhost ([127.0.0.1]:36941 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lBQRL-000615-1W for submit@debbugs.gnu.org; Sun, 14 Feb 2021 18:04:31 -0500 Received: from mail-wr1-f44.google.com ([209.85.221.44]:36206) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lBQRI-00060s-Le for 46422@debbugs.gnu.org; Sun, 14 Feb 2021 18:04:29 -0500 Received: by mail-wr1-f44.google.com with SMTP id u14so6960100wri.3 for <46422@debbugs.gnu.org>; Sun, 14 Feb 2021 15:04:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=Y3Ms9kvZdxrcFCC9DCEGfyQxU45Yh7TlWG6Vhnt7cZA=; b=EdbISRT0na99lLBDJJ+8uH8s1jvbkTj1uMcGu8+ITBCyAciwQjl8t+CJz246xOjWQA e0ctCXGqJpdAGMurOvoGfwzMDUzCuUqthdXdgZdqlullkR21HrGi8oyaDi1jn+iMTe9W w8Eih1RqrOkZhPjol+m4BezUcFZc63KzdDue5s+/T8n0bTRzuaJsJUTn8JefZPPmbyoH fpNDOmwNB6bm7QuASWaS7oJ3e8PoBLnGBVLPLewrLKm65I9myK2C6uPdTqBH0iVJXnWN Mu9L1QxJVFsj1yi8bTUCXBrNjpkTpz9i5GViFNOOIG3ykwJB9q8VGBXbInddNy9cE+GO dyjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Y3Ms9kvZdxrcFCC9DCEGfyQxU45Yh7TlWG6Vhnt7cZA=; b=Gv9mI+k3249w8SQXP3NpAYBjgB7QJeRVb40TzrO6HHUD3tmesvlXfaSHYFkbsx35LW His7DoZVlQ/uPeDJhQvGCHEfu0e3adlEDJ3QwXbpkIo2HFmwL9FOkYsaQaRTp1QnyJWh t3e8JTrx27Q/F/T80eEJ1vReH+hXdLqAu8y7F/Z/kmXF1GEfA9gzHuY7IRHvrx7nIvFJ EE+BWqRbWe7FOc0huSfJykFnb+UN41E3lM5D16BAygqo8B4dJUtRry7qw96SA8cYaRQu NWCdVUevlxMYvYak/yfCuT1Hyrf5LCuCNqxKJoamXs1FSHTECNTeGK+kAdWvLgtOIqM+ fRBA== X-Gm-Message-State: AOAM531c+YUssfXrUlHRKCvgMJBKUscYmhnxlYtEo2/V6/qnGM+zX578 60si73AUse8vdJiAxmg8BZL4DbVkOco= X-Google-Smtp-Source: ABdhPJwF6ChbMTiYG+LFXa1fA72ncEkw6DsVDb2HP1/B4S1lWe2GgeK7HW2HCvNtSsuTQuo6ySV46A== X-Received: by 2002:adf:f7c5:: with SMTP id a5mr16122851wrq.243.1613343862610; Sun, 14 Feb 2021 15:04:22 -0800 (PST) Received: from localhost.localdomain (86-42-14-227-dynamic.agg2.lod.rsl-rtd.eircom.net. [86.42.14.227]) by smtp.googlemail.com with UTF8SMTPSA id i7sm51521407wmq.2.2021.02.14.15.04.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 14 Feb 2021 15:04:22 -0800 (PST) Subject: Re: bug#46422: [PATCH] Re: bug#46422: 'pr' screws up tabstops in multicolumn outpt? To: Erik Auerswald , =?UTF-8?Q?Leonard_Janis_Robert_K=c3=b6nig?= References: <20210211120027.GA722@unix-ag.uni-kl.de> <20210211154546.GA31693@unix-ag.uni-kl.de> <326ad1d11d8bbcf9a22ef572bb7f2cdfab13a6e5.camel@ljrk.org> <20210211192005.GA25500@unix-ag.uni-kl.de> <19f17160-6644-5e6b-218c-58c478f3e88e@unix-ag.uni-kl.de> <521f368c-3977-ca29-2e53-8b3da505a4af@unix-ag.uni-kl.de> <27bd2fa658c7105d646e259fbe0bb08f3c86b824.camel@ljrk.org> <62d163c0-d918-ee5b-8f14-624c98a7ea9a@unix-ag.uni-kl.de> From: =?UTF-8?Q?P=c3=a1draig_Brady?= Message-ID: <82598f51-a895-42e7-d7f2-10e532334067@draigBrady.com> Date: Sun, 14 Feb 2021 23:04:21 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:84.0) Gecko/20100101 Thunderbird/84.0 MIME-Version: 1.0 In-Reply-To: <62d163c0-d918-ee5b-8f14-624c98a7ea9a@unix-ag.uni-kl.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 46422 Cc: 46422@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.5 (/) On 14/02/2021 19:22, Erik Auerswald wrote: > May I ask you to test the new patch (v4) as well? This version looks good. I'll probably apply this after a little more local testing. Thanks to both of you! Pádraig From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 15 02:19:50 2021 Received: (at 46422) by debbugs.gnu.org; 15 Feb 2021 07:19:50 +0000 Received: from localhost ([127.0.0.1]:37194 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lBYAf-0005KX-W9 for submit@debbugs.gnu.org; Mon, 15 Feb 2021 02:19:50 -0500 Received: from mailgw1.uni-kl.de ([131.246.120.220]:34321) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lBYAc-0005KN-Nx for 46422@debbugs.gnu.org; Mon, 15 Feb 2021 02:19:48 -0500 Received: from sushi.unix-ag.uni-kl.de (sushi.unix-ag.uni-kl.de [IPv6:2001:638:208:ef34:0:ff:fe00:65]) by mailgw1.uni-kl.de (8.14.4/8.14.4/Debian-8+deb8u2) with ESMTP id 11F7Jibr045424 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 15 Feb 2021 08:19:44 +0100 Received: from sushi.unix-ag.uni-kl.de (ip6-localhost [IPv6:::1]) by sushi.unix-ag.uni-kl.de (8.14.4/8.14.4/Debian-4+deb7u1) with ESMTP id 11F7JiYv031181 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 15 Feb 2021 08:19:44 +0100 Received: (from auerswal@localhost) by sushi.unix-ag.uni-kl.de (8.14.4/8.14.4/Submit) id 11F7JhV9031174; Mon, 15 Feb 2021 08:19:43 +0100 Date: Mon, 15 Feb 2021 08:19:43 +0100 From: Erik Auerswald To: =?iso-8859-1?Q?P=E1draig?= Brady Subject: Re: bug#46422: [PATCH] Re: bug#46422: 'pr' screws up tabstops in multicolumn outpt? Message-ID: <20210215071943.GA31020@unix-ag.uni-kl.de> References: <20210211154546.GA31693@unix-ag.uni-kl.de> <326ad1d11d8bbcf9a22ef572bb7f2cdfab13a6e5.camel@ljrk.org> <20210211192005.GA25500@unix-ag.uni-kl.de> <19f17160-6644-5e6b-218c-58c478f3e88e@unix-ag.uni-kl.de> <521f368c-3977-ca29-2e53-8b3da505a4af@unix-ag.uni-kl.de> <27bd2fa658c7105d646e259fbe0bb08f3c86b824.camel@ljrk.org> <62d163c0-d918-ee5b-8f14-624c98a7ea9a@unix-ag.uni-kl.de> <82598f51-a895-42e7-d7f2-10e532334067@draigBrady.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <82598f51-a895-42e7-d7f2-10e532334067@draigBrady.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, hits=-1, tests=ALL_TRUSTED=-1 X-Spam-Score: (-1) X-Spam-Flag: NO X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 46422 Cc: 46422@debbugs.gnu.org, Leonard Janis Robert =?iso-8859-1?Q?K=F6nig?= 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 (---) On Sun, Feb 14, 2021 at 11:04:21PM +0000, Pádraig Brady wrote: > On 14/02/2021 19:22, Erik Auerswald wrote: > >May I ask you to test the new patch (v4) as well? > > This version looks good. > I'll probably apply this after a little more local testing. Thanks! From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 15 16:33:17 2021 Received: (at 46422-done) by debbugs.gnu.org; 15 Feb 2021 21:33:17 +0000 Received: from localhost ([127.0.0.1]:38820 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lBlUX-0006Fg-Qe for submit@debbugs.gnu.org; Mon, 15 Feb 2021 16:33:17 -0500 Received: from mail-wr1-f46.google.com ([209.85.221.46]:42933) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lBlUV-0006FU-06 for 46422-done@debbugs.gnu.org; Mon, 15 Feb 2021 16:33:12 -0500 Received: by mail-wr1-f46.google.com with SMTP id r21so10719765wrr.9 for <46422-done@debbugs.gnu.org>; Mon, 15 Feb 2021 13:33:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=p2ewXbNVQHI+8cpPqppPBEzgtwCuZwOs+d4Ui8WgKhk=; b=I/YnAfcOHdCvlDGVNCBa51JnrCHR3Ii5UED9FMdfu9KGQX1p1dWkvLE/1gLcyrWuKl m/kCPU0Ycp1gZAnmefAcAoUve0Q7fEu7dn5zLp7TZEdbplEhtT4+a5TbFDY8unSDAEFI uYMPpO/YCnXO+3rYlNQFIejzlGOD1KnCYJ8PVX/tli6PKuXv5qqTrV3tUS1YJGOTHYQu 2iNTcrlnPwXSsA5FFybUOevcw4Pm9oHUj2XkPYcyVJbhRyRrAf7aPv+dIyMvzrsmYv7W N8KNBik/Pc+SAgqNNN7cy9IIIRZdkay+mTaANc7zamuAtv9Zbm0h6SFvZ1fade9K8ORf qkqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=p2ewXbNVQHI+8cpPqppPBEzgtwCuZwOs+d4Ui8WgKhk=; b=tvBiaZw5baWG2ZltcByQyaW1ssvIuuf+/d2IBJ+5i4/sxNGDHZiJG/VObIvFNsC0xG 2cxzB5BhCQzClVc8hVDgfuv/uFnOeEAQ3hBalMa40/XQ4X3klEdvrR3nxL35kSJyNRKr dkHu5OuG6XDA3QTFMLQbxLyv1gKLg8uZrD3AzeHKyoeOtCoNxcuuk1G2v7lkSmgi+g01 39OJyWha8/osMsaUVIPCoKQrKb2Gpz8HQGVS2TOMgOcCZzR/jKQiS9auboDmqHugsre3 aXLH+Jn/vNNZIynu69SqDA5zvtUsvJcS6lYy60okp/l99eSqZxx/d/4Hczyg5ArOlU1a 9T/Q== X-Gm-Message-State: AOAM532GQeryWWhl3Gmdj4V4tO9FW1yGk+Ls6zyXuoVpvshmFBf1+vci jaFXnvfrDTcGJUDMP0TFZASWA8vJfTW7Bw== X-Google-Smtp-Source: ABdhPJwMwpAVoXTaOo3iTfFNqtuxfTehFweXcwAyyZiApyZo1mWZ/FA4V1kE3/LRyZTfYuB/m7DWBg== X-Received: by 2002:a5d:6b45:: with SMTP id x5mr19899473wrw.415.1613424784926; Mon, 15 Feb 2021 13:33:04 -0800 (PST) Received: from localhost.localdomain (86-42-14-227-dynamic.agg2.lod.rsl-rtd.eircom.net. [86.42.14.227]) by smtp.googlemail.com with UTF8SMTPSA id i7sm1253663wmq.2.2021.02.15.13.33.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 15 Feb 2021 13:33:04 -0800 (PST) Subject: Re: bug#46422: [PATCH] Re: bug#46422: 'pr' screws up tabstops in multicolumn outpt? To: Erik Auerswald References: <20210211154546.GA31693@unix-ag.uni-kl.de> <326ad1d11d8bbcf9a22ef572bb7f2cdfab13a6e5.camel@ljrk.org> <20210211192005.GA25500@unix-ag.uni-kl.de> <19f17160-6644-5e6b-218c-58c478f3e88e@unix-ag.uni-kl.de> <521f368c-3977-ca29-2e53-8b3da505a4af@unix-ag.uni-kl.de> <27bd2fa658c7105d646e259fbe0bb08f3c86b824.camel@ljrk.org> <62d163c0-d918-ee5b-8f14-624c98a7ea9a@unix-ag.uni-kl.de> <82598f51-a895-42e7-d7f2-10e532334067@draigBrady.com> <20210215071943.GA31020@unix-ag.uni-kl.de> From: =?UTF-8?Q?P=c3=a1draig_Brady?= Message-ID: <0a0d4618-ed3f-33c7-d5cf-3e26da29ac9b@draigBrady.com> Date: Mon, 15 Feb 2021 21:33:03 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:84.0) Gecko/20100101 Thunderbird/84.0 MIME-Version: 1.0 In-Reply-To: <20210215071943.GA31020@unix-ag.uni-kl.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 46422-done Cc: =?UTF-8?Q?Leonard_Janis_Robert_K=c3=b6nig?= , 46422-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.5 (/) On 15/02/2021 07:19, Erik Auerswald wrote: > On Sun, Feb 14, 2021 at 11:04:21PM +0000, Pádraig Brady wrote: >> On 14/02/2021 19:22, Erik Auerswald wrote: >>> May I ask you to test the new patch (v4) as well? >> >> This version looks good. >> I'll probably apply this after a little more local testing. Pushed at: https://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=v8.32-108-gbd6c97dee Marking this as done. thanks again, Pádraig From unknown Sun Jun 22 17:13:49 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 16 Mar 2021 11:24:05 +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