bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#50194: 28.0.50; tabulated-list-print (with non-nil UPDATE argument)


From: Shitikanth
Subject: bug#50194: 28.0.50; tabulated-list-print (with non-nil UPDATE argument) doesn't clean up excess entries
Date: Wed, 25 Aug 2021 00:43:11 +0530

Proposed fix.

On Wed, 25 Aug 2021 at 00:26, Shitikanth <shitikanth1@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.
>
>
>

Attachment: 0001-tabulated-list-print-delete-excess-lines-bug-50194.patch
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]