unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: dalanicolai <dalanicolai@gmail.com>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 44229@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	[thread overview]
Message-ID: <CACJP=3mKfNRoXdVVBchsWbDW3LqxxPDMoZj1FbL7HjKyiG3BgA@mail.gmail.com> (raw)
In-Reply-To: <87o8kou1as.fsf@gnus.org>

[-- Attachment #1: Type: text/plain, Size: 1034 bytes --]

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@gnus.org> wrote:

> dalanicolai <dalanicolai@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
>

[-- Attachment #2: Type: text/html, Size: 1661 bytes --]

  reply	other threads:[~2020-10-26 23:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-26  5:52 bug#44229: 27.1; Can not set tabulated-list-format with variable dalanicolai
2020-10-26 10:45 ` Lars Ingebrigtsen
2020-10-26 21:10   ` dalanicolai
2020-10-26 21:12     ` Lars Ingebrigtsen
2020-10-26 21:20       ` dalanicolai
2020-10-26 21:20         ` dalanicolai
2020-10-26 21:21           ` dalanicolai
2020-10-26 21:26           ` Lars Ingebrigtsen
2020-10-26 23:35             ` dalanicolai [this message]
2020-10-26 21:23 ` Stephen Berman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CACJP=3mKfNRoXdVVBchsWbDW3LqxxPDMoZj1FbL7HjKyiG3BgA@mail.gmail.com' \
    --to=dalanicolai@gmail.com \
    --cc=44229@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).