GNU logs - #69454, boring messages


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#69454: Not possible to insert an empty vtable
Resent-From: Eric Marsden <eric.marsden@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Wed, 28 Feb 2024 14:54:02 +0000
Resent-Message-ID: <handler.69454.B.170913203520050 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 69454
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: 69454 <at> debbugs.gnu.org
X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.170913203520050
          (code B ref -1); Wed, 28 Feb 2024 14:54:02 +0000
Received: (at submit) by debbugs.gnu.org; 28 Feb 2024 14:53:55 +0000
Received: from localhost ([127.0.0.1]:45418 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rfLJj-0005DF-2W
	for submit <at> debbugs.gnu.org; Wed, 28 Feb 2024 09:53:55 -0500
Received: from lists.gnu.org ([209.51.188.17]:51948)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eric.marsden@HIDDEN>)
 id 1rfLJg-0005Cr-Rs
 for submit <at> debbugs.gnu.org; Wed, 28 Feb 2024 09:53:53 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eric.marsden@HIDDEN>)
 id 1rfLAb-0001gE-9l
 for bug-gnu-emacs@HIDDEN; Wed, 28 Feb 2024 09:44:29 -0500
Received: from mail.risk-engineering.org ([2a01:4f8:c0c:a3f8::1])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <eric.marsden@HIDDEN>)
 id 1rfLAZ-0004pl-ED
 for bug-gnu-emacs@HIDDEN; Wed, 28 Feb 2024 09:44:29 -0500
DKIM-Signature: a=rsa-sha256; bh=jd0GLd/Yp+GN+SglCTEctZ3gNjwnnCMjPhZ9+i5tMRw=; 
 c=relaxed/relaxed; d=risk-engineering.org;
 h=Subject:Subject:Sender:To:To:Cc:From:From:Date:Date:MIME-Version:MIME-Version:Content-Type:Content-Type:Content-Transfer-Encoding:Content-Transfer-Encoding:Reply-To:In-Reply-To:Message-Id:Message-Id:References:Autocrypt:Openpgp;
 i=@risk-engineering.org; s=default; t=1709130552; v=1; x=1709562552;
 b=MKTHRryzB8eOXVIJthEKz0/aFT0+2HVRGpv0dIrm6sEQACL7sEzbECDAj2gSubm3jw5xOsR9
 WqD0sSnIt/zEFpMHGy7YcCZzFZ0A6AdCqWXPdtnk7ZMu0lAyJPyeh9TfGq0owApmBx241gemwc1
 4ZZWiMhkSuRzcBciYLzprknpcVCTFlZwoJmHz00C3A1lbwfVhZ046N6PYOKuIzRNtJ+0YMsvaU0
 UW0/M3ZcMPzlLWkOwnHlrEGhj+NPyht5vS4U7LCxGmwF6zQRdDld/yP7QB7rSRajJ/ejXS1eoiH
 6kHMazlMwy6hozQCk9HeBQQl710ytr5bmdqFWmPh8CVAg==
Received: by mail.risk-engineering.org (envelope-sender
 <eric.marsden@HIDDEN>) with ESMTPS id 435dd840; Wed, 28 Feb
 2024 15:29:12 +0100
Message-ID: <5aee0900-7459-4aef-b3c1-cdf83e48b874@HIDDEN>
Date: Wed, 28 Feb 2024 15:29:11 +0100
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Content-Language: en-US
From: Eric Marsden <eric.marsden@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Received-SPF: pass client-ip=2a01:4f8:c0c:a3f8::1;
 envelope-from=eric.marsden@HIDDEN;
 helo=mail.risk-engineering.org
X-Spam_score_int: -16
X-Spam_score: -1.7
X-Spam_bar: -
X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1,
 DKIM_SIGNED=0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001,
 T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.4 (-)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.4 (--)

Hello,

The following generates an error. It seems to me that it would be 
preferable to insert the header line and show zero rows for the vtable.

    (require 'vtable)
    (make-vtable :columns '("tweedle" "dum") :objects (list))

Debugger entered--Lisp error: (wrong-number-of-arguments #<subr max> 0)
   max()
   apply(max nil)
   seq-max(nil)
   #f(compiled-function (column index) #<bytecode 
-0x1c8aa8d5280f387a>)(#s(vtable-column :name "tweedle" :width nil 
:min-width nil :max-width nil :primary nil :align right :getter nil 
:formatter nil :displayer nil :-numerical t) 0)
   #f(compiled-function (elt) #<bytecode 
-0x13aa50143314c409>)(#s(vtable-column :name "tweedle" :width nil 
:min-width nil :max-width nil :primary nil :align right :getter nil 
:formatter nil :displayer nil :-numerical t))
   mapcar(#f(compiled-function (elt) #<bytecode -0x13aa50143314c409>) 
(#s(vtable-column :name "tweedle" :width nil :min-width nil :max-width 
nil :primary nil :align right :getter nil :formatter nil :displayer nil 
:-numerical t) #s(vtable-column :name "dum" :width nil :min-width nil 
:max-width nil :primary nil :align right :getter nil :formatter nil 
:displayer nil :-numerical t)))
   #f(compiled-function #'sequence #<bytecode 
