From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#39293: [PATCH] Base bookmark-bmenu-mode on 'tabulated-list-mode' Date: Sun, 26 Jan 2020 10:05:48 -0800 (PST) Message-ID: <047a219c-5378-4cb6-97bb-e57187324988@default> References: <87lfpu9ag8.fsf@marxist.se> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="66277"; mail-complaints-to="usenet@ciao.gmane.io" To: Stefan Kangas , 39293@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jan 26 19:08:13 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1ivmKT-000HDT-1S for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 26 Jan 2020 19:08:13 +0100 Original-Received: from localhost ([::1]:36006 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ivmKS-0004Rh-70 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 26 Jan 2020 13:08:12 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51658) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ivmKK-0004RO-6e for bug-gnu-emacs@gnu.org; Sun, 26 Jan 2020 13:08:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ivmKI-0008EM-OT for bug-gnu-emacs@gnu.org; Sun, 26 Jan 2020 13:08:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51481) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ivmKI-0008DL-Jp for bug-gnu-emacs@gnu.org; Sun, 26 Jan 2020 13:08:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ivmKI-0002EN-DV for bug-gnu-emacs@gnu.org; Sun, 26 Jan 2020 13:08:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 26 Jan 2020 18:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39293 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 39293-submit@debbugs.gnu.org id=B39293.15800620808566 (code B ref 39293); Sun, 26 Jan 2020 18:08:02 +0000 Original-Received: (at 39293) by debbugs.gnu.org; 26 Jan 2020 18:08:00 +0000 Original-Received: from localhost ([127.0.0.1]:57454 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ivmKG-0002E6-BY for submit@debbugs.gnu.org; Sun, 26 Jan 2020 13:08:00 -0500 Original-Received: from userp2120.oracle.com ([156.151.31.85]:50956) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ivmKD-0002Dt-VC for 39293@debbugs.gnu.org; Sun, 26 Jan 2020 13:07:58 -0500 Original-Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id 00QI3Por094102; Sun, 26 Jan 2020 18:07:52 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2019-08-05; bh=HyeIXFf3mktblhtELOkzTqPCm0tRJlWj8uBZM5Iyt/k=; b=F5y1Ur4Dm+pX8NJvGBKEGSSkaWM0Fv8NoNEdntNoTCcrDqwc3s91eszYE4JP9afU7o4b ZJLvs3N8jXAeY6WKLZQMl6OD5ATWLc0AFnzQYLk2lCFkEMMVdrPwPPcUHRVgwplOSZhw MxKuqm02x1FmfuTA/lJXUdtByKmBtVGWE3RkR/AhAUg9oef6cHdWlw5RTvKr0aDLUnv+ qV1SSezk2n/nyzm+6+Z0sKbxqG7u42XWuSxefXfUaObcgpPrXkVN9wdZvF+xsqdsHEZd vTxh+TckWTPzgsRRo5QgKbjevmlXdFlVSrG9Dud9AeqFb3vGPrpvSpWc4gLlqbTF52w4 5Q== Original-Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by userp2120.oracle.com with ESMTP id 2xreaqv19r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 26 Jan 2020 18:07:52 +0000 Original-Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.27/8.16.0.27) with SMTP id 00QI3gX9065477; Sun, 26 Jan 2020 18:05:51 GMT Original-Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserp3020.oracle.com with ESMTP id 2xry6m2xfu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 26 Jan 2020 18:05:51 +0000 Original-Received: from abhmp0002.oracle.com (abhmp0002.oracle.com [141.146.116.8]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 00QI5nJC032156; Sun, 26 Jan 2020 18:05:50 GMT In-Reply-To: <87lfpu9ag8.fsf@marxist.se> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4954.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9512 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1911140001 definitions=main-2001260158 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9512 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1911140001 definitions=main-2001260158 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:175310 Archived-At: > The attached patch changes bookmark-bmenu-mode to be based on > tabulated-list-mode instead of special-mode. >=20 > 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'. >=20 > 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. >=20 > 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. >=20 > 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.