diff options
| author | Eli Zaretskii | 2022-12-01 20:15:52 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2022-12-01 20:15:52 +0200 |
| commit | 9c58ea37afc044a49fdd59fb4d1b8b6dd2d49ca9 (patch) | |
| tree | a590b1156e35f51a158fd515f5bb96ec7dee64e9 | |
| parent | 0c1495574a14b9131a0c0a8ef126976393a00e3d (diff) | |
| download | emacs-9c58ea37afc044a49fdd59fb4d1b8b6dd2d49ca9.tar.gz emacs-9c58ea37afc044a49fdd59fb4d1b8b6dd2d49ca9.zip | |
; Fix last change in proced.el
* lisp/proced.el (proced-low-memory-usage-threshold)
(proced-medium-memory-usage-threshold, proced-run-status-code)
(proced-interruptible-sleep-status-code)
(proced-uninterruptible-sleep-status-code, proced-executable): Fix
doc strings.
(proced-format-time): Simplify the format, to avoid bogus warnings
from the byte-compiler.
* etc/NEWS: Move Proced entries to one place and fix their
wording.
| -rw-r--r-- | etc/NEWS | 32 | ||||
| -rw-r--r-- | lisp/proced.el | 91 |
2 files changed, 71 insertions, 52 deletions
| @@ -504,14 +504,6 @@ option) and can be set to nil to disable Just-in-time Lock mode. | |||
| 504 | 504 | ||
| 505 | * Changes in Emacs 29.1 | 505 | * Changes in Emacs 29.1 |
| 506 | 506 | ||
| 507 | --- | ||
| 508 | ** New user option `proced-enable-color-flag` to enable coloring of proced buffers | ||
| 509 | This option prompts some format functions to furnish their respective | ||
| 510 | process attributes with colors in a manner similar to htop. | ||
| 511 | |||
| 512 | This option is disabled by default and needs setting to a non-nil | ||
| 513 | value to take effect. | ||
| 514 | |||
| 515 | +++ | 507 | +++ |
| 516 | ** New user option 'major-mode-remap-alist' to specify favorite major modes. | 508 | ** New user option 'major-mode-remap-alist' to specify favorite major modes. |
| 517 | This user option lets you remap the default modes (e.g. 'perl-mode' or | 509 | This user option lets you remap the default modes (e.g. 'perl-mode' or |
| @@ -2818,6 +2810,22 @@ Set it to nil to exclude line numbering from kills and copies. | |||
| 2818 | argument which allows tree-widget display to be activated and computed | 2810 | argument which allows tree-widget display to be activated and computed |
| 2819 | only when the user expands the node. | 2811 | only when the user expands the node. |
| 2820 | 2812 | ||
| 2813 | ** Proced | ||
| 2814 | |||
| 2815 | --- | ||
| 2816 | *** proced.el shows system processes of remote hosts. | ||
| 2817 | When 'default-directory' is remote, and 'proced' is invoked with a | ||
| 2818 | negative argument like 'C-u - proced', the system processes of that | ||
| 2819 | remote host are shown. Alternatively, the user option | ||
| 2820 | 'proced-show-remote-processes' can be set to non-nil. | ||
| 2821 | 'proced-signal-function' has been marked obsolete. | ||
| 2822 | |||
| 2823 | --- | ||
| 2824 | *** Proced can now optionally show process details in color. | ||
| 2825 | New user option 'proced-enable-color-flag' enables coloring of Proced | ||
| 2826 | buffers. This option is disabled by default; customize it to a | ||
| 2827 | non-nil value to enable colors. | ||
| 2828 | |||
| 2821 | ** Miscellaneous | 2829 | ** Miscellaneous |
| 2822 | 2830 | ||
| 2823 | --- | 2831 | --- |
| @@ -2904,14 +2912,6 @@ also been renamed: | |||
| 2904 | 'unread-bib' to 'bib-unread' | 2912 | 'unread-bib' to 'bib-unread' |
| 2905 | 2913 | ||
| 2906 | --- | 2914 | --- |
| 2907 | *** proced.el shows system processes of remote hosts. | ||
| 2908 | When 'default-directory' is remote, and 'proced' is invoked with a | ||
| 2909 | negative argument like 'C-u - proced', the system processes of that | ||
| 2910 | remote host are shown. Alternatively, the user option | ||
| 2911 | 'proced-show-remote-processes' can be set to non-nil. | ||
| 2912 | 'proced-signal-function' has been marked obsolete. | ||
| 2913 | |||
| 2914 | --- | ||
| 2915 | *** 'outlineify-sticky' command is renamed to 'allout-outlinify-sticky'. | 2915 | *** 'outlineify-sticky' command is renamed to 'allout-outlinify-sticky'. |
| 2916 | The old name is still available as an obsolete function alias. | 2916 | The old name is still available as an obsolete function alias. |
| 2917 | 2917 | ||
diff --git a/lisp/proced.el b/lisp/proced.el index f91d3d2f223..c7419288edf 100644 --- a/lisp/proced.el +++ b/lisp/proced.el | |||
| @@ -114,38 +114,55 @@ the external command (usually \"kill\")." | |||
| 114 | (defcustom proced-grammar-alist | 114 | (defcustom proced-grammar-alist |
| 115 | '( ;; attributes defined in `process-attributes' | 115 | '( ;; attributes defined in `process-attributes' |
| 116 | (euid "EUID" "%d" right proced-< nil (euid pid) (nil t nil)) | 116 | (euid "EUID" "%d" right proced-< nil (euid pid) (nil t nil)) |
| 117 | (user "User" proced-format-user left proced-string-lessp nil (user pid) (nil t nil)) | 117 | (user "User" proced-format-user left proced-string-lessp nil |
| 118 | (user pid) (nil t nil)) | ||
| 118 | (egid "EGID" "%d" right proced-< nil (egid euid pid) (nil t nil)) | 119 | (egid "EGID" "%d" right proced-< nil (egid euid pid) (nil t nil)) |
| 119 | (group "Group" nil left proced-string-lessp nil (group user pid) (nil t nil)) | 120 | (group "Group" nil left proced-string-lessp nil (group user pid) |
| 121 | (nil t nil)) | ||
| 120 | (comm "Command" nil left proced-string-lessp nil (comm pid) (nil t nil)) | 122 | (comm "Command" nil left proced-string-lessp nil (comm pid) (nil t nil)) |
| 121 | (state "Stat" proced-format-state left proced-string-lessp nil (state pid) (nil t nil)) | 123 | (state "Stat" proced-format-state left proced-string-lessp nil |
| 124 | (state pid) (nil t nil)) | ||
| 122 | (ppid "PPID" proced-format-ppid right proced-< nil (ppid pid) | 125 | (ppid "PPID" proced-format-ppid right proced-< nil (ppid pid) |
| 123 | ((lambda (ppid) (proced-filter-parents proced-process-alist ppid)) | 126 | ((lambda (ppid) |
| 124 | "refine to process parents")) | 127 | (proced-filter-parents proced-process-alist ppid)) |
| 125 | (pgrp "PGrp" proced-format-pgrp right proced-< nil (pgrp euid pid) (nil t nil)) | 128 | "refine to process parents")) |
| 126 | (sess "Sess" proced-format-sess right proced-< nil (sess pid) (nil t nil)) | 129 | (pgrp "PGrp" proced-format-pgrp right proced-< nil (pgrp euid pid) |
| 127 | (ttname "TTY" proced-format-ttname left proced-string-lessp nil (ttname pid) (nil t nil)) | 130 | (nil t nil)) |
| 131 | (sess "Sess" proced-format-sess right proced-< nil (sess pid) | ||
| 132 | (nil t nil)) | ||
| 133 | (ttname "TTY" proced-format-ttname left proced-string-lessp nil | ||
| 134 | (ttname pid) (nil t nil)) | ||
| 128 | (tpgid "TPGID" "%d" right proced-< nil (tpgid pid) (nil t nil)) | 135 | (tpgid "TPGID" "%d" right proced-< nil (tpgid pid) (nil t nil)) |
| 129 | (minflt "MinFlt" "%d" right proced-< nil (minflt pid) (nil t t)) | 136 | (minflt "MinFlt" "%d" right proced-< nil (minflt pid) (nil t t)) |
| 130 | (majflt "MajFlt" "%d" right proced-< nil (majflt pid) (nil t t)) | 137 | (majflt "MajFlt" "%d" right proced-< nil (majflt pid) (nil t t)) |
| 131 | (cminflt "CMinFlt" "%d" right proced-< nil (cminflt pid) (nil t t)) | 138 | (cminflt "CMinFlt" "%d" right proced-< nil (cminflt pid) (nil t t)) |
| 132 | (cmajflt "CMajFlt" "%d" right proced-< nil (cmajflt pid) (nil t t)) | 139 | (cmajflt "CMajFlt" "%d" right proced-< nil (cmajflt pid) (nil t t)) |
| 133 | (utime "UTime" proced-format-time right proced-time-lessp t (utime pid) (nil t t)) | 140 | (utime "UTime" proced-format-time right proced-time-lessp t (utime pid) |
| 134 | (stime "STime" proced-format-time right proced-time-lessp t (stime pid) (nil t t)) | 141 | (nil t t)) |
| 135 | (time "Time" proced-format-time right proced-time-lessp t (time pid) (nil t t)) | 142 | (stime "STime" proced-format-time right proced-time-lessp t (stime pid) |
| 136 | (cutime "CUTime" proced-format-time right proced-time-lessp t (cutime pid) (nil t t)) | 143 | (nil t t)) |
| 137 | (cstime "CSTime" proced-format-time right proced-time-lessp t (cstime pid) (nil t t)) | 144 | (time "Time" proced-format-time right proced-time-lessp t (time pid) |
| 138 | (ctime "CTime" proced-format-time right proced-time-lessp t (ctime pid) (nil t t)) | 145 | (nil t t)) |
| 146 | (cutime "CUTime" proced-format-time right proced-time-lessp t (cutime pid) | ||
| 147 | (nil t t)) | ||
| 148 | (cstime "CSTime" proced-format-time right proced-time-lessp t (cstime pid) | ||
| 149 | (nil t t)) | ||
| 150 | (ctime "CTime" proced-format-time right proced-time-lessp t (ctime pid) | ||
| 151 | (nil t t)) | ||
| 139 | (pri "Pr" "%d" right proced-< t (pri pid) (nil t t)) | 152 | (pri "Pr" "%d" right proced-< t (pri pid) (nil t t)) |
| 140 | (nice "Ni" "%3d" 3 proced-< t (nice pid) (t t nil)) | 153 | (nice "Ni" "%3d" 3 proced-< t (nice pid) (t t nil)) |
| 141 | (thcount "THCount" "%d" right proced-< t (thcount pid) (nil t t)) | 154 | (thcount "THCount" "%d" right proced-< t (thcount pid) (nil t t)) |
| 142 | (start "Start" proced-format-start 6 proced-time-lessp nil (start pid) (t t nil)) | 155 | (start "Start" proced-format-start 6 proced-time-lessp nil (start pid) |
| 143 | (vsize "VSize" proced-format-memory right proced-< t (vsize pid) (nil t t)) | 156 | (t t nil)) |
| 157 | (vsize "VSize" proced-format-memory right proced-< t (vsize pid) | ||
| 158 | (nil t t)) | ||
| 144 | (rss "RSS" proced-format-rss right proced-< t (rss pid) (nil t t)) | 159 | (rss "RSS" proced-format-rss right proced-< t (rss pid) (nil t t)) |
| 145 | (etime "ETime" proced-format-time right proced-time-lessp t (etime pid) (nil t t)) | 160 | (etime "ETime" proced-format-time right proced-time-lessp t (etime pid) |
| 161 | (nil t t)) | ||
| 146 | (pcpu "%CPU" proced-format-cpu right proced-< t (pcpu pid) (nil t t)) | 162 | (pcpu "%CPU" proced-format-cpu right proced-< t (pcpu pid) (nil t t)) |
| 147 | (pmem "%Mem" proced-format-mem right proced-< t (pmem pid) (nil t t)) | 163 | (pmem "%Mem" proced-format-mem right proced-< t (pmem pid) (nil t t)) |
| 148 | (args "Args" proced-format-args left proced-string-lessp nil (args pid) (nil t nil)) | 164 | (args "Args" proced-format-args left proced-string-lessp nil |
| 165 | (args pid) (nil t nil)) | ||
| 149 | ;; | 166 | ;; |
| 150 | ;; attributes defined by proced (see `proced-process-attributes') | 167 | ;; attributes defined by proced (see `proced-process-attributes') |
| 151 | (pid "PID" proced-format-pid right proced-< nil (pid) | 168 | (pid "PID" proced-format-pid right proced-< nil (pid) |
| @@ -373,23 +390,23 @@ May be used to revert the process listing." | |||
| 373 | :version "29.1") | 390 | :version "29.1") |
| 374 | 391 | ||
| 375 | (defcustom proced-low-memory-usage-threshold 0.1 | 392 | (defcustom proced-low-memory-usage-threshold 0.1 |
| 376 | "The upper bound for low memory usage, relative to total memory. | 393 | "The upper bound for low relative memory usage display in Proced. |
| 377 | 394 | ||
| 378 | When `proced-enable-color-flag' is non-nil, RSS values denoting a proportion | 395 | When `proced-enable-color-flag' is non-nil, RSS values denoting a |
| 379 | of memory lower than this value will be displayed using the | 396 | proportion of memory, relative to total memory, that is lower |
| 380 | `proced-memory-low-usage' face." | 397 | than this value will be displayed using the `proced-memory-low-usage' face." |
| 381 | :type 'float | 398 | :type 'float |
| 382 | :version "29.1") | 399 | :version "29.1") |
| 383 | 400 | ||
| 384 | (defcustom proced-medium-memory-usage-threshold 0.5 | 401 | (defcustom proced-medium-memory-usage-threshold 0.5 |
| 385 | "The upper bound for medium memory usage, relative to total memory. | 402 | "The upper bound for medium relative memory usage display in Proced. |
| 386 | 403 | ||
| 387 | When `proced-enable-color-flag' is non-nil, RSS values denoting a proportion | 404 | When `proced-enable-color-flag' is non-nil, RSS values denoting a |
| 388 | of memory less than this value, but greater than | 405 | proportion of memory, relative to total memory, that is less than |
| 389 | `proced-low-memory-usage-threshold', will be displayed using the | 406 | this value, but greater than `proced-low-memory-usage-threshold', |
| 390 | `proced-memory-medium-usage' face. RSS values denoting a greater proportion | 407 | will be displayed using the `proced-memory-medium-usage' face. |
| 391 | than this value will be displayed using the `proced-memory-high-usage' | 408 | RSS values denoting a greater proportion than this value will be |
| 392 | face." | 409 | displayed using the `proced-memory-high-usage' face." |
| 393 | :type 'float | 410 | :type 'float |
| 394 | :version "29.1") | 411 | :version "29.1") |
| 395 | 412 | ||
| @@ -431,19 +448,19 @@ It is a list of lists (KEY PREDICATE REVERSE).") | |||
| 431 | 448 | ||
| 432 | (defface proced-run-status-code | 449 | (defface proced-run-status-code |
| 433 | '((t (:foreground "green"))) | 450 | '((t (:foreground "green"))) |
| 434 | "Face used in Proced buffers for the running or runnable status code character \"R\"." | 451 | "Face used in Proced buffers for running or runnable status code character \"R\"." |
| 435 | :version "29.1") | 452 | :version "29.1") |
| 436 | 453 | ||
| 437 | (defface proced-interruptible-sleep-status-code | 454 | (defface proced-interruptible-sleep-status-code |
| 438 | '((((class color) (min-colors 88)) (:foreground "DimGrey")) | 455 | '((((class color) (min-colors 88)) (:foreground "DimGrey")) |
| 439 | (t (:italic t))) | 456 | (t (:italic t))) |
| 440 | "Face used in Proced buffers for the interruptible sleep status code character \"S\"." | 457 | "Face used in Proced buffers for interruptible sleep status code character \"S\"." |
| 441 | :version "29.1") | 458 | :version "29.1") |
| 442 | 459 | ||
| 443 | (defface proced-uninterruptible-sleep-status-code | 460 | (defface proced-uninterruptible-sleep-status-code |
| 444 | '((((class color)) (:foreground "red")) | 461 | '((((class color)) (:foreground "red")) |
| 445 | (t (:bold t))) | 462 | (t (:bold t))) |
| 446 | "Face used in Proced buffers for the uninterruptible sleep status code character \"D\"." | 463 | "Face used in Proced buffers for uninterruptible sleep status code character \"D\"." |
| 447 | :version "29.1") | 464 | :version "29.1") |
| 448 | 465 | ||
| 449 | (defface proced-executable | 466 | (defface proced-executable |
| @@ -451,7 +468,9 @@ It is a list of lists (KEY PREDICATE REVERSE).") | |||
| 451 | (((class color) (background dark)) (:foreground "cyan")) | 468 | (((class color) (background dark)) (:foreground "cyan")) |
| 452 | (((class color) (background light)) (:foreground "blue")) | 469 | (((class color) (background light)) (:foreground "blue")) |
| 453 | (t (:bold t))) | 470 | (t (:bold t))) |
| 454 | "Face used in Proced buffers for executables (first word in the args process attribute)." | 471 | "Face used in Proced buffers for executable names. |
| 472 | The first word in the process arguments attribute is assumed to | ||
| 473 | be the executable that runs in the process." | ||
| 455 | :version "29.1") | 474 | :version "29.1") |
| 456 | 475 | ||
| 457 | (defface proced-memory-high-usage | 476 | (defface proced-memory-high-usage |
| @@ -1529,9 +1548,9 @@ Prefix ARG controls sort order, see `proced-sort-interactive'." | |||
| 1529 | (propertize ":" 'font-lock-face 'proced-time-colon) | 1548 | (propertize ":" 'font-lock-face 'proced-time-colon) |
| 1530 | ":"))) | 1549 | ":"))) |
| 1531 | (cond ((< 0 days) | 1550 | (cond ((< 0 days) |
| 1532 | (format "%d-%02d%3$s%02d%3$s%02d" days hours colon minutes seconds)) | 1551 | (format "%d-%02d%s%02d%s%02d" days hours colon minutes colon seconds)) |
| 1533 | ((< 0 hours) | 1552 | ((< 0 hours) |
| 1534 | (format "%02d%2$s%02d%2$s%02d" hours colon minutes seconds)) | 1553 | (format "%02d%s%02d%s%02d" hours colon minutes colon seconds)) |
| 1535 | (t | 1554 | (t |
| 1536 | (format "%02d%s%02d" minutes colon seconds))))) | 1555 | (format "%02d%s%02d" minutes colon seconds))))) |
| 1537 | 1556 | ||