Subject: 29.0.50; [PATCH] Set default value of bookmark Type

From: Gabriel <[email-masked]>
Date: Sat, 12 Nov 2022 05:56:22 -0300

Description:
Not a bug per se, but a suggestion for improvement in how Bookmark
displays the Type (added by commit 7c995264359824cc1aca40ca37201db5ed44e659).

Currently, bookmark-bmenu-list (C-x r l) displays a column named Type,
which has a proper value for all handlers (e.g.: Eshell, VC, EWW etc)
except for regular files, in which an empty string is displayed. I
believe the current behavior could be improved by displaying a default
value ("Files") to make the interface more uniform, explicit and to
avoid confusion.

Steps:
1) emacs -Q
2) M-x eshell
3) C-x r m <RET>
4) C-x C-f ~/foo.bar
5) C-x r m <RET>
6) C-x r b

These steps will add two bookmarks (eshell and foo.bar) and will open
the Bookmarks list. The Type column will have values "" and
"Eshell". After the patch below is applied, the Type column will have
values "File" and "Eshell".

>From 0d9379e2d470239e2da6369d27979672ab10a719 Mon Sep 17 00:00:00 2001
From: Gabriel do Nascimento Ribeiro <[email-masked]>
Date: Sat, 12 Nov 2022 05:13:36 -0300
Subject: [PATCH 1/1] Set default value of bookmark Type

* lisp/bookmark.el (bookmark-type-from-full-record): Return default
  value "File" when type handler is missing.
  (bookmark-bmenu--revert): Remove conditional around type.
---
 lisp/bookmark.el | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lisp/bookmark.el b/lisp/bookmark.el
index b57ad12986..ad1a1f1acf 100644
--- a/lisp/bookmark.el
+++ b/lisp/bookmark.el
@@ -372,9 +372,9 @@ bookmark-type-from-full-record
   (let ((handler (bookmark-get-handler bookmark-record)))
     (when (autoloadp (symbol-function handler))
       (autoload-do-load (symbol-function handler)))
-    (if (symbolp handler)
-        (get handler 'bookmark-handler-type)
-     "")))
+    (or (and (symbolp handler)
+             (get handler 'bookmark-handler-type))
+        "File")))
 
 (defun bookmark-all-names ()
   "Return a list of all current bookmark names."
@@ -1889,7 +1889,7 @@ bookmark-bmenu--revert
                                   'follow-link t
                                   'help-echo "mouse-2: go to this bookmark in other window")
                     name)
-                 ,(or type "")
+                 ,type
                  ,@(if bookmark-bmenu-toggle-filenames
                        (list location))])
               entries)))
-- 
2.34.1

---
Gabriel