From: Eli Zaretskii <eliz@gnu.org>
To: Laurence Warne <laurencewarne@gmail.com>
Cc: 59842@debbugs.gnu.org
Subject: bug#59842: [PATCH] Make proced-update Preserve Refinements
Date: Tue, 06 Dec 2022 19:49:06 +0200 [thread overview]
Message-ID: <83y1rk5sod.fsf@gnu.org> (raw)
In-Reply-To: <CAE2oLqjRFc_PcS7Yd0fbffpEV=G=7XifivB5WDohmzXwEDqcsw@mail.gmail.com> (message from Laurence Warne on Mon, 5 Dec 2022 20:26:26 +0000)
> From: Laurence Warne <laurencewarne@gmail.com>
> Date: Mon, 5 Dec 2022 20:26:26 +0000
>
> The patch fixes aims to fix this by introducing a new buffer local variable "proced-refinements" which stores
> information about the current refinements, and is used by proced-update to further refine
> proced-process-alist in the case it is non-nil.
Thanks. Unfortunately, we don't have a test suite for proced.el, so
non-trivial changes to it always ruin the risk of producing regressions.
How to test this, and how did you test it?
> * lisp/proced.el (proced-refinements): New buffer local variable
> which tracks the current refinements.
> (proced-refine): Set proced-refinements variable and defer setting of
> proced-process-alist to proced-update.
> (proced-update): Take into account proced-refinements when setting
> proced-process-alist.
> (proced-revert): Set proced-refinements to nil prior to calling proced-update.
Please quote symbols in log entries 'like this'. (Do not quote symbols
inside parentheses, only in the descriptive text.)
> + (pcase-dolist (`(,refiner ,pid ,key ,grammar) proced-refinements)
> + ;; It's possible the process has exited since the refinement was made
> + (when (assq pid proced-process-alist)
What happens if that process did exit? Shouldn't we reset
proced-refinements to nil?
> (defun proced-revert (&rest _args)
> "Reevaluate the process listing based on the currently running processes.
> -Preserves point and marks."
> +Preserves point and marks, but not refinements."
Please add a cross-reference to proced-refine here, so that the reader who
doesn't know what a "refinement" is could find out.
next prev parent reply other threads:[~2022-12-06 17:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-05 20:26 bug#59842: [PATCH] Make proced-update Preserve Refinements Laurence Warne
2022-12-06 17:49 ` Eli Zaretskii [this message]
2022-12-08 19:06 ` Laurence Warne
2022-12-14 14:55 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83y1rk5sod.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=59842@debbugs.gnu.org \
--cc=laurencewarne@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).