GNU bug report logs - #77713
30.1; bug in proced-filter function in ./lisp/proced.el

Previous Next

Package: emacs;

Reported by: Armin Darvish <armindarvish <at> gmail.com>

Date: Thu, 10 Apr 2025 17:51:02 UTC

Severity: normal

Found in version 30.1

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: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#77713: closed (30.1; bug in proced-filter function in
 ./lisp/proced.el)
Date: Sun, 13 Apr 2025 09:42:04 +0000
[Message part 1 (text/plain, inline)]
Your message dated Sun, 13 Apr 2025 12:40:58 +0300
with message-id <86zfgkjt5h.fsf <at> gnu.org>
and subject line Re: bug#77713: 30.1; bug in proced-filter function in ./lisp/proced.el
has caused the debbugs.gnu.org bug report #77713,
regarding 30.1; bug in proced-filter function in ./lisp/proced.el
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
77713: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=77713
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Armin Darvish <armindarvish <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 30.1; bug in proced-filter function in ./lisp/proced.el
Date: Thu, 10 Apr 2025 10:50:15 -0700
[Message part 3 (text/plain, inline)]
Hi,

I was trying to use the function `proced-filter' and pass a filter-list to it and I noticed that there is a bug in the function.

According to the documentation the filter-list can be a list of cons in the format `(function . FUN)' and in this case `FUN' should be applied to the attribute list of each process. However, if you look at the lines 1185-1188 in ./lisp/proced.el, instaed of applying the `(cdr filter)', `(car filter)' is passed to funcall which creates an error.

The `(if (funcall (car filter) (cdr process))' on line 1187 should be `(if (funcall (cdr filter) (cdr process))'.


-- 


Best Regards,



*Armin Darvish*
------------------------------------------------------------------------
[www.armindarvish.com]


[www.armindarvish.com] <https://www.armindarvish.com/>
[Message part 4 (text/html, inline)]
[Message part 5 (message/rfc822, inline)]
From: Eli Zaretskii <eliz <at> gnu.org>
To: Armin Darvish <armindarvish <at> gmail.com>
Cc: 77713-done <at> debbugs.gnu.org
Subject: Re: bug#77713: 30.1; bug in proced-filter function in ./lisp/proced.el
Date: Sun, 13 Apr 2025 12:40:58 +0300
> From: Armin Darvish <armindarvish <at> gmail.com>
> Date: Thu, 10 Apr 2025 10:50:15 -0700
> 
> I was trying to use the function proced-filter and pass a filter-list to it and I noticed that there is a bug in
> the function.
> 
> According to the documentation the filter-list can be a list of cons in the format (function . FUN) and in this
> case FUN should be applied to the attribute list of each process. However, if you look at the lines 1185-1188 in
> ./lisp/proced.el, instaed of applying the (cdr filter), (car filter) is passed to funcall which creates an
> error.
> 
> The (if (funcall (car filter) (cdr process)) on line 1187 should be (if (funcall (cdr
> filter) (cdr process)).

Thanks, now fixed on the emacs-30 branch, and closing the bug.


This bug report was last modified 38 days ago.

Previous Next


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