From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.devel Subject: RE: Friendlier dired experience [CODE INCLUDED] Date: Thu, 5 Nov 2020 09:08:11 -0800 (PST) Message-ID: <5d2bf128-cdc7-4578-89d9-6ea8b7967a62@default> References: <20201103104340.q34kqfita55w2u7h@E15-2016.optimum.net> <20201104183228.xf7w4yf3fw3427y5@E15-2016.optimum.net> <20201105092232.fk4r5dexnay3eyln@E15-2016.optimum.net> <20201105143800.7vt5jfr4gg2wigyb@E15-2016.optimum.net> <87o8kbwzdg.fsf@alphapapa.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3940"; mail-complaints-to="usenet@ciao.gmane.io" To: Adam Porter , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Nov 05 18:12:56 2020 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 1kaioi-0000xL-Hk for ged-emacs-devel@m.gmane-mx.org; Thu, 05 Nov 2020 18:12:56 +0100 Original-Received: from localhost ([::1]:40424 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kaioh-0000i4-J5 for ged-emacs-devel@m.gmane-mx.org; Thu, 05 Nov 2020 12:12:55 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53782) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kaimG-0007T9-Ps for emacs-devel@gnu.org; Thu, 05 Nov 2020 12:10:24 -0500 Original-Received: from aserp2130.oracle.com ([141.146.126.79]:52460) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kaimE-0007tM-Kv for emacs-devel@gnu.org; Thu, 05 Nov 2020 12:10:24 -0500 Original-Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0A5H3qti128340; Thu, 5 Nov 2020 17:10:14 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-2020-01-29; bh=YbkPaYKj5Q9RSF20irQqpZILLQl4sQ+FPIz65zBClsE=; b=HVaDQo7fG+JCC9HztX+7iNc7yrdp04fO9lm1FTeENvucYydzqjt15+pQ5XAJEf3E2KG+ 8Mwcw2tYDFTOMcpQY7uxPU5qMwQtujjZXbMS0IMMK0hpy3xu8Lhr8/nUSrcMjcagyyzl 8uvgH+zfDSC1K/vj1B7KNR2XcnG0VTsWE/IRRrYQxQf5+4qTIq1xlA9C8J/4z/81nwj9 3t5E+Hj6bPFau9yP83po2hvqcZVcs1hxV0OtF7xnZML626RMd6546srHCbsXnKSRWXAN 8DseHS3Xdw5BeHpVDMaTWz/62pKTGbziucNdZBKtsLdc1kA4Zp62PMraF87sNyLY+KcU rA== Original-Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by aserp2130.oracle.com with ESMTP id 34hhb2d1mh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 05 Nov 2020 17:10:14 +0000 Original-Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0A5H68tW166458; Thu, 5 Nov 2020 17:08:13 GMT Original-Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userp3030.oracle.com with ESMTP id 34hvs0yn6j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 05 Nov 2020 17:08:13 +0000 Original-Received: from abhmp0011.oracle.com (abhmp0011.oracle.com [141.146.116.17]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 0A5H8CmC029443; Thu, 5 Nov 2020 17:08:12 GMT In-Reply-To: <87o8kbwzdg.fsf@alphapapa.net> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.5056.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9796 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 adultscore=0 mlxscore=0 malwarescore=0 mlxlogscore=999 suspectscore=0 spamscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2011050113 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9796 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 phishscore=0 suspectscore=0 clxscore=1015 mlxlogscore=999 impostorscore=0 malwarescore=0 lowpriorityscore=0 adultscore=0 spamscore=0 priorityscore=1501 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2011050113 Received-SPF: pass client-ip=141.146.126.79; envelope-from=drew.adams@oracle.com; helo=aserp2130.oracle.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/05 10:19:10 X-ACL-Warn: Detected OS = Linux 3.1-3.10 [fuzzy] X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham 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:258743 Archived-At: > However, when I tried to write a bookmark-listing command to display > only Burly's bookmarks, it wasn't as easy to re-use existing > functionality. I tried to re-use the list-bookmarks command by binding > bookmarks-alist to a filtered alist, and that worked. >=20 > The problem is that re-displaying the bookmarks list (e.g. after > deleting a bookmark) shows the non-filtered bookmarks list. I then > experimented with using buffer-local function advice in the > list-bookmarks buffer to cause it to use the filtered bookmarks list > when re-displaying, but it didn't seem to work. And even if it had, it > would have been very hacky, so it didn't seem like a good solution. >=20 > An idea I had was for the list-bookmarks command to use an optional > filter function to filter the bookmarks-alist before displaying them, so > the filter could persist after using commands to manipulate > bookmarks.[2] (Note that the global value of bookmarks-alist would > remain unchanged so that saving the bookmarks to disk still saves all > bookmarks, not just the filtered ones.) This all already done, in Bookmark+. You can filter in any number of ways. And by default the filtering (and other state of the bookmark-list display) persist, until you change it. And you can even bookmark the bookmark-list display state. Jumping to such a bookmark restores the display. > Frankly, I wonder if list-bookmarks ought to be rewritten to use, > e.g. tabulated-list-mode instead of its bespoke code. Absolutely not. Tabulated-List mode is IMO a rudimentary, fragile, brute hammer. It takes over a complete buffer (you can't even add a heading or a paragraph, outside the table). It offers little, and prevents much. Dired, bookmark-list display, and most other seemingly tabular lists should stay away from it. Such UIs can be quite sophisticated, offering a _lot_ more than just tabular display with only simplistic sorting. Don't go by what you see at first sight ("Oh, hey, there's a tabular list here..."). > (Although I'm guessing that would break much > of Drew's Bookmarks+ library...) Yes. Vanilla Emacs has apparently gone this route recently, against my requests/advice. As a result I'll no doubt have to include some of the previous vanilla bookmark.el code in Bookmark+. Alas. (On n'arrete pas le progres...)