all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Heerdegen <michael_heerdegen@web.de>
To: Stefan Huchler <stefan.huchler@mail.de>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Can't figure out how to create a tabulated-list-mode with visible
Date: Tue, 11 Oct 2016 03:30:11 +0200	[thread overview]
Message-ID: <874m4joeos.fsf@web.de> (raw)
In-Reply-To: <87lgxxfqsv.fsf@jupiter.lan> (Stefan Huchler's message of "Sun, 09 Oct 2016 18:08:48 +0200")

Hello Stefan,

> (define-derived-mode kodi-remote-mode tabulated-list-mode "kodi-remote"
>   "Major mode for remote controlling kodi instance
> Key bindings:
> \\{kodi-remote-mode-map}"
>   ;; :group '
>   ;; (setq-local line-move-visual nil)
>   (setq tabulated-list-format [("choice" nil t)])
>   (setq tabulated-list-entries (nil ["Series"]))
>   (tabulated-list-init-header)
>   (tabulated-list-print) 
>   )

I've never used `tabulated-list-mode' mode, and I just had a very quick
look at your example code.

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.  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


HTH,

Michael.



  reply	other threads:[~2016-10-11  1:30 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 [this message]
2016-10-12  1:38   ` Stefan Huchler
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

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

  git send-email \
    --in-reply-to=874m4joeos.fsf@web.de \
    --to=michael_heerdegen@web.de \
    --cc=help-gnu-emacs@gnu.org \
    --cc=stefan.huchler@mail.de \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.