all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#73775: 30.0.90; vtable: can't handle 0 data rows
@ 2024-10-12 17:22 Augusto Stoffel
  2024-10-12 18:24 ` Eli Zaretskii
  0 siblings, 1 reply; 13+ messages in thread
From: Augusto Stoffel @ 2024-10-12 17:22 UTC (permalink / raw)
  To: 73775

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






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

end of thread, other threads:[~2024-11-09 10:15 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-12 17:22 bug#73775: 30.0.90; vtable: can't handle 0 data rows Augusto Stoffel
2024-10-12 18:24 ` Eli Zaretskii
2024-10-13  0:12   ` Adam Porter
2024-10-13  5:27     ` Eli Zaretskii
2024-10-13  8:00       ` Joost Kremers
2024-10-14 11:25       ` Joost Kremers
2024-10-16  4:12         ` Adam Porter
2024-10-16 16:19           ` Joost Kremers
2024-10-27 10:34             ` Eli Zaretskii
2024-10-29 23:39               ` Adam Porter
2024-10-31 10:30             ` Eli Zaretskii
2024-11-06  8:53               ` Joost Kremers
2024-11-09 10:15                 ` Eli Zaretskii

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.