From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 24 18:30:15 2025 Received: (at submit) by debbugs.gnu.org; 24 Jan 2025 23:30:15 +0000 Received: from localhost ([127.0.0.1]:47493 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tbT7v-0001w1-5O for submit@debbugs.gnu.org; Fri, 24 Jan 2025 18:30:15 -0500 Received: from lists.gnu.org ([2001:470:142::17]:45770) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tbT7s-0001qX-Ef for submit@debbugs.gnu.org; Fri, 24 Jan 2025 18:30:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tbT7k-0001az-QH for bug-grep@gnu.org; Fri, 24 Jan 2025 18:30:04 -0500 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tbT7i-00014k-63 for bug-grep@gnu.org; Fri, 24 Jan 2025 18:30:04 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 138A7240027 for ; Sat, 25 Jan 2025 00:29:59 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1737761400; bh=imDypE3/X2YLphcPws5/prfMQEcNAKcSaNw64/qfacY=; h=Date:From:To:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition:From; b=eXaBMbwo5iSNcPrCSivEDm3X+Z8R+BRRKXNlV/n4m/7Lw8IxoI4Cx7h8mMIJhPiyb 2db9/89jlYZpMH6dlkC9wCelcdwMQOUxpRwqVNqOY+TtjHthn4w8BB+NVy7+bZCnyx TmUno3v5WIHzwAFESKWnBUmpeJaOZN33AQ0RbpPaHx4gvw6mf8eEyA0rddiHpD08xt 1vdpQ678i3VPq4h7bykGfSIoAObXH3W0CM7fwmZfcmup9426679M+h9KjudjaPMgFI nYCkzGY+dsF6fLiBNu/5hu4b5UfNwgWp2sEd6nK3FXSDE23O1YqelJb/52uF8zCHzb donaN62jtTk5g== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4YfvDR48ZTz9rxG for ; Sat, 25 Jan 2025 00:29:58 +0100 (CET) Date: Fri, 24 Jan 2025 23:29:58 +0000 From: Peter White To: bug-grep@gnu.org Subject: Wishlist: Better default GREP_COLORS Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Received-SPF: pass client-ip=185.67.36.65; envelope-from=peter.white@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) While checking out what #75806[1] was about I realized that there is some subtle unexpected behavior going on when coloring whitespace characters. Since they are non-printable/invisible the default GREP_COLORS='ms=1;31' is essentially a nop which mostly matters when they are the *only* match(es), like trailing spaces (as in [1]). One gets a match but no color which had me scratching my head for a while. Long story short, I propose changing the default to include both the reverse/standout and underline capabilities. I say both because, according to [2], they are somewhat obscure and not supported everywhere. But chances are that at least one of the two is available, one would hope. Are there any ill effects when sending unsupported escape sequences? Because if not the experience out of the box would be improved; if support is lacking, no harm done. Thanks for your consideration, PW [1] https://lists.gnu.org/archive/html/bug-grep/2025-01/msg00014.html [2] https://en.wikipedia.org/wiki/ANSI_escape_code