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


View this message in rfc822 format

From: Laurence Warne <laurencewarne <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 59842 <at> debbugs.gnu.org
Subject: bug#59842: [PATCH] Make proced-update Preserve Refinements
Date: Thu, 8 Dec 2022 19:06:35 +0000
[Message part 1 (text/plain, inline)]
> 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?

If it's helpful, I've attached a (seperate) patch containing a test suite
(or at least the start of) for proced.el (though some parts are somewhat
awkward - mainly testing the proced buffer contains strings we would expect
- of course comments on the approach welcome), the last test there:
'proced-refine-with-update-test' fails without the original patch.  I
didn't want to conflate the original patch with it, I can open a new report
with it if you prefer.

> What happens if that process did exit?  Shouldn't we reset
> proced-refinements to nil?

This could lead to bad behaviour if multiple refinements are active in a
buffer, for example if I refine by CPU usage of process A (which makes
proced only show processes with usage >= process A's) and then again by the
CPU usage of process B, if process A exits, our second refinement is still
valid (given process B is still running) eventhough the first isn't.  We
could remove the refinement from the list, but it wouldn't change the
behaviour.

Thanks, Laurence
[Message part 2 (text/html, inline)]
[0001-Make-proced-update-preserve-refinements.patch (text/x-patch, attachment)]
[0001-Add-tests-for-proced.patch (text/x-patch, attachment)]

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.