GNU bug report logs - #70664
29.3; vtable-insert-object cannot insert at top of table

Previous Next

Package: emacs;

Reported by: Joost Kremers <joostkremers <at> fastmail.fm>

Date: Tue, 30 Apr 2024 09:32:02 UTC

Severity: normal

Found in version 29.3

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #26 received at 70664 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Joost Kremers <joostkremers <at> fastmail.fm>
Cc: adam <at> alphapapa.net, 70664 <at> debbugs.gnu.org
Subject: Re: bug#70664: 29.3; vtable-insert-object cannot insert at top of
 table
Date: Thu, 09 May 2024 11:45:57 +0300
> From: Joost Kremers <joostkremers <at> fastmail.fm>
> Cc: Eli Zaretskii <eliz <at> gnu.org>,  70664 <at> debbugs.gnu.org
> Date: Tue, 07 May 2024 12:52:56 +0200
> 
> Here's my first attempt at fixing this bug and generally making
> `vtable-insert-object` more versatile (see attachment).

Thanks.

> A few questions / comments:
> 
> - Is this the right place to send this patch? Or should it go to emacs-devel?

Here is the right place for patches.

> - I don't know if this change warrants a NEWS entry. It's not really
>   user-facing, so I didn't add one.

This changes a public API, so it does need to be called out in NEWS,
just in the section which lists Lisp-level changes.

> - I don't know how to write a non-interactive test for my changes, because
>   `vtable-insert-object` only works if the vtable is being displayed in a
>   buffer. So instead I wrote an interactive function to test all possible
>   combinations of LOCATION and BEFORE:

A test can be interactive (since the test suite can be run
interactively as well), but then please skip the test if it's run in
batch mode.

> +@defun vtable-insert-object table object &optional location before
> +Insert @var{object} into @var{table}.  @var{location} should be an
> +object in the table, the new object is inserted after this object, or
> +before it if @var{before} is non-nil.  If @var{location} is nil,
                                    ^^^                        ^^^
@code{nil}, in both cases.

> +;; FIXME: The fact that the `location' argument of
> +;; `vtable-insert-object' can be an integer and is then interpreted as
> +;; an index precludes the use of integers as objects. This seems a very
                                                       ^^
Two spaces between sentences, please.




This bug report was last modified 1 year and 6 days ago.

Previous Next


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