GNU bug report logs - #66191
erc-ibuffer.el: suspicious use of hash-table-size

Previous Next

Package: emacs;

Reported by: Mattias Engdegård <mattias.engdegard <at> gmail.com>

Date: Mon, 25 Sep 2023 09:46:01 UTC

Severity: wishlist

Done: "J.P." <jp <at> neverwas.me>

Bug is archived. No further changes may be made.

Full log


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

From: "J.P." <jp <at> neverwas.me>
To: Mattias Engdegård <mattias.engdegard <at> gmail.com>
Cc: emacs-erc <at> gnu.org, 66191 <at> debbugs.gnu.org
Subject: Re: bug#66191: erc-ibuffer.el: suspicious use of hash-table-size
Date: Mon, 25 Sep 2023 08:02:41 -0700
[Message part 1 (text/plain, inline)]
Mattias Engdegård <mattias.engdegard <at> gmail.com> writes:

> In erc-ibuffer.el:
>
> (define-ibuffer-column
>  erc-members (:name "Users")
>   (if (and (eq major-mode 'erc-mode)
> 	   (boundp 'erc-channel-users)
> 	   (hash-table-p erc-channel-users)
> 	   (> (hash-table-size erc-channel-users) 0))
>      (number-to-string (hash-table-size erc-channel-users))
>     ""))
>
> Perhaps I'm mistaken but shouldn't hash-table-size be hash-table-count here?

Nice find! I've attached a patch that should fix the issue. If no one
says anything, I will add it or something similar in a few days. Thanks.

[0001-5.6-Fix-wrong-User-column-count-in-erc-ibuffer.patch (text/x-patch, attachment)]

This bug report was last modified 1 year and 282 days ago.

Previous Next


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