unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Joost Kremers <joostkremers@fastmail.fm>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Adam Porter <adam@alphapapa.net>,
	Lars Ingebrigtsen <larsi@gnus.org>,
	69454@debbugs.gnu.org,
	Eric Marsden <eric.marsden@risk-engineering.org>
Subject: bug#69454: Not possible to insert an empty vtable
Date: Sun, 05 May 2024 14:15:06 +0200	[thread overview]
Message-ID: <86ikzstpyt.fsf@fastmail.fm> (raw)
In-Reply-To: <86jzkfcj1z.fsf@p200300d6272f17850b27304eb886326a.dip0.t-ipconnect.de> (Joost Kremers's message of "Tue, 30 Apr 2024 11:10:32 +0200")

On Tue, Apr 30 2024, Joost Kremers wrote:
> On Sat, Mar 09 2024, Eli Zaretskii wrote:
>>> Date: Wed, 28 Feb 2024 15:29:11 +0100
>>> From: Eric Marsden <eric.marsden@risk-engineering.org>
>>> 
>>> 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 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.

As I just realised, the problem is actually bigger than that: given the current
implementation of vtable-insert-object, it's not possible to add objects to an
empty vtable. (Specifically, it uses nconc twice, once on the list of objects
and once the cache, both of which fail silently if those are nil, and it uses
setcar on the cache, which yields an error if the cache is nil.)

Just wanted to mention that here for completeness' sake, if anyone ever decides
to fix these issues. For now, the easiest thing to do is probably do disallow
empty vtables altogether.

-- 
Joost Kremers
Life has its moments





  parent reply	other threads:[~2024-05-05 12:15 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-28 14:29 bug#69454: Not possible to insert an empty vtable Eric Marsden
2024-03-09  8:54 ` Eli Zaretskii
2024-03-11 19:57   ` Adam Porter
2024-03-14  9:37     ` Eli Zaretskii
2024-03-16  0:14       ` Adam Porter
2024-04-30  9:10   ` Joost Kremers
2024-04-30 12:14     ` Eli Zaretskii
     [not found]       ` <8f5fb814-5d88-4ad3-b12a-8246325d5d21@alphapapa.net>
2024-05-01 11:54         ` Eli Zaretskii
2024-05-02  7:31         ` Joost Kremers
2024-05-05 12:15     ` Joost Kremers [this message]
2024-05-30 21:40       ` Joost Kremers
2024-05-30 21:52         ` Joost Kremers
2024-05-31  5:24           ` Eli Zaretskii
2024-05-31  6:54             ` Joost Kremers
2024-06-02 17:49               ` Adam Porter
2024-06-03 12:13                 ` Joost Kremers
2024-06-08 12:34                   ` Eli Zaretskii

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=86ikzstpyt.fsf@fastmail.fm \
    --to=joostkremers@fastmail.fm \
    --cc=69454@debbugs.gnu.org \
    --cc=adam@alphapapa.net \
    --cc=eliz@gnu.org \
    --cc=eric.marsden@risk-engineering.org \
    --cc=larsi@gnus.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).