unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#50194: 28.0.50; tabulated-list-print (with non-nil UPDATE argument) doesn't clean up excess entries
@ 2021-08-24 18:55 Shitikanth
  2021-08-24 19:13 ` Shitikanth
  0 siblings, 1 reply; 3+ messages in thread
From: Shitikanth @ 2021-08-24 18:55 UTC (permalink / raw)
  To: 50194

(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.





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-08-25 11:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-24 18:55 bug#50194: 28.0.50; tabulated-list-print (with non-nil UPDATE argument) doesn't clean up excess entries Shitikanth
2021-08-24 19:13 ` Shitikanth
2021-08-25 11:35   ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).