[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ELPA] Want to submit two packages "ilist" and "blist"
From: |
Durand |
Subject: |
Re: [ELPA] Want to submit two packages "ilist" and "blist" |
Date: |
Mon, 20 Sep 2021 08:10:51 +0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-apple-darwin20.5.0) |
>>>>> On Sun, 19 Sep 2021 11:33:01 -0500, Adam Porter <adam@alphapapa.net> said:
Adam> Durand <mmemmew@gmail.com> writes:
>> I have written two Emacs pacakges, called "ilist" and "blist"
>> (the former is the "engine", and hence a dependency, of the
>> latter). Now I am thinking about submitting the packages to GNU
>> ELPA.
>>
>> The package "blist" is to display the list of bookmarks, in the
>> sense of "bookmark.el", in a similar way as Ibuffer.
Adam> I see in your readme that you mention grouping. Rather than
Adam> reimplementing that, you may be interested in what I've done
Adam> in taxy.el. For example, it makes it trivial to define a
Adam> custom grouping DSL and a custom column-based view using
Adam> magit-section.el. See the example "bookmarky" application:
Adam> https://github.com/alphapapa/taxy.el/blob/master/examples/bookmarky.el
Adam> It ends up looking like this:
Adam>
https://raw.githubusercontent.com/alphapapa/taxy.el/master/images/bookmarky.png
Thanks for the information. I did not know about taxy.el previously.
It seems to be an interesting library. It reminds me of hierarchy.el by
the way: <https://github.com/DamienCassou/hierarchy>.
Adam> Grouping keys and display columns are defined with simple
Adam> top-level forms, and these keys and columns can be customized
Adam> by users by using the same top-level forms in their configs.
Adam> For example:
Adam> (bookmarky-define-key filename (&key name regexp) "Return
Adam> NAME if bookmark ITEM's filename matches REGEXP, or without
Adam> REGEXP, the filename." (when-let (filename (bookmark-prop-get
Adam> item 'filename)) (pcase regexp (`nil filename) (_ (when
Adam> (string-match-p regexp filename) name)))))
Adam> (bookmarky-define-column "File" (:max-width nil :face
Adam> font-lock-doc-face) (bookmark-prop-get item 'filename))
Adam> Then a grouping "program" written in the DSL looks like:
Adam> (defvar bookmarky-default-keys '( ((handler
Adam> '(burly-bookmark-handler) :name "Burly")) ((directory
Adam> "~/src/emacs/" :name "Emacs" :descendant-p t))) "Default
Adam> keys.")
Adam> Turning the resulting hierarchy into the magit-section-based
Adam> view is done with a few functions in a standard way, so
Adam> there's very little bespoke code to write.
Adam> I'll probably publish taxy-magit-section.el on ELPA as a
Adam> separate package after it matures a bit more.
>From what I can tell, the taxy.el plays the role of "ilist" in "blist",
right?
I think I will enjoy reading it afterwards.
--
Durand
- [ELPA] Want to submit two packages "ilist" and "blist", Durand, 2021/09/19
- Re: [ELPA] Want to submit two packages "ilist" and "blist", Stefan Kangas, 2021/09/19
- Re: [ELPA] Want to submit two packages "ilist" and "blist", Stefan Monnier, 2021/09/19
- Re: [ELPA] Want to submit two packages "ilist" and "blist", Adam Porter, 2021/09/19
- Re: [ELPA] Want to submit two packages "ilist" and "blist",
Durand <=
- Re: [ELPA] Want to submit two packages "ilist" and "blist", Adam Porter, 2021/09/19
- RE: [External] : [ELPA] Want to submit two packages "ilist" and "blist", Drew Adams, 2021/09/19
- Re: [External] : [ELPA] Want to submit two packages "ilist" and "blist", Richard Stallman, 2021/09/20