From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#59407: [PATCH] Add Colors to proced Date: Mon, 21 Nov 2022 16:28:06 +0200 Message-ID: <83mt8k2xhl.fsf@gnu.org> References: <87wn7p7qko.fsf@yahoo.com> <83fsed664y.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30036"; mail-complaints-to="usenet@ciao.gmane.io" Cc: luangruo@yahoo.com, michael.albinus@gmx.de, 59407@debbugs.gnu.org To: Laurence Warne Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Nov 21 15:29:12 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ox7nK-0007Wv-NU for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 21 Nov 2022 15:29:10 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ox7nD-0004qT-RM; Mon, 21 Nov 2022 09:29:03 -0500 Original-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 1ox7nC-0004pk-R2 for bug-gnu-emacs@gnu.org; Mon, 21 Nov 2022 09:29:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ox7nC-0002px-JA for bug-gnu-emacs@gnu.org; Mon, 21 Nov 2022 09:29:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ox7nC-0004NM-FD for bug-gnu-emacs@gnu.org; Mon, 21 Nov 2022 09:29:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 21 Nov 2022 14:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59407 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 59407-submit@debbugs.gnu.org id=B59407.166904088516744 (code B ref 59407); Mon, 21 Nov 2022 14:29:02 +0000 Original-Received: (at 59407) by debbugs.gnu.org; 21 Nov 2022 14:28:05 +0000 Original-Received: from localhost ([127.0.0.1]:45909 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ox7mH-0004Lz-CS for submit@debbugs.gnu.org; Mon, 21 Nov 2022 09:28:05 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:55022) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ox7mF-0004LS-RE for 59407@debbugs.gnu.org; Mon, 21 Nov 2022 09:28:04 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ox7mA-0002az-5D; Mon, 21 Nov 2022 09:27:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=qOrKTW+L3fo4+OieENjIm9Dr1CvXWhT96xgDIJ7iDik=; b=SNDmsWfkkuBa 7IVcdb2IcsM6oSUpK24zY11WCAOlBGPaBU89Ij1YFFOz4dkiVLto5p58VSyrg3XqI7icwJ3nABfl9 ArfxkBaewpgmuayUEZ7DbC+EXGmVHbJgJK8sIgFpm6hxckThBEZF560G3JwdIVRcC8Bl4E6HmeMXG dE/vvm1ll86dKZ/mMSSvuKrDC4+fsdfbBysZx7WT0ay8dm4ldlofXEGzxeF/mQABi1C5uXiqGiJbe uDPO7iheIIT4KUM8tC4mLrtrecYQqpdz7PMIQ2xIFQ3K5pd1pfWKWIhAqPN9MBZFAOWYkdTZ+0LTy yVE4qTQLShXzq43o7Ynttg==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ox7m6-0008CA-H6; Mon, 21 Nov 2022 09:27:57 -0500 In-Reply-To: (message from Laurence Warne on Mon, 21 Nov 2022 09:07:59 +0000) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:248537 Archived-At: > From: Laurence Warne > Date: Mon, 21 Nov 2022 09:07:59 +0000 > Cc: Po Lu , 59407@debbugs.gnu.org, > Michael Albinus > > Thanks. Please be sure to test the new faces with the following Emacs > configurations: > > . GUI frames with dark background > . GUI frames with light background > . TTY frames with dark and light backgrounds and with: > - 8 colors > - 16 colors > > Do you know if there's an easy way I can test the faces on 8/16 colour terminals? For 8 colors, invoke Emacs with "-nw --color". For 16 colors, try --color=16, and if it doesn't work, try configuring xterm for 16 colors, then invoke Emacs with -nw. > (proced-run-status-code, proced-executable. proced-memory-default) > (proced-memory-mb, proced-pgrp): New faces. > > Minor, but do you mean to add a closing paren at the end of each line? Yes. You can use the command "C-x 4 a" to format the log entries, it will do this automatically if auto-fill is turned on. > I saw this format in the commit log: > (proced-run-status-code, proced-executable. proced-memory-default, > proced-memory-mb, proced-pgrp): New faces. This is wrong. > This should probably be specified as percentage of total memory. Or maybe > there should be a separate defcustom for the percentage, and the condition > should use both. Just a single absolute threshold seems to cover only some > reasons for highlighting processes with large memory footprint. > > I was thinking highlighting based on percentage memory would be more suited to the "mem" process > attribute (granted though this is not implemented). Though in hindsight a global threshold may not make > sense if you're connecting to remote systems with varying amounts of RAM. Perhaps the two thresholds > could mark a percentage, say 10% and 50% of total memory? Something like that, yes. Thanks.