GNU bug report logs -
#50194
28.0.50; tabulated-list-print (with non-nil UPDATE argument) doesn't clean up excess entries
Previous Next
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 #8 received at 50194 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Proposed fix.
On Wed, 25 Aug 2021 at 00:26, Shitikanth <shitikanth1 <at> gmail.com> wrote:
>
> (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.
>
>
>
[0001-tabulated-list-print-delete-excess-lines-bug-50194.patch (application/octet-stream, attachment)]
This bug report was last modified 3 years and 273 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.