help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can't figure out how to create a tabulated-list-mode with visible


From: Michael Heerdegen
Subject: Re: Can't figure out how to create a tabulated-list-mode with visible
Date: Tue, 11 Oct 2016 03:30:11 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

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 via email to

[Prev in Thread] Current Thread [Next in Thread]