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 message dated Sat, 09 Nov 2024 12:15:38 +0200
with message-id <86o72on25x.fsf <at> gnu.org>
and subject line Re: bug#73775: 30.0.90; vtable: can't handle 0 data rows
has caused the debbugs.gnu.org bug report #73775,
regarding 30.0.90; vtable: can't handle 0 data rows
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> 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)]
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
[Message part 3 (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.
This bug report was last modified 250 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.