GNU bug report logs - #59842
[PATCH] Make proced-update Preserve Refinements

Previous Next

Package: emacs;

Reported by: Laurence Warne <laurencewarne <at> gmail.com>

Date: Mon, 5 Dec 2022 20:27:01 UTC

Severity: wishlist

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 59842 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Laurence Warne <laurencewarne <at> gmail.com>
Cc: 59842 <at> debbugs.gnu.org
Subject: Re: bug#59842: [PATCH] Make proced-update Preserve Refinements
Date: Tue, 06 Dec 2022 19:49:06 +0200
> From: Laurence Warne <laurencewarne <at> 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.




This bug report was last modified 2 years and 159 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.