all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Marcin Borkowski <mbork@mbork.pl>,
	Help Gnu Emacs mailing list <help-gnu-emacs@gnu.org>
Subject: RE: Seeking advice on writing a "line-based" major mode
Date: Thu, 18 Jun 2015 12:50:12 -0700 (PDT)	[thread overview]
Message-ID: <633caaaf-5c11-4dc3-98aa-aa3e6e1529b3@default> (raw)
In-Reply-To: <87616k3lbt.fsf@mbork.pl>

Thanks for providing more info.

> 1. EWOC has built-in support for checking which entry the point is
> on. I didn't find anything like that in tabulated-list-mode.

Not sure what you mean, but that sounds like `tabulated-list-get-entry':

  Return the Tabulated List entry at POS. ... defaults to point.

or depending on what you mean, perhaps `tabulated-list-get-id':

  Return the entry ID of the Tabulated List entry at POS.
  ... defaults to point.

> 2. EWOC seems to be more flexible wrt the format of the entries.  In
> my use case, each entry is a large-ish alist, converted from json by
> json-read, and most of the entries in it should not show up at all.

So you want to show only some of each alist entry.

  `tabulated-list-print' calls the printer function specified by
  `tabulated-list-printer', once for each entry.  The default
  printer is `tabulated-list-print-entry', but a mode that keeps
  data in an ewoc may instead specify a printer function (e.g., one
  that calls `ewoc-enter-last'), with `tabulated-list-print-entry'
  as the ewoc pretty-printer.

and `tabulated-list-entries':

  If a list, each element has the form (ID [DESC1 ... DESCN])
  
or it can be a function that returns such a list.

In your case, one of the DESC would presumably be your alist value,
formatted to show only some of it.

I know very little about EWOC, but so far I don't really see what
more it offers here.  (Not that I need to.  The info you provide is
anyway helpful.) 

> I's also want to be able to do sorting based on more than one
> column

Same here.  That would be a useful addition to `tabulated-list-mode'.

> So basically, while the differences are significant, both tools
> could do the job - it just happens that EWOC has the parts I didn't
> want to code myself already done.

Understood (though it's not clear to me what those parts are).

> BTW, be assured that when I finish my tool (or at least get to
> a production-ready beta, which seems quite close), I'll write a blog
> post (or a few) about it, and put the code on the net somewhere.

Thx. 



  reply	other threads:[~2015-06-18 19:50 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-07 21:16 Seeking advice on writing a "line-based" major mode Marcin Borkowski
2015-06-08  2:17 ` Drew Adams
2015-06-18  8:06   ` Marcin Borkowski
2015-06-18 16:10     ` Drew Adams
2015-06-18 18:47       ` Marcin Borkowski
2015-06-18 19:50         ` Drew Adams [this message]
2015-06-18 20:44           ` Marcin Borkowski
2015-06-18 21:28             ` Drew Adams
2015-07-18 23:20           ` Marcin Borkowski
2015-07-19  0:26             ` Robert Thorpe
     [not found]     ` <mailman.5261.1434643820.904.help-gnu-emacs@gnu.org>
2015-06-18 16:23       ` Emanuel Berg
     [not found]   ` <mailman.5215.1434614824.904.help-gnu-emacs@gnu.org>
2015-06-18 15:57     ` Emanuel Berg
2015-06-18 22:01       ` Emanuel Berg
2015-06-20  1:28         ` Emanuel Berg
2015-06-08 13:37 ` Tom Tromey
2015-06-17 21:14   ` Marcin Borkowski
     [not found]   ` <mailman.5205.1434575686.904.help-gnu-emacs@gnu.org>
2015-06-18  1:50     ` Stefan Monnier
2015-06-18  7:58       ` Marcin Borkowski
     [not found] <mailman.4548.1433712325.904.help-gnu-emacs@gnu.org>
2015-06-07 22:23 ` Emanuel Berg
2015-06-07 22:48   ` Marcin Borkowski
2015-06-07 22:28 ` Emanuel Berg
2015-06-07 22:49   ` Marcin Borkowski
2015-06-08  0:09 ` Joost Kremers

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=633caaaf-5c11-4dc3-98aa-aa3e6e1529b3@default \
    --to=drew.adams@oracle.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=mbork@mbork.pl \
    /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.