GNU bug report logs - #44229
27.1; Can not set tabulated-list-format with variable

Previous Next

Package: emacs;

Reported by: dalanicolai <at> gmail.com

Date: Mon, 26 Oct 2020 05:53:02 UTC

Severity: normal

Tags: moreinfo, notabug

Found in version 27.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: dalanicolai <dalanicolai <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 44229 <at> debbugs.gnu.org
Subject: bug#44229: 27.1; Can not set tabulated-list-format with variable
Date: Tue, 27 Oct 2020 00:35:54 +0100
[Message part 1 (text/plain, inline)]
Aha, Indeed I was not aware that the vector behaves similar to a quoted
list (although I could have implied that from the behavior). So thank you
very much for showing me the right way.

On Mon, 26 Oct 2020 at 22:26, Lars Ingebrigtsen <larsi <at> gnus.org> wrote:

> dalanicolai <dalanicolai <at> gmail.com> writes:
>
> > (defvar col1-width 4)
> > (defvar col2-width 10)
> >
> > (define-derived-mode tabular-bug-demo-mode
> >   tabulated-list-mode "tab-bug"
> >   "Major mode for Tab-bug."
> >   (setq-local tabulated-list-format [("Col1" col1-width nil)
> >                                      ("Col2" col2-width nil)])
> >   (tabulated-list-init-header))
>
> [] quotes whatever you feed it, so that's not a list with a string, a
> number and nil, but a string, a symbol, and nil.
>
> You probably want
>
> `[("Col1" ,col1-width nil)
>   ("Col2" ,col2-width nil)]
>
> or use the functions `vector' and `list' instead of literals.
>
> --
> (domestic pets only, the antidote for overdose, milk.)
>    bloggy blog: http://lars.ingebrigtsen.no
>
[Message part 2 (text/html, inline)]

This bug report was last modified 4 years and 264 days ago.

Previous Next


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