From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gabriel Newsgroups: gmane.emacs.bugs Subject: bug#59212: 29.0.50; [PATCH] Set default value of bookmark Type Date: Sat, 12 Nov 2022 17:55:41 -0300 Message-ID: <877czzao4y.fsf@hotmail.com> References: <83iljko87o.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21843"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) To: 59212@debbugs.gnu.org Cancel-Lock: sha1:ROSyLvwjj/CZ5wWRHn/8J+SHWvg= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 12 22:06:28 2022 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 1otxhs-0005W1-9d for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 12 Nov 2022 22:06:28 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1otxhZ-0003gu-M0; Sat, 12 Nov 2022 16:06:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1otxhV-0003gh-Uo for bug-gnu-emacs@gnu.org; Sat, 12 Nov 2022 16:06:06 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1otxhS-00064a-E0 for bug-gnu-emacs@gnu.org; Sat, 12 Nov 2022 16:06:05 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1otxhS-0001th-5A for bug-gnu-emacs@gnu.org; Sat, 12 Nov 2022 16:06:02 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Gabriel Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 12 Nov 2022 21:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59212 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.16682871107229 (code B ref -1); Sat, 12 Nov 2022 21:06:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 12 Nov 2022 21:05:10 +0000 Original-Received: from localhost ([127.0.0.1]:49393 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1otxgb-0001sU-Q4 for submit@debbugs.gnu.org; Sat, 12 Nov 2022 16:05:10 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:39710) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1otxga-0001sN-GL for submit@debbugs.gnu.org; Sat, 12 Nov 2022 16:05:08 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1otxga-0003YL-9w for bug-gnu-emacs@gnu.org; Sat, 12 Nov 2022 16:05:08 -0500 Original-Received: from ciao.gmane.io ([116.202.254.214]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1otxgW-0005pL-EN for bug-gnu-emacs@gnu.org; Sat, 12 Nov 2022 16:05:06 -0500 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1otxgU-0003ZL-4q for bug-gnu-emacs@gnu.org; Sat, 12 Nov 2022 22:05:02 +0100 X-Injected-Via-Gmane: http://gmane.org/ Received-SPF: pass client-ip=116.202.254.214; envelope-from=geb-bug-gnu-emacs@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.5 / 5.0 requ) BAYES_00=-1.9, FORGED_HOTMAIL_RCVD2=0.874, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, 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: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:247714 Archived-At: Stefan Kangas writes: > I'm not Karl, but I've experimented with something similar before and I > found two things: > > 1. I had to add a type for Dired bookmarks (which are not Files) to > avoid confusion. > > 2. Using a default name (I also used "Files", IIRC), just made my long > list of bookmarks more busy with little benefit. If anything, it > made it harder to navigate, as it was harder to make out the > "special" types of bookmarks. > > So all in all, I was not a huge fan of the change. > > If we want to add this, I suggest adding a defcustom so that users can > enable or disable this functionality to their liking (or change "Files" > into something else). I might prefer to disable it, for example. 1. Good point about Dired. Would be nice to have a Type for regular files and another one for directories. Is there any approach to differentiate files from directories that do not rely on IO calls? Some kind of portable string-check, I guess. I am aware of 'file-directory-p' and 'file-regular-p', but both will try to read FILENAME, which could degrade performance in case of long Bookmark lists (and there is also Tramp). 2. Thanks for the inputs. It's not clear for me what do you mean by "more busy" or "harder to navigate". How do you normally navigate in long Bookmark lists? What are the use-cases where a visual distinction between empty and non-empty strings of the Type column is useful? What about the distinction between Types Eshell, DocView and VC, where the user has to read the contents of the Type column? I am against adding a new defcustom for such trivial thing, Emacs has already too much. I think this proposed change is a better default to novices, and advanced users can add an advice around bookmark-type-from-full-record. If we want to customize this behavior, I propose something like a defcustom that offers an alist of '((TYPE . DISPLAY-STRING)). I also suggest to add a new 'type choice to bookmark-sort-flag, which I can do in a new wishlist. --- Gabriel