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#69305: outline-minor-mode for tabulated-list-mode Date: Sat, 24 Feb 2024 20:13:08 +0200 Message-ID: <86sf1hybm3.fsf@gnu.org> References: <86msrtvi06.fsf@mail.linkov.net> <86frxlmy1d.fsf@gnu.org> <86cyspt02f.fsf@mail.linkov.net> <861q94nc4j.fsf@gnu.org> <867ciws983.fsf@mail.linkov.net> <86plwo1fii.fsf@gnu.org> <86il2fwuc8.fsf@mail.linkov.net> <86edd31tv5.fsf@gnu.org> <86jzmtda1y.fsf@mail.linkov.net> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5066"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 69305@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Feb 24 19:56:20 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 1rdxC8-000137-23 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 24 Feb 2024 19:56:20 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rdxBY-0002J3-6w; Sat, 24 Feb 2024 13:55:44 -0500 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 1rdxBT-0002Hg-5o for bug-gnu-emacs@gnu.org; Sat, 24 Feb 2024 13:55:40 -0500 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 1rdxBS-0006M3-Kp for bug-gnu-emacs@gnu.org; Sat, 24 Feb 2024 13:55:38 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rdxBq-00065g-RY for bug-gnu-emacs@gnu.org; Sat, 24 Feb 2024 13:56:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 24 Feb 2024 18:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69305 X-GNU-PR-Package: emacs Original-Received: via spool by 69305-submit@debbugs.gnu.org id=B69305.170880092023272 (code B ref 69305); Sat, 24 Feb 2024 18:56:02 +0000 Original-Received: (at 69305) by debbugs.gnu.org; 24 Feb 2024 18:55:20 +0000 Original-Received: from localhost ([127.0.0.1]:49408 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rdxB9-00063G-HJ for submit@debbugs.gnu.org; Sat, 24 Feb 2024 13:55:20 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:41816) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rdx21-0005UP-9w for 69305@debbugs.gnu.org; Sat, 24 Feb 2024 13:45:53 -0500 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 1rdwWN-00059t-M5; Sat, 24 Feb 2024 13:13:11 -0500 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=KcUzyz0CeRQPg/Xlb/hDRJbxB82MquLvZvYBLx9iZak=; b=sc3tKf6Ontyz bE8bepCYW8/cQvHPsSbMHjsQMAcfbZm6b7vo8EFuQ87isXucJ0IRiaYB5B/QcC3+Juq8D1gk57Thb sm79H4FUJuYGuIUo06PzASQUxSaVgqkb2yp270ILbNCGUWq10VNAsq1dfAAsrt5+hmhjc8X3d4psC Fw0hmIXxyqQiX4pTLoQvsFL19yDtYGjne0c43FeJVTjEaethx4lgpqsLpSKAt01lnzYbgMGrCkcTh 6BHeMJeiphw+9f0e4tVtQWKBZI9DdUdYZ4gBIcyX7oxar3fuYMex24ZSkF2C3VEGR7hv2gIkJMKft nx46ltb2w1VwCi5ZXYudMw==; In-Reply-To: <86jzmtda1y.fsf@mail.linkov.net> (message from Juri Linkov on Sat, 24 Feb 2024 19:43:25 +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:280575 Archived-At: > From: Juri Linkov > Cc: 69305@debbugs.gnu.org > Date: Sat, 24 Feb 2024 19:43:25 +0200 > > >> Sorry, I don't understand what is unclear here: > >> > >> If the value is a list, each list element corresponds to one group, and > >> should have the form @w{@code{(@var{group-name} @var{entries})}}, where > >> @var{group-name} is a string inserted before all group entries, and > >> @var{entries} have the same format as @code{tabulated-list-entries} > >> (see above). > >> > >> Basically this says that the format is (group-name entries) where > >> entries are described in tabulated-list-entries as having the format > >> (id contents). There is no need to duplicate the description of entries. > > > > Maybe I'm missing something here. To put it more concretely, can you > > show a value of tabulated-list-groups that will cause the buffers in > > buffer list grouped by major mode using the above form? > > Data structure for `tabulated-list-groups' is a list of elements, > each element should of the form > > (GROUP-NAME (ID . CONTENTS) (ID . CONTENTS) ...) > > where GROUP-NAME is the name of the group, ID is a Lisp object that > identifies the entry and CONTENTS is a vector with the same number of > elements as `tabulated-list-format'. When buffers grouped by major mode: > > (("* Lisp Interaction" (# ["." " " "*" #("*scratch*" 0 9 ...) "225" "Lisp Interaction" ""]) ...)) This is the value that the user is supposed to supply for the defcustom? That is, the user must specify all the buffers explicitly? What happens when there's one more buffer in some mode? does the user have then to modify the value of the defcustom? > >> >> >> +(ert-deftest tabulated-list-groups () > >> >> >> + (with-temp-buffer > >> >> >> + (tabulated-list-mode) > >> >> >> + (setq tabulated-list-groups > >> >> >> + (reverse > >> >> >> + (seq-group-by (lambda (b) (concat "* " (aref (cadr b) 3))) > >> >> >> + tabulated-list--test-entries))) > >> >> >> + (setq tabulated-list-format tabulated-list--test-format) > >> >> >> + (setq tabulated-list-padding 7) > >> >> >> + (tabulated-list-init-header) > >> >> >> + (tabulated-list-print) > >> >> > > >> >> > This seems to test only the function value of tabulated-list-groups? > >> >> > What about the other form of the value? > >> >> > >> >> The other forms have no functional difference. > >> > > >> > Sorry, I don't follow. Shouldn't we test the capability of specifying > >> > grouping by the method other than by providing a function? > >> > >> Actually there are no other methods. > > > > The doc string says the "value can be either a list or a function". I > > see only one value here, so I'm asking what about a value of the other > > form. Or what am I missing here? > > Another form is a function. But there is no need to test this. > It's just a copy from tabulated-list-entries that is unused. I give up.