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.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 50194 in the body.
You can then email your comments to 50194 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#50194
; Package
emacs
.
(Tue, 24 Aug 2021 18:56:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Shitikanth <shitikanth1 <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Tue, 24 Aug 2021 18:56:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
(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.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#50194
; Package
emacs
.
(Tue, 24 Aug 2021 19:14:02 GMT)
Full text and
rfc822 format available.
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)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#50194
; Package
emacs
.
(Wed, 25 Aug 2021 11:36:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 50194 <at> debbugs.gnu.org (full text, mbox):
Shitikanth <shitikanth1 <at> gmail.com> writes:
> Proposed fix.
Makes sense to me; applied to Emacs 28.
This change was small enough to apply without assigning copyright to the
FSF, but for future patches you want to submit, it might make sense to
get the paperwork started now, so that subsequent patches can be applied
speedily. Would you be willing to sign such paperwork?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
bug marked as fixed in version 28.1, send any further explanations to
50194 <at> debbugs.gnu.org and Shitikanth <shitikanth1 <at> gmail.com>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Wed, 25 Aug 2021 11:36:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 23 Sep 2021 11:24:09 GMT)
Full text and
rfc822 format available.
This bug report was last modified 2 years and 208 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.