unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* On improving Bookmarks
@ 2022-11-16  5:25 Gabriel
  2022-11-16  7:23 ` Matthias Meulien
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Gabriel @ 2022-11-16  5:25 UTC (permalink / raw)
  To: emacs-devel

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



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2022-11-18  7:58 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-16  5:25 On improving Bookmarks Gabriel
2022-11-16  7:23 ` Matthias Meulien
2022-11-16  8:05 ` Stefan Kangas
2022-11-16 17:28 ` bug#59212: " Karl Fogel
2022-11-16 19:33   ` Eli Zaretskii
2022-11-16 19:47     ` Karl Fogel
2022-11-16 17:37 ` Karl Fogel
2022-11-17 10:20   ` Jean Louis
2022-11-17 21:17     ` Karl Fogel
2022-11-18  3:13       ` Stefan Kangas
2022-11-18  7:58         ` Jean Louis
2022-11-18  7:53       ` Jean Louis

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).