From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: uzibalqa Newsgroups: gmane.emacs.help Subject: Re: Format of lists and alists required for displaying lists of tabulated data Date: Wed, 21 Jun 2023 10:45:45 +0000 Message-ID: References: <648d6296.050a0220.f0b55.8bfc@mx.google.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30493"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Christopher Dimech , Bruno Barbier , uzibalqa via Users list for the GNU Emacs text editor To: Jean Louis Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jun 21 12:46:45 2023 Return-path: Envelope-to: geh-help-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 1qBvML-0007lf-F9 for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 21 Jun 2023 12:46:45 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qBvM4-0003O8-FD; Wed, 21 Jun 2023 06:46:28 -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 1qBvLn-0003NC-Vu for help-gnu-emacs@gnu.org; Wed, 21 Jun 2023 06:46:18 -0400 Original-Received: from mail-4318.protonmail.ch ([185.70.43.18]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qBvLl-00068A-Gn for help-gnu-emacs@gnu.org; Wed, 21 Jun 2023 06:46:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=proton.me; s=protonmail; t=1687344367; x=1687603567; bh=0yrYadtcp2NQcuSq9zcZu7tT7i9fQpKhfBSLZ7+M1hI=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=A+o8zfBtHnjetF0das3ZntLGSRUFrGBtzOkLCnuVfF9sZnhOnmLLpzMt7FTKB6dVx UBY0CgCzYGsmvImrjANk/A+EtlhIuMk/SF1cH4h/bApW9sFcctwsLVEyD39XjLxMby f7xAohyiae1YLJ3Fz0OQchhdkX2kXshfe6RAodg8N4k3dUaqoVMja8/QUKwkvCyi2q ZH1opnfZjIrhjiLAHkAHyRbclWRdGcYdGKLe0Y91Fz6Ld3m/KKTAmtESb0TeRT25xj 1bdbCQ/86imDxR/eETXjGk32ymDMdCMNPEA9OLuWZsJ5z7PhbW5433jH+qpNC++jQ/ Y/GXtHFhw41Lg== In-Reply-To: Feedback-ID: 52887082:user:proton Received-SPF: pass client-ip=185.70.43.18; envelope-from=uzibalqa@proton.me; helo=mail-4318.protonmail.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:144013 Archived-At: ------- Original Message ------- On Wednesday, June 21st, 2023 at 4:48 PM, Jean Louis wro= te: > * uzibalqa uzibalqa@proton.me [2023-06-19 22:00]: >=20 > > (setq foo '((a . ["aa1" "aa2"]) (b . ["bb1" "bb2"]) (c . ["cc1" "cc2"])= )) > > (tlprint-alist foo) > >=20 > > (defun tlprint-alist (alist &optional outbufr keytl valtl) > > "Print an associated list via `tabulated-list-print'." > >=20 > > (let* > > ( (bufr (or outbufr (get-buffer-create "Alist2"))) > > (keytl (or keytl "Key Title")) > > (valtl (or valtl "Value Title")) ) > >=20 > > (with-current-buffer bufr > > (tabulated-list-mode) > > (setq buffer-read-only nil) > > (setq tabulated-list-format > > (vector (list keytl 20 t) (list valtl 20 t))) > > (setq tabulated-list-sort-key (cons keytl nil)) > > (setq tabulated-list-entries > > (mapcar (lambda (dyad) > > (list (car dyad) (cdr dyad))) > > alist)) > > (tabulated-list-init-header) > > (tabulated-list-print) ))) >=20 >=20 > It works! - Jean It works indeed. But instead of just a dyad (a key and value), I want to h= andle an arbitrary number of values.