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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 66191 in the body.
You can then email your comments to 66191 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#66191; Package emacs. (Mon, 25 Sep 2023 09:46:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Mattias Engdegård <mattias.engdegard <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 25 Sep 2023 09:46:02 GMT) Full text and rfc822 format available.

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

From: Mattias Engdegård <mattias.engdegard <at> gmail.com>
To: Emacs Bug Report <bug-gnu-emacs <at> gnu.org>
Cc: "J.P." <jp <at> neverwas.me>
Subject: erc-ibuffer.el: suspicious use of hash-table-size
Date: Mon, 25 Sep 2023 11:45:16 +0200
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?





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#66191; Package emacs. (Mon, 25 Sep 2023 15:04:02 GMT) Full text and rfc822 format available.

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)]

Severity set to 'wishlist' from 'normal' Request was from Stefan Kangas <stefankangas <at> gmail.com> to control <at> debbugs.gnu.org. (Sat, 30 Sep 2023 23:15:02 GMT) Full text and rfc822 format available.

Reply sent to "J.P." <jp <at> neverwas.me>:
You have taken responsibility. (Tue, 03 Oct 2023 01:21:02 GMT) Full text and rfc822 format available.

Notification sent to Mattias Engdegård <mattias.engdegard <at> gmail.com>:
bug acknowledged by developer. (Tue, 03 Oct 2023 01:21:02 GMT) Full text and rfc822 format available.

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

From: "J.P." <jp <at> neverwas.me>
To: 66191-done <at> debbugs.gnu.org
Cc: Mattias Engdegård <mattias.engdegard <at> gmail.com>,
 emacs-erc <at> gnu.org
Subject: Re: bug#66191: erc-ibuffer.el: suspicious use of hash-table-size
Date: Mon, 02 Oct 2023 18:20:21 -0700
"J.P." <jp <at> neverwas.me> writes:

> If no one says anything, I will add it or something similar in a few
> days.

I ended up only installing the bug fix portions, but I may open another
report for the feature parts eventually. Thanks and closing.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 31 Oct 2023 11:24:09 GMT) Full text and rfc822 format available.

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

Previous Next


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