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

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

Re: Seeking advice on writing a "line-based" major mode


From: Marcin Borkowski
Subject: Re: Seeking advice on writing a "line-based" major mode
Date: Wed, 17 Jun 2015 23:14:19 +0200

On 2015-06-08, at 15:37, Tom Tromey <tom@tromey.com> wrote:

> Marcin> I'm going to start coding a major mode, a bit like dired or grep-mode 
> or
> Marcin> org-agenda mode, in which the buffer will contain a bunch of lines, 
> each
> Marcin> of them correspoding to some object (basically, I have a vector of 
> these
> Marcin> "objects", and I want to display them in some way).
>
> People have already mentioned tabulated-list-mode.
>
> Another way to go is EWOC, also part of the Emacs core.
> EWOC is used at least by vc-dir but also I think some other modes.

Thanks a lot!  I looked into tabulated-list-mode and EWOC, and it seems
that EWOC is the way to go for me.

I have a few questions, though.  One thing I'd like to have is /sorting/
of the `things' in my ewoc based on different criteria.  Do I get it
correctly that I'll have to `ewoc-create' it from scratch?  DO I get it
correctly that I can just safely (setq my-ewoc (ewoc-create ...)),
knowing that the old one will be GC'ed automatically?

Also, I'd like to color various entries in my ewoc, using different
faces.  Do I get it correctly that I should assign them faces right
after `insert'ing them in my pretty-printing function?

> I would suggest using whichever one fits your needs best.
>
> Tom

Thanks again,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University



reply via email to

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