From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Huchler Newsgroups: gmane.emacs.help Subject: Re: Can't figure out how to create a tabulated-list-mode with visible Date: Wed, 12 Oct 2016 03:38:43 +0200 Message-ID: <87y41upcrg.fsf@jupiter.lan> References: <87lgxxfqsv.fsf@jupiter.lan> <874m4joeos.fsf@web.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1476247592 32042 195.159.176.226 (12 Oct 2016 04:46:32 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 12 Oct 2016 04:46:32 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Oct 12 06:46:27 2016 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1buBQi-0005ga-0K for geh-help-gnu-emacs@m.gmane.org; Wed, 12 Oct 2016 06:46:12 +0200 Original-Received: from localhost ([::1]:59192 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1buBQg-0004b0-2s for geh-help-gnu-emacs@m.gmane.org; Wed, 12 Oct 2016 00:46:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40920) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bu8Vv-0002Gp-FG for help-gnu-emacs@gnu.org; Tue, 11 Oct 2016 21:39:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bu8Vn-0001K3-Cf for help-gnu-emacs@gnu.org; Tue, 11 Oct 2016 21:39:22 -0400 Original-Received: from [195.159.176.226] (port=50947 helo=blaine.gmane.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bu8Vn-0001Iv-5K for help-gnu-emacs@gnu.org; Tue, 11 Oct 2016 21:39:15 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1bu8VV-0005q7-O4 for help-gnu-emacs@gnu.org; Wed, 12 Oct 2016 03:38:57 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 48 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:72Mft48JtavLr+ANT5qzMr6gVNM= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 195.159.176.226 X-Mailman-Approved-At: Wed, 12 Oct 2016 00:45:11 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:111506 Archived-At: Hello Michael, that helped me a lot, was exactly what I wanted to do at least as startpoint. :) Michael Heerdegen 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