From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Adam Porter Newsgroups: gmane.emacs.devel Subject: Re: [ELPA] Want to submit two packages "ilist" and "blist" Date: Sun, 19 Sep 2021 11:33:01 -0500 Message-ID: <87bl4o8r0i.fsf@alphapapa.net> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15413"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Sep 19 18:36:32 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mRznr-0003k7-Jo for ged-emacs-devel@m.gmane-mx.org; Sun, 19 Sep 2021 18:36:31 +0200 Original-Received: from localhost ([::1]:35684 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mRznp-0004T5-LV for ged-emacs-devel@m.gmane-mx.org; Sun, 19 Sep 2021 12:36:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43000) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mRzki-0001BR-7l for emacs-devel@gnu.org; Sun, 19 Sep 2021 12:33:16 -0400 Original-Received: from ciao.gmane.io ([116.202.254.214]:45256) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mRzkf-0008GR-60 for emacs-devel@gnu.org; Sun, 19 Sep 2021 12:33:16 -0400 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1mRzkb-0009yV-MI for emacs-devel@gnu.org; Sun, 19 Sep 2021 18:33:09 +0200 X-Injected-Via-Gmane: http://gmane.org/ Received-SPF: pass client-ip=116.202.254.214; envelope-from=ged-emacs-devel@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.25, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:275062 Archived-At: Durand 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. I see in your readme that you mention grouping. Rather than reimplementing that, you may be interested in what I've done in taxy.el. For example, it makes it trivial to define a custom grouping DSL and a custom column-based view using magit-section.el. See the example "bookmarky" application: https://github.com/alphapapa/taxy.el/blob/master/examples/bookmarky.el It ends up looking like this: https://raw.githubusercontent.com/alphapapa/taxy.el/master/images/bookmarky.png Grouping keys and display columns are defined with simple top-level forms, and these keys and columns can be customized by users by using the same top-level forms in their configs. For example: (bookmarky-define-key filename (&key name regexp) "Return NAME if bookmark ITEM's filename matches REGEXP, or without REGEXP, the filename." (when-let (filename (bookmark-prop-get item 'filename)) (pcase regexp (`nil filename) (_ (when (string-match-p regexp filename) name))))) (bookmarky-define-column "File" (:max-width nil :face font-lock-doc-face) (bookmark-prop-get item 'filename)) Then a grouping "program" written in the DSL looks like: (defvar bookmarky-default-keys '( ((handler '(burly-bookmark-handler) :name "Burly")) ((directory "~/src/emacs/" :name "Emacs" :descendant-p t))) "Default keys.") Turning the resulting hierarchy into the magit-section-based view is done with a few functions in a standard way, so there's very little bespoke code to write. I'll probably publish taxy-magit-section.el on ELPA as a separate package after it matures a bit more.