unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Adam Porter <adam@alphapapa.net>
To: Eli Zaretskii <eliz@gnu.org>, Augusto Stoffel <arstoffel@gmail.com>
Cc: 73775@debbugs.gnu.org
Subject: bug#73775: 30.0.90; vtable: can't handle 0 data rows
Date: Sat, 12 Oct 2024 19:12:50 -0500	[thread overview]
Message-ID: <04511bb6-0832-47af-8067-2d44ed790f52@alphapapa.net> (raw)
In-Reply-To: <86jzeduqlp.fsf@gnu.org>

Hi Eli, Augusto,

On 10/12/24 13:24, Eli Zaretskii wrote:
>> From: Augusto Stoffel <arstoffel@gmail.com>
>> Date: Sat, 12 Oct 2024 19:22:46 +0200
>>
>> 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
>>
>>
> 
> Adam, any comments or suggestions?

I may be mistaken, but this seems like a duplicate of bug#69454.

--Adam





  reply	other threads:[~2024-10-13  0:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2024-10-13  5:27     ` Eli Zaretskii
2024-10-13  8:00       ` Joost Kremers
2024-10-14 11:25       ` Joost Kremers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=04511bb6-0832-47af-8067-2d44ed790f52@alphapapa.net \
    --to=adam@alphapapa.net \
    --cc=73775@debbugs.gnu.org \
    --cc=arstoffel@gmail.com \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).