From: Stefan Huchler <stefan.huchler@mail.de>
To: help-gnu-emacs@gnu.org
Subject: Re: Can't figure out how to create a tabulated-list-mode with visible
Date: Wed, 12 Oct 2016 03:38:43 +0200 [thread overview]
Message-ID: <87y41upcrg.fsf@jupiter.lan> (raw)
In-Reply-To: 874m4joeos.fsf@web.de
Hello Michael,
that helped me a lot, was exactly what I wanted to do at least as
startpoint. :)
Michael Heerdegen <michael_heerdegen@web.de> writes:
> There is something wrong with the tabulated-list-* assignments. First,
> the assignment expression to `tabulated-list-entries' is missing a quote
> before the given list, so your code raises an error.
I think it didnt just did silently nothing, but could be wrong :).
Hmm yes I am a lisp beginner I still strugle with the different lists
and even somethimes have problems to understand the concepts behind it,
and what is a good/efficiant/clean way to code. :)
>Entries displayed in the current Tabulated List buffer.
>This should be either a function, or a list.
>If a list, each element has the form (ID [DESC1 ... DESCN]),
Well I guess I misread the description. Each has the form, so the
additional parenthesis makes sense, but why is a ' needed for entries
but not for format?
Because its "either a function or a list, and
therefor it tries to execute the function of nil". So whenever I read
such sentence I have to quote? Or do vectors get quoted / not evaluated
in general?
> Secondly, the
> assigned values don't seem to fit the required format. I guess it
> should more or less look like this (dunno if it makes sense for your
> example, but at least, it makes "something happen" here):
>
> #+begin_src emacs-lisp
> (define-derived-mode kodi-remote-mode tabulated-list-mode "kodi-remote"
> (setq tabulated-list-format [("choice" 10 t)])
> (setq tabulated-list-entries '((nil ["Series"])))
> (tabulated-list-init-header)
> (tabulated-list-print))
> #+end_src
Yes it works and making "something happen" was exactly my goal :)
greetings
Stefan
next prev parent reply other threads:[~2016-10-12 1:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-09 16:08 Can't figure out how to create a tabulated-list-mode with visible Stefan Huchler
2016-10-11 1:30 ` Michael Heerdegen
2016-10-12 1:38 ` Stefan Huchler [this message]
2016-10-12 9:28 ` Michael Heerdegen
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=87y41upcrg.fsf@jupiter.lan \
--to=stefan.huchler@mail.de \
--cc=help-gnu-emacs@gnu.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.
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).