[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Can't figure out how to create a tabulated-list-mode with visible conten
Can't figure out how to create a tabulated-list-mode with visible content
Sat, 08 Oct 2016 04:11:29 +0200
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)
I tried to upgrade my few kodi-remote functions to a basic major
mode. Primary to control kodi like you would do with a usb-keyboard but
over network within emacs.
So the basic stuff works so far, you can navigate start/pause/stop
delete a selected file and some stuff like that, with the standart
I did not include it in melpa so far, but its in my github:
the problem is, in this form it only creates a empty special buffer,
which has setup the right keybindings and sends them to the kodi
instance but doesnt show anything.
I am not shure how you can print something into that read-only buffer, I
then thought next logical step besides a remote-keyboard would be to
list movies and series and stuff like that, and tabulated-list-mode
would make probably sense for that.
I looked into the codes of other list modes like transmission or proced,
but they are pretty complex.
So I looked up the official documentation and tried to make a minimal
implementation that dispals anything.
But I could not display it anything, here my attempt:
(define-derived-mode kodi-remote-mode tabulated-list-mode "kodi-remote"
"Major mode for remote controlling kodi instance
;; :group '
;; (setq-local line-move-visual nil)
(setq tabulated-list-format [("choice" nil t)])
(setq tabulated-list-entries (nil ["Series"]))
(defun kodi-remote ()
"Open a `kodi-remote-mode' buffer."
(let* ((name "*kodi-remote*")
(buffer (or (get-buffer name)
(unless (eq buffer (current-buffer))
(unless (eq major-mode 'kodi-remote-mode)
(signal (car e) (cdr e))))))
what did I miss?
- Can't figure out how to create a tabulated-list-mode with visible content,
Stefan Huchler <=