emacs-devel
[Top][All Lists]
Advanced

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

On improving Bookmarks


From: Gabriel
Subject: On improving Bookmarks
Date: Wed, 16 Nov 2022 02:25:20 -0300
User-agent: Gnus/5.13 (Gnus v5.13)

Hi,

I think there are some opportunities for improvements in Bookmarks (in
general and in how it support Types) and would like to collect general
feedback and directions before reporting bugs or proposing patches,
especially considering if such changes would be useful, the effort to
implement them and how to handle compatibility.

Bookmarks has support for Types besides regular "Files" or "Directories"
(opened with Dired).  A quick xref in current Emacs master branch shows
the following Types:

- "DocView"
- "Eshell"
- "Gnus"
- "Help"
- "Image-Dired"
- "Info"
- "Man"
- "EWW"
- "VC"
- "WoMan"

1) The empty "Type" column on C-x r l (bookmark-bmenu-list)

Bookmarks shows a proper value in the Type column of bookmark-bmenu-list
for all Types, except for regular "Files" and "Directories", in which
shows an empty string.  I believe that displaying the actual Type rather
an empty string for these cases would make the interface more consistent
and easier for navigation.  See bug#59212 for the open discussion.
Besides the question regarding the real value of this change, I
currently don't know how to easily distinguish between "Files" and
"Directories" without relying on IO calls (e.g. file-directory-p), which
could degrade performance in case of long Bookmarks lists.  We could
display the string "File" for both "Files" and "Directories", but it
would be a worse experience for users to not provide such distinction.

2) The usage of "File" and "Filename" in docs and interface

In docs (e.g. (info "(emacs)Bookmarks")) and interface (e.g. the "File"
column in bookmark-bmenu-list), we can find several occurrences of the
terms "File" and "Filename" (and related terms), which I think is
inconsistent since Bookmarks supports Types that do not really have
these concepts (e.g. "Help", "Man", "EWW", "Gnus").  A better term would
be "Location", which is already used in some places
(e.g. bookmark-location, bookmark-relocate, the 'location property).
Thus, I propose to make "Location" the official term in docs, interface
and code, and to obsolete "File", "Filename" and related ones.

3) Add Type to bookmark-sort-flag

A simple suggestion to add Type to the choices of bookmark-sort-flag.

4) Make R (bookmark-relocate) work for all Types

The R (bookmark-relocate) currently does not seem to work with Types
other than regular "Files" and "Directories".  It causes the following
error:

bookmark-relocate: Wrong type argument: stringp, nil

Would be nice to make it work for all types.  I am not sure what would
be the best way to implement it and the required effort.  Perhaps
similar to how VC handles different backends or similar to how currently
bookmarks handles 'bookmark-handler-type.  See also comment from 2010 in
bookmark-location.  As a simple remediation in case this change is not
added to Bookmarks, Emacs could report a better error message for users,
e.g.: "bookmark-relocate is not supported for type EWW".

5) Ability to open Bookmarks with external applications

Add choice to open bookmarks in Emacs using the default
bookmark-handler-type or using an external application (e.g. open a PDF
with xdg-open rather than DocView or open an URL with Firefox rather
than EWW).  Not sure what would be the best way to implement it, though.

6) Add minibuffer completion details to C-x r b (bookmark-jump)

A simple suggestion to add minibuffer completion details to
bookmark-jump so users can know, for example, the Type and Location.  It
could be controlled by defcustom completions-detailed.

7) Add Tags

A "simple" feature that would make Bookmarks much more powerful.  In
simple terms, a list of tags would be saved with each bookmark in
bookmark-default-file, and could be used for better filtering and
navigation.

---
Gabriel



reply via email to

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