From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#70664: 29.3; vtable-insert-object cannot insert at top of table Date: Thu, 09 May 2024 11:45:57 +0300 Message-ID: <868r0j74qi.fsf@gnu.org> References: <86o79rb3js.fsf@p200300d6272f17850b27304eb886326a.dip0.t-ipconnect.de> <864jbjqc0n.fsf@gnu.org> <8634r0yacn.fsf@p200300d6272c85ce335985c3abedb491.dip0.t-ipconnect.de> <6affc493-a048-465d-a237-afa03896d892@alphapapa.net> <86frv0frp6.fsf@p200300d6272c85ce335985c3abedb491.dip0.t-ipconnect.de> <9333046c-194c-4b59-895a-2bf8427a6135@alphapapa.net> <868r0levw7.fsf@fastmail.fm> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6117"; mail-complaints-to="usenet@ciao.gmane.io" Cc: adam@alphapapa.net, 70664@debbugs.gnu.org To: Joost Kremers Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu May 09 10:47:01 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1s4zQb-0001Ib-JU for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 09 May 2024 10:47:01 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s4zQP-0005dk-70; Thu, 09 May 2024 04:46:49 -0400 Original-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 ) id 1s4zQC-0005O9-No for bug-gnu-emacs@gnu.org; Thu, 09 May 2024 04:46:44 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s4zQC-0003lL-Fs for bug-gnu-emacs@gnu.org; Thu, 09 May 2024 04:46:36 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s4zQb-000596-Uc for bug-gnu-emacs@gnu.org; Thu, 09 May 2024 04:47:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 09 May 2024 08:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70664 X-GNU-PR-Package: emacs Original-Received: via spool by 70664-submit@debbugs.gnu.org id=B70664.171524439919768 (code B ref 70664); Thu, 09 May 2024 08:47:01 +0000 Original-Received: (at 70664) by debbugs.gnu.org; 9 May 2024 08:46:39 +0000 Original-Received: from localhost ([127.0.0.1]:54054 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s4zQE-00058m-Ro for submit@debbugs.gnu.org; Thu, 09 May 2024 04:46:39 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54024) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s4zQ9-00058W-O2 for 70664@debbugs.gnu.org; Thu, 09 May 2024 04:46:37 -0400 Original-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 ) id 1s4zPe-0003dO-7s; Thu, 09 May 2024 04:46:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=tIASZCgWOYiwnvQ4ceOHEFZ0mvjQvfhJCJB1C/Efums=; b=eLi/CQQgiUlF /S017AuYvQXoXFVNHdWVIN5wCXRi/VkDCiocODtsPSubJWogHKHSl7xiDAg8gm8krpVgjpSVl4cF+ MBcAzLIidJc7l5rJdt7nuzm1QNs7dm93YJ5bpyll2INlC/mMLSWxvkgyIulV8qEhnszsMTtz27hRr s6QETXEtQYVJtLo4HZUdRZZNSr+XG0gj2QJwe0rDn2H/SRHRU6rf1KfidRj/8jSDEyHDO0LjURBd0 HJS4+4VYvbKllriA8nQL1zU2YyKK1Wjiop2USvzRu+Gzt3Sz+2+oTE/uHAqOBX5v1xkQLFBVW3EhP ZmeMhqS8cKE31V1O5ybkAQ==; In-Reply-To: <868r0levw7.fsf@fastmail.fm> (message from Joost Kremers on Tue, 07 May 2024 12:52:56 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:284745 Archived-At: > From: Joost Kremers > Cc: Eli Zaretskii , 70664@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.