0x1843ad21c7e878b4>)(#f(compiled-function (elt) #<bytecode 
-0x13aa50143314c409>) (#s(vtable-column :name "tweedle" :width nil 
:min-width nil :max-width nil :primary nil :align right :getter nil 
:formatter nil :displayer nil :-numerical t) #s(vtable-column :name 
"dum" :width nil :min-width nil :max-width nil :primary nil :align right 
:getter nil :formatter nil :displayer nil :-numerical t)))
   apply(#f(compiled-function #'sequence #<bytecode 0x1843ad21c7e878b4>) 
#f(compiled-function (elt) #<bytecode -0x13aa50143314c409>) 
(#s(vtable-column :name "tweedle" :width nil :min-width nil :max-width 
nil :primary nil :align right :getter nil :formatter nil :displayer nil 
:-numerical t) #s(vtable-column :name "dum" :width nil :min-width nil 
:max-width nil :primary nil :align right :getter nil :formatter nil 
:displayer nil :-numerical t)) nil)
   seq-map(#f(compiled-function (elt) #<bytecode -0x13aa50143314c409>) 
(#s(vtable-column :name "tweedle" :width nil :min-width nil :max-width 
nil :primary nil :align right :getter nil :formatter nil :displayer nil 
:-numerical t) #s(vtable-column :name "dum" :width nil :min-width nil 
:max-width nil :primary nil :align right :getter nil :formatter nil 
:displayer nil :-numerical t)))
   seq-map-indexed(#f(compiled-function (column index) #<bytecode 
-0x1c8aa8d5280f387a>) (#s(vtable-column :name "tweedle" :width nil 
:min-width nil :max-width nil :primary nil :align right :getter nil 
:formatter nil :displayer nil :-numerical t) #s(vtable-column :name 
"dum" :width nil :min-width nil :max-width nil :primary nil :align right 
:getter nil :formatter nil :displayer nil :-numerical t)))
   vtable--compute-widths(#<vtable vtable-158e2cf53118> nil)
   vtable--recompute-cache(#<vtable vtable-158e2cf53118>)
   vtable--ensure-cache(#<vtable vtable-158e2cf53118>)
   vtable-insert(#<vtable vtable-158e2cf53118>)
   make-vtable(:columns ("tweedle" "dum") :objects nil)
   (progn (make-vtable :columns '("tweedle" "dum") :objects (list)))
   elisp--eval-last-sexp(t)
   eval-last-sexp(t)
   eval-print-last-sexp(nil)


GNU Emacs 29.2 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.41, 
cairo version 1.18.0) of 2024-02-27, modified by Debian






Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Eric Marsden <eric.marsden@HIDDEN>
Subject: bug#69454: Acknowledgement (Not possible to insert an empty vtable)
Message-ID: <handler.69454.B.170913203520050.ack <at> debbugs.gnu.org>
References: <5aee0900-7459-4aef-b3c1-cdf83e48b874@HIDDEN>
X-Gnu-PR-Message: ack 69454
X-Gnu-PR-Package: emacs
Reply-To: 69454 <at> debbugs.gnu.org
Date: Wed, 28 Feb 2024 14:54:03 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 bug-gnu-emacs@HIDDEN

If you wish to submit further information on this problem, please
send it to 69454 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
69454: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D69454
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#69454: Not possible to insert an empty vtable
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sat, 09 Mar 2024 08:56:02 +0000
Resent-Message-ID: <handler.69454.B69454.170997452614426 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 69454
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eric Marsden <eric.marsden@HIDDEN>, Lars Ingebrigtsen <larsi@HIDDEN>, Adam Porter <adam@HIDDEN>
Cc: 69454 <at> debbugs.gnu.org
Received: via spool by 69454-submit <at> debbugs.gnu.org id=B69454.170997452614426
          (code B ref 69454); Sat, 09 Mar 2024 08:56:02 +0000
Received: (at 69454) by debbugs.gnu.org; 9 Mar 2024 08:55:26 +0000
Received: from localhost ([127.0.0.1]:60605 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1risUI-0003kc-8N
	for submit <at> debbugs.gnu.org; Sat, 09 Mar 2024 03:55:26 -0500
Received: from eggs.gnu.org ([209.51.188.92]:40526)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1risUG-0003kN-6p
 for 69454 <at> debbugs.gnu.org; Sat, 09 Mar 2024 03:55:24 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1risTd-0000KE-7n; Sat, 09 Mar 2024 03:54:45 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From:
 Date; bh=wOsHP6/UZuQFIMT7YwPnw4vHwh9k0UkO5kXw+aQuPvc=; b=j5gQiLCu18fIX6LI6G+e
 V2Ipo/yYSjJfDKtef9uwyvGqb3z4iBpkGHipz6eWgwAvM5sOOK4Sf8dIvkLSmND+4YZSrpAdWZYtM
 rlMqRTIv0shJBHT9rLogAb9c+X/lecG7Tqzp1RlH2Xdt1w0xM0Q/oit6JhVe5yHQ+MFTpy8V2swKC
 +9HgD5X8JUqfwN1UNVj4ikdodPi6caJtb4D4AEtli4dsbakgCSJ3n5+ODeZ0hCnLikOvOrRIeY57K
 OX3p7XARwmmtVWvNnNQxSEC41onkNAbxiq3F/D18rSsv6GDzc0pTZ9EzUPU5G3Ryv4fGzSJ/pwLav
 V4rnLWGUC4F4ZA==;
Date: Sat, 09 Mar 2024 10:54:43 +0200
Message-Id: <86plw3yecs.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <5aee0900-7459-4aef-b3c1-cdf83e48b874@HIDDEN>
 (message from Eric Marsden on Wed, 28 Feb 2024 15:29:11 +0100)
References: <5aee0900-7459-4aef-b3c1-cdf83e48b874@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Wed, 28 Feb 2024 15:29:11 +0100
> From: Eric Marsden <eric.marsden@HIDDEN>
> 
> Hello,
> 
> The following generates an error. It seems to me that it would be 
> preferable to insert the header line and show zero rows for the vtable.
> 
>     (require 'vtable)
>     (make-vtable :columns '("tweedle" "dum") :objects (list))
> 
> Debugger entered--Lisp error: (wrong-number-of-arguments #<subr max> 0)
>    max()
>    apply(max nil)
>    seq-max(nil)

I'm not sure we want to support zero-size vtables.  A better error
message would be nice, though.  What do others think?

P.S. Adam, I took the liberty of adding you to this discussion, since
you seem lately to be interested in vtable.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#69454: Not possible to insert an empty vtable
Resent-From: Adam Porter <adam@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 11 Mar 2024 19:59:01 +0000
Resent-Message-ID: <handler.69454.B69454.171018708926055 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 69454
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>, Eric Marsden <eric.marsden@HIDDEN>, Lars Ingebrigtsen <larsi@HIDDEN>
Cc: 69454 <at> debbugs.gnu.org
Received: via spool by 69454-submit <at> debbugs.gnu.org id=B69454.171018708926055
          (code B ref 69454); Mon, 11 Mar 2024 19:59:01 +0000
Received: (at 69454) by debbugs.gnu.org; 11 Mar 2024 19:58:09 +0000
Received: from localhost ([127.0.0.1]:41342 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rjlmi-0006mA-Gd
	for submit <at> debbugs.gnu.org; Mon, 11 Mar 2024 15:58:08 -0400
Received: from heron.birch.relay.mailchannels.net ([23.83.209.82]:47975)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <adam@HIDDEN>) id 1rjlmf-0006m0-61
 for 69454 <at> debbugs.gnu.org; Mon, 11 Mar 2024 15:58:07 -0400
X-Sender-Id: dreamhost|x-authsender|adam@HIDDEN
Received: from relay.mailchannels.net (localhost [127.0.0.1])
 by relay.mailchannels.net (Postfix) with ESMTP id A95EC7617F8;
 Mon, 11 Mar 2024 19:57:29 +0000 (UTC)
Received: from pdx1-sub0-mail-a311.dreamhost.com (unknown [127.0.0.6])
 (Authenticated sender: dreamhost)
 by relay.mailchannels.net (Postfix) with ESMTPA id 099CB7616F9;
 Mon, 11 Mar 2024 19:57:28 +0000 (UTC)
ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1710187048; a=rsa-sha256;
 cv=none;
 b=G7m/nw6MGLWh98GgMfgscvRQwSrRWmxKXBC88TbGwuv/lzVfCG57cDdJDJc2PitUXPuxMX
 GMHQjWZXVc3mG8sYCv9uTcg1/Nx0kk0tZFuAZaPNAgAF8Oru1RuGpOTgeP/xvJWy11tfW6
 2Uzlans+qMbEK45pYnY7ifmOzBbdQLVY3DK7TyrmPnCV5iqLV8rNKT24DyY5api8+yH6Hz
 3aCLKKQJxCR8pQmr3ceggpSzCAnZqX2ev2X+mN3dcVs3vVqFCdO/SrtfpZDLlDPp01/+G+
 TcAWC7Ucbwn26MCnk9Wqi57ugHZ5Rxaz7/9i1hYmKcFEq9lxddxXf47PXMVglg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed;
 d=mailchannels.net; s=arc-2022; t=1710187048;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references:dkim-signature;
 bh=a8dwhueUA8a1fK7yS7I23AqqcshLo9Jik6kB3rKLEII=;
 b=ykzvyzVKW4tBNmmhMZjCLP5DQfVdpQvclZgBEpCFfRpuTbMv0Go3yqNKARJUKTVbF5HsgE
 UpoMXHTIYieKVgyV1AXKb1Gl325fpZ+SRj4G8XuqfuJEDEohgqaJqI15jndJAhyZ+CWUxi
 x/KLgw79KGQ+kOUbkOCYo0pR19SjUpF+noxIu/FZMu4lJisuR9kaXToxDTjNfIP8HI8G2s
 yPQJ59PURWlJhwZvGZSFHtBqXiGWSGUrLtbsYuFN+5dR23oZstQgCIgYYgZhOp5BLnClhC
 W9IIxgVT6ENhXxhzF9ZMMn0eY19wx6n7tmmA45PLH8fpc8CGKfCC8x9bcPcRdg==
ARC-Authentication-Results: i=1; rspamd-5db57bc4b6-v7clm;
 auth=pass smtp.auth=dreamhost smtp.mailfrom=adam@HIDDEN
X-Sender-Id: dreamhost|x-authsender|adam@HIDDEN
X-MC-Relay: Neutral
X-MailChannels-SenderId: dreamhost|x-authsender|adam@HIDDEN
X-MailChannels-Auth-Id: dreamhost
X-Arithmetic-Army: 103fa8495d20be1b_1710187048369_2443385048
X-MC-Loop-Signature: 1710187048369:2758609228
X-MC-Ingress-Time: 1710187048368
Received: from pdx1-sub0-mail-a311.dreamhost.com (pop.dreamhost.com
 [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384)
 by 100.126.245.200 (trex/6.9.2); Mon, 11 Mar 2024 19:57:28 +0000
Received: from [10.66.7.46] (unknown [91.193.232.98])
 (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256)
 (No client certificate requested)
 (Authenticated sender: adam@HIDDEN)
 by pdx1-sub0-mail-a311.dreamhost.com (Postfix) with ESMTPSA id 4TtncR1m1xz8S; 
 Mon, 11 Mar 2024 12:57:27 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alphapapa.net;
 s=dreamhost; t=1710187047;
 bh=a8dwhueUA8a1fK7yS7I23AqqcshLo9Jik6kB3rKLEII=;
 h=Date:Subject:To:Cc:From:Content-Type:Content-Transfer-Encoding;
 b=VxLc5XZcAf473SbruESokzhEtpQrVvDRPmsehYPT2ao+LQEr/q0jR87TutEkiXbVB
 4mk1AQkk7777c+vJWk9BOL/QB0WIgcnlJttCMj02x0txUP/al3EyhJ9P82YmnSfFWr
 DcfgEpDHMPeJHCg1qKvFeCH3MwyAmGyedC+ltujgcbgBQSegsqVlbjcRcbzD+LIgST
 deIDE3N7oEBXyQ48NAiRwgBW7ihgihZgJ62MyuPE9LPzZlJS2d55FBZf0GjZw15JTC
 MbYX40ZEYQPFwUY/3i6CO/7nD0ZDhYvVTQ+6gIbuX/QW9GGOVeR4Vl7hKxuSl/uuzg
 aCBwkF1CDaiCw==
Message-ID: <f4afce38-24db-4932-b3de-b947dd805323@HIDDEN>
Date: Mon, 11 Mar 2024 14:57:20 -0500
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
References: <5aee0900-7459-4aef-b3c1-cdf83e48b874@HIDDEN>
 <86plw3yecs.fsf@HIDDEN>
Content-Language: en-US
From: Adam Porter <adam@HIDDEN>
In-Reply-To: <86plw3yecs.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.6 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.4 (/)

Hi Eli,

 > P.S. Adam, I took the liberty of adding you to this discussion, since
 > you seem lately to be interested in vtable.

Thanks for adding me.  Indeed, I've found vtable to be very useful in my 
new listen.el package.

On 3/9/24 02:54, Eli Zaretskii wrote:
>> Date: Wed, 28 Feb 2024 15:29:11 +0100
>> From: Eric Marsden <eric.marsden@HIDDEN>
>>
>> Hello,
>>
>> The following generates an error. It seems to me that it would be
>> preferable to insert the header line and show zero rows for the vtable.
>>
>>      (require 'vtable)
>>      (make-vtable :columns '("tweedle" "dum") :objects (list))
>>
>> Debugger entered--Lisp error: (wrong-number-of-arguments #<subr max> 0)
>>     max()
>>     apply(max nil)
>>     seq-max(nil)
> 
> I'm not sure we want to support zero-size vtables.  A better error
> message would be nice, though.  What do others think?

I tend to agree with Eric that it would be helpful if vtable could 
handle having an empty objects collection value to insert, because it 
saves the application from having to wrap the rather large `make-vtable' 
form in a `when' block, like here:

https://github.com/alphapapa/listen.el/blob/e9ea67350cf3b6cd870561c5e52d4b5255b04d34/listen-queue.el#L135

Also, it's possible that, after inserting a vtable, the collection of 
objects may be modified so that the collection is empty--then if the the 
vtable is reverted, it should be able to handle the case of the 
collection being empty.

AFAICT there's not much the application could do to avoid errors in that 
case, other than working outside of vtable's revert API and calling the 
function that tested the collection and conditionally inserted the 
vtable in the first place--in which case the vtable revert API would 
seem useless.

So IMO, when inserting or reverting a vtable, vtable ought to check 
whether the collection is empty; and if so, handle it gracefully, 
meaning that an "empty vtable" (whatever that would mean; maybe just one 
line of text saying that it's an empty collection) would still be 
inserted, and that if the collection became non-nil, it could be 
reverted and displayed properly.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#69454: Not possible to insert an empty vtable
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 14 Mar 2024 09:39:02 +0000
Resent-Message-ID: <handler.69454.B69454.17104091117867 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 69454
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Adam Porter <adam@HIDDEN>
Cc: larsi@HIDDEN, 69454 <at> debbugs.gnu.org, eric.marsden@HIDDEN
Received: via spool by 69454-submit <at> debbugs.gnu.org id=B69454.17104091117867
          (code B ref 69454); Thu, 14 Mar 2024 09:39:02 +0000
Received: (at 69454) by debbugs.gnu.org; 14 Mar 2024 09:38:31 +0000
Received: from localhost ([127.0.0.1]:48356 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rkhXi-00022p-TH
	for submit <at> debbugs.gnu.org; Thu, 14 Mar 2024 05:38:31 -0400
Received: from eggs.gnu.org ([209.51.188.92]:34724)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1rkhXh-00022c-9d
 for 69454 <at> debbugs.gnu.org; Thu, 14 Mar 2024 05:38:29 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1rkhX1-00024e-5s; Thu, 14 Mar 2024 05:37:47 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From:
 Date; bh=WoUCHENKTgLCK8JRpVEz1N9UeEoPrCsNzIpqwcysyXQ=; b=GfgkdPAUPBd/mgX+pFr3
 VX3q+JSehkIGr6EU5Zg70KiSzy8e9FuFa9YxFjHKeSCFZ7qFu+djFDJToHPf4HQ9Aq/8e4Ub9+78N
 5o6Bt2avs08tZTZY4cGPe5ZzsGYFMo2JgSQ9v48x11JCgB61JC0a6ErUniLGvRdxncfd6MLKQokWh
 YYweixRsjm/E73kXm3CGs4UmCmWF1F7fjJCZRRCG5RpX8sgoLTYSvzWYb3XNczjQUxliqXW4if7sJ
 tlQjxRWquWTJMwobabWAl5lGhd1nQMxpKMb2rdEAm91wAjzi3mW/0tWUNi2SG20Hwes+rpL3wiU4y
 3FGpzzCNP8cntg==;
Date: Thu, 14 Mar 2024 11:37:21 +0200
Message-Id: <864jd9b1da.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <f4afce38-24db-4932-b3de-b947dd805323@HIDDEN> (message
 from Adam Porter on Mon, 11 Mar 2024 14:57:20 -0500)
References: <5aee0900-7459-4aef-b3c1-cdf83e48b874@HIDDEN>
 <86plw3yecs.fsf@HIDDEN> <f4afce38-24db-4932-b3de-b947dd805323@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Mon, 11 Mar 2024 14:57:20 -0500
> Cc: 69454 <at> debbugs.gnu.org
> From: Adam Porter <adam@HIDDEN>
> 
> Hi Eli,
> 
>  > P.S. Adam, I took the liberty of adding you to this discussion, since
>  > you seem lately to be interested in vtable.
> 
> Thanks for adding me.  Indeed, I've found vtable to be very useful in my 
> new listen.el package.
> 
> On 3/9/24 02:54, Eli Zaretskii wrote:
> >> Date: Wed, 28 Feb 2024 15:29:11 +0100
> >> From: Eric Marsden <eric.marsden@HIDDEN>
> >>
> >> Hello,
> >>
> >> The following generates an error. It seems to me that it would be
> >> preferable to insert the header line and show zero rows for the vtable.
> >>
> >>      (require 'vtable)
> >>      (make-vtable :columns '("tweedle" "dum") :objects (list))
> >>
> >> Debugger entered--Lisp error: (wrong-number-of-arguments #<subr max> 0)
> >>     max()
> >>     apply(max nil)
> >>     seq-max(nil)
> > 
> > I'm not sure we want to support zero-size vtables.  A better error
> > message would be nice, though.  What do others think?
> 
> I tend to agree with Eric that it would be helpful if vtable could 
> handle having an empty objects collection value to insert, because it 
> saves the application from having to wrap the rather large `make-vtable' 
> form in a `when' block, like here:
> 
> https://github.com/alphapapa/listen.el/blob/e9ea67350cf3b6cd870561c5e52d4b5255b04d34/listen-queue.el#L135
> 
> Also, it's possible that, after inserting a vtable, the collection of 
> objects may be modified so that the collection is empty--then if the the 
> vtable is reverted, it should be able to handle the case of the 
> collection being empty.
> 
> AFAICT there's not much the application could do to avoid errors in that 
> case, other than working outside of vtable's revert API and calling the 
> function that tested the collection and conditionally inserted the 
> vtable in the first place--in which case the vtable revert API would 
> seem useless.
> 
> So IMO, when inserting or reverting a vtable, vtable ought to check 
> whether the collection is empty; and if so, handle it gracefully, 
> meaning that an "empty vtable" (whatever that would mean; maybe just one 
> line of text saying that it's an empty collection) would still be 
> inserted, and that if the collection became non-nil, it could be 
> reverted and displayed properly.

Thanks.  Would you or Eric like to submit a patch along these lines?




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#69454: Not possible to insert an empty vtable
Resent-From: Adam Porter <adam@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sat, 16 Mar 2024 00:16:02 +0000
Resent-Message-ID: <handler.69454.B69454.171054811419475 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 69454
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: larsi@HIDDEN, 69454 <at> debbugs.gnu.org, eric.marsden@HIDDEN
Received: via spool by 69454-submit <at> debbugs.gnu.org id=B69454.171054811419475
          (code B ref 69454); Sat, 16 Mar 2024 00:16:02 +0000
Received: (at 69454) by debbugs.gnu.org; 16 Mar 2024 00:15:14 +0000
Received: from localhost ([127.0.0.1]:53895 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rlHhh-000543-Ly
	for submit <at> debbugs.gnu.org; Fri, 15 Mar 2024 20:15:14 -0400
Received: from butterfly.birch.relay.mailchannels.net ([23.83.209.27]:42715)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <adam@HIDDEN>) id 1rlHhb-00053p-QB
 for 69454 <at> debbugs.gnu.org; Fri, 15 Mar 2024 20:15:12 -0400
X-Sender-Id: dreamhost|x-authsender|adam@HIDDEN
Received: from relay.mailchannels.net (localhost [127.0.0.1])
 by relay.mailchannels.net (Postfix) with ESMTP id CEBC9C2556;
 Sat, 16 Mar 2024 00:14:29 +0000 (UTC)
Received: from pdx1-sub0-mail-a277.dreamhost.com (unknown [127.0.0.6])
 (Authenticated sender: dreamhost)
 by relay.mailchannels.net (Postfix) with ESMTPA id 68189C0FF1;
 Sat, 16 Mar 2024 00:14:29 +0000 (UTC)
ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1710548069; a=rsa-sha256;
 cv=none;
 b=U3vjpoweoRruquEMWL77IftPQX0wDXQEQoUuHdubjCDWRZKT4Lo8nz8EERUtfCipb7MpPL
 ODKVGLmo7XMNON7u9pq6wEw3sO0D+8EQ+GRjjKmh0hazlpS8S8cRDrHcAXqrZqmYl7vWgf
 G/mMsicqUvrVeSM0heQul1swI27sZlmfoBDg9rUrc3AfQL8dTGSrh8wBlWHDVeh8Y9wO5Q
 U75H825bqdMFMge9QUfywj9RMRsMok04ypZ0f9ugx8KzRF0xPZn0eHtelcr0qZKFSWzw7J
 wQwsGhg+tmK9SCo7N+FaCGguq98H3mP/5XTXdLwDSyglKqHV4iX6P6mepwRexA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed;
 d=mailchannels.net; s=arc-2022; t=1710548069;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references:dkim-signature;
 bh=EwptVStL4SL6szUryMJ6Tfve8k0lpgAHo83RKNLvJ50=;
 b=rfJhNDZCs3iL9ERh28uLQ+lWuOg7P3Ak3RclFF8YgmvqfYIqbyYvoRZVrPPuV1rX0LdEV7
 3sHzyuVvhtmihL0vQgprrYxKDINZ+QFLf2mLuQbY5+oP5UINs+Qgh4sf5WqRR2ACSEQqUE
 /g8UoFhHeDIjBYhvgD4rhyGfIT1/O08GQZvOFSCllJgPrZ0OYxlFkXN1thSEbNdn7C3Izy
 Ga9dFZ47cjKxiPRBEEybr82n10fcQ53omTcTZdQkp/f5ktknb7dPQAOTUqQFKKeXOCqx4d
 e6SKJZkUk4n70v9x6PvkFhzdZl2F1z/BU2MOQ1QduoTKMCmOnJjoSYfJMg3tdw==
ARC-Authentication-Results: i=1; rspamd-76c7995f89-bsttq;
 auth=pass smtp.auth=dreamhost smtp.mailfrom=adam@HIDDEN
X-Sender-Id: dreamhost|x-authsender|adam@HIDDEN
X-MC-Relay: Neutral
X-MailChannels-SenderId: dreamhost|x-authsender|adam@HIDDEN
X-MailChannels-Auth-Id: dreamhost
X-Thoughtful-Gusty: 0cdda49b3ab30acb_1710548069679_2351406609
X-MC-Loop-Signature: 1710548069679:286769728
X-MC-Ingress-Time: 1710548069678
Received: from pdx1-sub0-mail-a277.dreamhost.com (pop.dreamhost.com
 [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384)
 by 100.105.100.41 (trex/6.9.2); Sat, 16 Mar 2024 00:14:29 +0000
Received: from [10.43.0.18] (unknown [193.56.116.15])
 (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256)
 (No client certificate requested)
 (Authenticated sender: adam@HIDDEN)
 by pdx1-sub0-mail-a277.dreamhost.com (Postfix) with ESMTPSA id 4TxM776zCZzxr; 
 Fri, 15 Mar 2024 17:14:27 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alphapapa.net;
 s=dreamhost; t=1710548069;
 bh=EwptVStL4SL6szUryMJ6Tfve8k0lpgAHo83RKNLvJ50=;
 h=Date:Subject:To:Cc:From:Content-Type:Content-Transfer-Encoding;
 b=GXFGlpdEWbqJhX2it3/X0VV/QSQcgMdRRODzuCKYus8nmrfgADmMCmkxAozgopRZ1
 c2BFXetADf+mNtiJgOg7u8Ch8N6UJjOaT5sDgZs+V8l/0y/E+q7bCUHjlRaYPiDzA5
 wdt3buM5OnJMpWTInCLdBIXgiJEI4J4kEIjF3IVze75Swg3AjSqGfyuz5s/855z62q
 +nNQlOsKCTOxnd14p/aTK6LTPl8+Z8oyuAGwXr90BeL7KwSADfeRgzGtZpw3TNPRN5
 lUyex+mwpHXaec8XjqxZrg8LfeAVRt91GmMDj2E4AmtSzuT2yQZV7NcuO37LguW9t6
 s69uIfH/Gv6zA==
Message-ID: <00326f1b-9b06-4ee8-ac3e-5b6a110ef7db@HIDDEN>
Date: Fri, 15 Mar 2024 19:14:25 -0500
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Content-Language: en-US
References: <5aee0900-7459-4aef-b3c1-cdf83e48b874@HIDDEN>
 <86plw3yecs.fsf@HIDDEN> <f4afce38-24db-4932-b3de-b947dd805323@HIDDEN>
 <864jd9b1da.fsf@HIDDEN>
From: Adam Porter <adam@HIDDEN>
In-Reply-To: <864jd9b1da.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.6 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.4 (/)

On 3/14/24 04:37, Eli Zaretskii wrote:

>> So IMO, when inserting or reverting a vtable, vtable ought to check
>> whether the collection is empty; and if so, handle it gracefully,
>> meaning that an "empty vtable" (whatever that would mean; maybe just one
>> line of text saying that it's an empty collection) would still be
>> inserted, and that if the collection became non-nil, it could be
>> reverted and displayed properly.
> 
> Thanks.  Would you or Eric like to submit a patch along these lines?

I'll put it on my Emacs to-do list, but I don't think I'll be able to 
make time for it anytime soon.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#69454: Not possible to insert an empty vtable
Resent-From: Joost Kremers <joostkremers@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 30 Apr 2024 09:12:02 +0000
Resent-Message-ID: <handler.69454.B69454.171446826923347 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 69454
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: Adam Porter <adam@HIDDEN>, Lars Ingebrigtsen <larsi@HIDDEN>, 69454 <at> debbugs.gnu.org, Eric Marsden <eric.marsden@HIDDEN>
Received: via spool by 69454-submit <at> debbugs.gnu.org id=B69454.171446826923347
          (code B ref 69454); Tue, 30 Apr 2024 09:12:02 +0000
Received: (at 69454) by debbugs.gnu.org; 30 Apr 2024 09:11:09 +0000
Received: from localhost ([127.0.0.1]:59245 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s1jW0-00064V-F3
	for submit <at> debbugs.gnu.org; Tue, 30 Apr 2024 05:11:08 -0400
Received: from fout8-smtp.messagingengine.com ([103.168.172.151]:33733)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <joostkremers@HIDDEN>) id 1s1jVv-000648-2Y
 for 69454 <at> debbugs.gnu.org; Tue, 30 Apr 2024 05:11:06 -0400
Received: from compute6.internal (compute6.nyi.internal [10.202.2.47])
 by mailfout.nyi.internal (Postfix) with ESMTP id 6C0C21380914;
 Tue, 30 Apr 2024 05:10:37 -0400 (EDT)
Received: from mailfrontend1 ([10.202.2.162])
 by compute6.internal (MEProxy); Tue, 30 Apr 2024 05:10:37 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.fm; h=
 cc:cc:content-transfer-encoding:content-type:content-type:date
 :date:from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to; s=fm3; t=1714468237;
 x=1714554637; bh=A6dQNEYqiz98gTlTYauHjNElctjpWt6gvF7Eco+3TWc=; b=
 3zrznqa0yZnZSrKgGxMyJcudfakIIor9dyBR71q/J9OMbOGMZkyx4aRebONL6jFp
 W0wyi0hakmsd4xH6zBQguxOickd7HSMe1kOtLGpbq5QcaMvm2OJ5HHO1Ejq9McoR
 6oBJDW3AIP747u+fzIPDN1JeMbffxbBnuNR7bT0FDtVdXdO2jVhlzMXGa3FI41A/
 +IIxYqgOT41SgdrdY3ahOMZ4rs62VKSoj5gjdfjN1JWEXxCDt+bjseetfN1y/EhM
 7d9BLiVqjLxatwjscffx53Vn22TqBJn2FcKojCw1+RRhFR3TFT9NPvMhKIY4iW4P
 pfH6Z2fAJzQxsVKF8Necqg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:content-type:date:date:feedback-id:feedback-id
 :from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy
 :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1714468237; x=
 1714554637; bh=A6dQNEYqiz98gTlTYauHjNElctjpWt6gvF7Eco+3TWc=; b=O
 tX2m+T94AJBc2WYzhJuJjSOc4ZAITYeMLmWPzCSZd4YJkZ03NPT/R7bkWuE2ikc3
 b5NypaEqECzW9aJIDEYJRfScurk6s82MppVALCvmV1+fY8fbqVe+HV9vMu+cJR0m
 q92n5llR1GFlhHQGClAz9K+KDp//JtX/8VjBEKpu06Q08f4L6wfpv1bAC+o750/E
 PQFJWMTY/gTDdz4w3ML7JijxcEE+A9O+tLLExHwYyeVYSN1j7SA6Gw/8P1LACPab
 ChEVaH22bJ1V37/pUiKMWpHesgFZ3Xkq9KwsP3Yucauh7WR8YlxQsDwxFTT4KEjw
 i6KVHII7S0aX6KmTXF92g==
X-ME-Sender: <xms:jbUwZlpCbsczo_dmSw3Nk96MvUdspUoI0plDVhGHx1Uvx-_bWlZSOQ>
 <xme:jbUwZno4fXim_NNodUSoPBmT_wDEnEGhrXmKn7yNN39TyQqCy8_2_nlo5nvsri6FK
 wneTWHuq1xU5Q>
X-ME-Received: <xmr:jbUwZiMA56GRVhpBOU52ARVDg5wg7VyTCNA8d2ZUo5MMwgUhXi_jY_NuvI5kPLd2XFZ2BK86d3w83hrYpttXU2Dp6YGX6h4DLHlXSO6mPzW5PgKl6Aoh2SNjh7k6QkWH-FBqJ61cTd8NYnJ1o49gNv24jufcPVIoKuHFYQ>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvddufedgudefucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne
 cujfgurhephffvvefujghffgffkfggtgfgsehtqhertddtreejnecuhfhrohhmpeflohho
 shhtucfmrhgvmhgvrhhsuceojhhoohhsthhkrhgvmhgvrhhssehfrghsthhmrghilhdrfh
 hmqeenucggtffrrghtthgvrhhnpeetteekvddvffefuefhkeetveejieejkeevgfdvtdej
 tedvjeeiteekteeitdejhfenucffohhmrghinhepghhithhhuhgsrdgtohhmnecuvehluh
 hsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepjhhoohhsthhkrhgv
 mhgvrhhssehfrghsthhmrghilhdrfhhm
X-ME-Proxy: <xmx:jbUwZg7toTgJICzO1OF2LnGjFk77uJLAWUsw_fznkzh5Oxt88PpJhA>
 <xmx:jbUwZk5HGIFZBbds91Rp0B1kOll3bFuZb6S-4Qca4gh3We_J1Mk_Rw>
 <xmx:jbUwZogMNajo0t7fWmdhuVrGmC3T1gg-9VSKKEo6MYQcAlk4tRI_TA>
 <xmx:jbUwZm4X1jd40xaQVImO5bV-VIOULq1jc0u5gTIIBqizTAeqql-btA>
 <xmx:jbUwZuQwQUzbeczt5qb1bqVh85UCWL64lTl9udo2lvB-O1ltooTgVjJF>
Feedback-ID: ie15541ac:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue,
 30 Apr 2024 05:10:35 -0400 (EDT)
From: Joost Kremers <joostkremers@HIDDEN>
In-Reply-To: <86plw3yecs.fsf@HIDDEN> (Eli Zaretskii's message of "Sat, 09 Mar
 2024 10:54:43 +0200")
References: <5aee0900-7459-4aef-b3c1-cdf83e48b874@HIDDEN>
 <86plw3yecs.fsf@HIDDEN>
User-Agent: mu4e 1.12.2; emacs 29.3
Date: Tue, 30 Apr 2024 11:10:32 +0200
Message-ID: <86jzkfcj1z.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

On Sat, Mar 09 2024, Eli Zaretskii wrote:
>> Date: Wed, 28 Feb 2024 15:29:11 +0100
>> From: Eric Marsden <eric.marsden@HIDDEN>
>>=20
>> Hello,
>>=20
>> The following generates an error. It seems to me that it would be=20
>> preferable to insert the header line and show zero rows for the vtable.
>>=20
>>  =C2=A0=C2=A0 (require 'vtable)
>>  =C2=A0=C2=A0 (make-vtable :columns '("tweedle" "dum") :objects (list))
>>=20
>> Debugger entered--Lisp error: (wrong-number-of-arguments #<subr max> 0)
>>  =C2=A0 max()
>>  =C2=A0 apply(max nil)
>>  =C2=A0 seq-max(nil)
>

I ran into this same problem myself, trying to use vtable for my package
Ebib[1]. I did some digging and found that the cause of the problem is not =
that
the vtable is empty, but rather that the column widths cannot be determined=
. If
you pass explicit widths for each column, `make-vtable` (or rather
`vtable-insert`) works just fine with an empty table:

```
(make-vtable :columns '((:name "tweedle" :width 30) (:name "dum" :width 10))
             :objects (list))
```

The error occurs in `vtable--compute-widths`, which returns a vector with t=
he
widths of each column. For columns that don't have their width set explicit=
ly,
the width is computed on the basis of the elements in the column, but if th=
ere
are no elements, that fails.

> I'm not sure we want to support zero-size vtables.  A better error
> message would be nice, though.  What do others think?

For my purpose (i.e., Ebib), support for empty vtables would be a big plus.=
 I
wouldn't even want to display some sort of text or warning, just the header=
 and
nothing else. (I guess this could be made configurable, though. Something l=
ike
an :if-empty slot specifying a function to call if the table is empty. This
function could then display some text, give a warning in the minibuffer, ra=
ise
an error, or do nothing at all.)

In order to support empty vtables, the column width issue would have to be
resolved, of course. My suggestion (again coming from my use-case) would be=
 that
if some columns have no :width slot, the remaining available width (i.e., t=
he
window width minus the explicit column widths) is divided evenly between th=
em.

Of course, that may turn out to be suboptimal once objects are added to the
vtable, but I don't think it's unreasonable to expect the programmer to take
that into account when using vtable.el. And the user always has the option =
of
regenerating the table. (There's `vtable-revert-command`, after all.)

For me, the reason why this would be useful is that the data that I want to
display in a vtable has one field that can be very long, while the others a=
re
usually fairly short. In my current, custom table implementation, this long
field is the right-most column and can thus use the full width of the windo=
w to
display its data. This works fine with vtable, except if the table is empty.


Footnotes:
[1]  https://github.com/joostkremers/ebib/tree/devel/vtable

--=20
Joost Kremers
Life has its moments





Last modified: Tue, 30 Apr 2024 09:15:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.