GNU bug report logs -
#73775
30.0.90; vtable: can't handle 0 data rows
Previous Next
Reported by: Augusto Stoffel <arstoffel <at> gmail.com>
Date: Sat, 12 Oct 2024 17:24:02 UTC
Severity: normal
Merged with 74013
Found in versions 30.0.90, 31.0.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your bug report
#73775: 30.0.90; vtable: can't handle 0 data rows
which was filed against the emacs package, has been closed.
The explanation is attached below, along with your original report.
If you require more details, please reply to 73775 <at> debbugs.gnu.org.
--
73775: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=73775
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
> From: Joost Kremers <joostkremers <at> fastmail.fm>
> Cc: adam <at> alphapapa.net, arstoffel <at> gmail.com, 73775 <at> debbugs.gnu.org
> Date: Wed, 06 Nov 2024 09:53:14 +0100
>
> On Thu, Oct 31 2024, Eli Zaretskii wrote:
> [empty vtable patches]
> > Thanks. I wanted to install this, but at least the first patch no
> > longer applies; could you please rebase and resubmit? When you do,
> > please mention the bug number in all the commit log messages.
>
> Here are the updated patches, including the documentation changes you
> requested and the when-let --> when-let* conversion.
Thanks, installed on the master branch, and closing the bug.
[Message part 3 (message/rfc822, inline)]
This call produces the error (wrong-number-of-arguments #<subr max> 0):
(make-vtable
:use-header-line nil
:columns (mapcar (lambda (name) (list :name name :min-width 10))
'("A" "B" "C"))
:objects nil)
The following would get rid of the error, but the resulting table
misbehaves slightly (say when I press S on it to sort). Perhaps someone
else has a better idea.
modified lisp/emacs-lisp/vtable.el
@@ -861,9 +861,10 @@ vtable--compute-widths
(vtable--compute-width table (vtable-column-width column)))
;; Compute based on the displayed widths of
;; the data.
- (seq-max (seq-map (lambda (elem)
+ (seq-max (or (seq-map (lambda (elem)
(nth 1 (elt (cdr elem) index)))
- cache)))))
+ cache)
+ '(0))))))
;; Let min-width/max-width specs have their say.
(when-let ((min-width (and (vtable-column-min-width column)
(vtable--compute-width
This bug report was last modified 249 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.