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

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

bug#39293: [PATCH] Base bookmark-bmenu-mode on 'tabulated-list-mode'


From: Drew Adams
Subject: bug#39293: [PATCH] Base bookmark-bmenu-mode on 'tabulated-list-mode'
Date: Sun, 26 Jan 2020 10:05:48 -0800 (PST)

> The attached patch changes bookmark-bmenu-mode to be based on
> tabulated-list-mode instead of special-mode.
> 
> This allows us to simplify the code in several cases.  In addition, we
> get many features for free, such as sorting columns by clicking on the
> column headers, changing size of columns.  In the future, this will
> obviously include any new feature added to 'tabulated-list-mode'.
> 
> The only functional step backwards is that we no longer support the
> optional "inline" header line -- a bookmark.el-specific hack to have a
> header without using 'header-line-format'.  I don't believe this
> feature is very useful since the lack of such support for anything
> similar in e.g. 'package-menu-mode' has not caused any problems.  It
> seems to have been added together with 'header-line-format' as a fire
> escape if the latter caused any problems.
> 
> I recently added a number of tests to bookmark.el on master, which
> were developed as part of this suggested change.  These tests pass
> using both the new and the old code, which gives some degree of
> confidence in this change.
> 
> Any comments, objections or suggestions?  Thanks.

I _strongly_ object to this.  And I would say the same
thing if such a suggestion were made for Dired.

If vanilla Emacs does this then I will have to separate
Bookmark+ completely from `bookmark.el', incorporating
its code prior to your change.

I don't want to do that, but I will have to (and it
won't be hard to do - that's not the problem).  Until
now, I've made a concerted effort to be compatible with
vanilla `bookmark.el', for the benefit of users.

It's very wrong to think either that things like the
bookmark-list display and Dired's listings are as
simple as what `tabulated-list-mode' provides, or that
their features can be easily added on top of
`tabulated-list-mode'.

This kind of proposal is, IMO, a consequence of one or
both of the following:

1. Favoring development, or rather maintenance, over
   user convenience, power, and features.

   The imagined gain is a chimera.  The code has been
   used for a very long time, and there is little
   maintenance burden.

2. Not appreciating the specificity of the features
   offered by libraries such as Dired and bookmarking.

   Not being well acquainted with such features, and
   so supposing that they don't exist or they're no
   big deal and not worth bothering about.

   Being acquainted with `tabulated-list-mode', and
   thinking its features are wonderful, abundant, and
   sufficiently general and flexible.

   Consider sorting, as just one example among many
   (yes, many).

   Sorting in Dired or the bookmark list (at least with
   Bookmark+) is _much more_ useful and flexible than
   just sorting columns.  Why?  Because the things
   displayed are of different kinds across rows, not
   just across columns.  The columns, for bookmark-list
   display, are less interesting (this is less true of
   Dired, but the same consideration holds).

   Here are the predefined ways you can sort bookmarks
   with Bookmark+.  And users can easily define their
   own ways of sorting, just as they can define their
   own kinds of bookmarks.

   key     binding
   ---     -------

   s C-r   bmkp-reverse-multi-sort-order
   s *     bmkp-bmenu-sort-modified-before-unmodified
   s 0     bmkp-bmenu-sort-by-creation-time
   s >     bmkp-bmenu-sort-marked-before-unmarked
   s D     bmkp-bmenu-sort-flagged-before-unflagged
   s I     bmkp-bmenu-sort-by-Info-position
   s a     bmkp-bmenu-sort-annotated-before-unannotated
   s b     bmkp-bmenu-sort-by-last-buffer-or-file-access
   s d     bmkp-bmenu-sort-by-last-bookmark-access
   s f d   bmkp-bmenu-sort-by-last-local-file-access
   s f k   bmkp-bmenu-sort-by-local-file-type
   s f n   bmkp-bmenu-sort-by-file-name
   s f s   bmkp-bmenu-sort-by-local-file-size
   s f u   bmkp-bmenu-sort-by-last-local-file-update
   s g     bmkp-bmenu-sort-by-Gnus-thread
   s i     bmkp-bmenu-sort-by-Info-node-name
   s k     bmkp-bmenu-sort-by-bookmark-type
   s n     bmkp-bmenu-sort-by-bookmark-name
   s r     bmkp-reverse-sort-order
   s s     bmkp-bmenu-change-sort-order-repeat
   s t     bmkp-bmenu-sort-tagged-before-untagged
   s u     bmkp-bmenu-sort-by-url
   s v     bmkp-bmenu-sort-by-bookmark-visit-frequency

   What's more, you can combine sort orders - see

https://www.emacswiki.org/emacs/BookmarkPlus#SortingBookmarks

---

May I invite you to please spend your (much-appreciated)
volunteer effort on something else?  This isn't broken,
and your proposal would shatter it.

Do I use `tabulated-list-mode', or am I just grousing,
as an old fart stuck in his ways and unfamiliar with
`tabulated-list-mode'?

Yes, I use it (e.g. in my library `apu.el').  But it
is very limited, and the limitations do not just stem
from a lack of more generic features.  I use it only
when it's appropriate.

There's only so much you will ever be able to get out
of `tabulated-list-mode'.  Apply it so simple listings
that don't need or offer much functionality.  Please
leave the sophisticated, useful listing displays alone.

This is a have-a-hammer-and-see-only-nails story.





reply via email to

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