GNU bug report logs - #50194
28.0.50; tabulated-list-print (with non-nil UPDATE argument) doesn't clean up excess entries

Previous Next

Package: emacs;

Reported by: Shitikanth <shitikanth1 <at> gmail.com>

Date: Tue, 24 Aug 2021 18:56:02 UTC

Severity: normal

Found in version 28.0.50

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


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

From: Shitikanth <shitikanth1 <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.0.50; tabulated-list-print (with non-nil UPDATE argument) doesn't
 clean up excess entries
Date: Wed, 25 Aug 2021 00:25:00 +0530
(tabulated-list-print nil t) does not seem to clean up excess remaining
entries/lines if the number of tabulated-list-entries has decreased.

Demo:
    (defun demo-generate-entries (n)
        (mapcar (lambda (i)
                  (list i (vector (format "title %s" i))))
                (number-sequence 1 n)))

    (let ((buf (get-buffer-create "*demo*")))
      (with-current-buffer buf
        (tabulated-list-mode)
        (setq tabulated-list-format '[("title" 70 t)])
        (setq tabulated-list-sort-key '("title"))
        (setq tabulated-list-entries (demo-generate-entries 8))
        (tabulated-list-print)
        (pop-to-buffer buf)
        (setq tabulated-list-entries (demo-generate-entries 4))
        (tabulated-list-print nil t)
        ))

Expected behaviour:
At the end, *demo* buffer should show only 4 entries.

Observed behaviour:
*demo* buffer still holds 8 entries, still showing 4 entries that are
now removed from tabulated-list-entries.




This bug report was last modified 3 years and 272 days ago.

Previous Next


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