emacs-devel
[Top][All Lists]
Advanced

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

RE: Add new functions to mark/unmark/delete all bookmarks


From: Drew Adams
Subject: RE: Add new functions to mark/unmark/delete all bookmarks
Date: Thu, 23 Jul 2020 20:15:25 -0700 (PDT)

> Attached here there is a patch to add new functions to mark, unmark,
> and delete all bookmarks at once.
> 
> Menu entries and bindings are updated too, and tests are included.
> 
> You may consider this both a suggestion and a way to get an opinion
> from the community.
> 
> I felt that some functions where missing, I'm used to type "U" in
> dired to unmark all marks...
> 
> Summary (just main functions are described here):
> 
> * bookmark-delete-all: With ARG nil asks for confirmation. Deletes all
>   bookmarks. Bound to "D" in `bookmark-map'.
> * bookmark-bmenu-mark-all: Operates in the *Bookmark List* buffer.
>   Marks all bookmarks. Bound to "M" in `bookmark-bmenu-mode-map'.
> * bookmark-bmenu-unmark-all: Operates in the *Bookmark List* buffer.
>   Unmarks all bookmarks. Bound to "U" in `bookmark-bmenu-mode-map'.
> * bookmark-bmenu-delete-all: Operates in the *Bookmark List* buffer.
>   Marks all bookmarks for deletion. Bound to "D" in `bookmark-bmenu-mode-
> map'.

Well, I naturally am not in favor of seeing this.

All of that is in Bookmark+, but better, IMO.
You could have taken some of what's there, either
as is or as a starting point.

The Bookmark+ behavior borrows heavily from Dired
(and not just for marking).  `U', like `M-DEL',
unmarks all of a given kind of mark, or all marks.

There are commands to mark different kinds of
bookmarks and commands to mark bookmarks that
satisfy various conditions.

`M-m' marks all bookmarks.  (`M' is a prefix key
for marking or showing only `man' bookmarks.  Most
uppercase letters are prefix keys for acting on
particular kinds of bookmarks.  `M' as a suffix
key marks bookmarks of the type indicated by the
prefix key; e.g., `I M' marks Info bookmarks.)

Marking flexibility carries over for deletion.
As in Dired, `D' deletes the marked bookmarks -
it doesn't flag for deletion.  `d' and `C-d' flag
individually.  As in Dired, there's no need for a
command to flag all, IMO.

https://www.emacswiki.org/emacs/BookmarkPlus#MarkingAndUnmarkingBookmarks
___

Some of the commands involving mark (`>') and flag
(`D') that are bound to keys:

d       - Flag bookmark `D' for deletion, then move down
C-d     - Flag bookmark `D' for deletion, then move up
x       - Delete (visible) bookmarks flagged `D'
D       - Delete (visible) bookmarks marked `>'

m       - Mark bookmark
u       - Unmark bookmark  (`C-u': move up one line)
DEL     - Unmark previous bookmark (move up, then unmark)

M-m     - Mark all bookmarks
% m     - Mark all bookmarks whose names match a regexp
U       - Unmark all bookmarks  (`C-u': interactive query)
t       - Toggle marks: unmark the marked and mark the unmarked

A M     - Mark autofile bookmarks
# M     - Mark autonamed bookmarks
X M     - Mark temporary bookmarks
H M     - Mark highlighted bookmarks

B M     - Mark non-file (i.e. buffer) bookmarks
M-d M-m - Mark Dired bookmarks
F M     - Mark file & directory bookmarks  (`C-u': local only)
G M     - Mark Gnus bookmarks
I M     - Mark Info bookmarks
i M     - Mark Icicles search-hits bookmarks
N M     - Mark non-invokable bookmarks
M-I M-M - Mark image-file bookmarks
K M     - Mark desktop bookmarks
M M     - Mark `man' page bookmarks (that's `M' twice, not Meta-M)
O M     - Mark orphaned local file/dir bookmarks (`C-u': remote also)
R M     - Mark region bookmarks
Q M     - Mark function bookmarks
M-u M-m - Mark URL bookmarks
V M     - Mark variable-list bookmarks
W 3 M   - Mark W3M (URL) bookmarks
w M     - Mark snippet bookmarks
Y M     - Mark bookmark-file bookmarks
Z M     - Mark bookmark-list bookmarks

T m %   - Mark bookmarks having at least one tag that matches a regexp
T m +   - Mark bookmarks having at least one tag in a set    (OR)
T m *   - Mark bookmarks having all of the tags in a set     (AND)
T m ~ + - Mark bookmarks not having any of the tags in a set (NOT OR)
T m ~ * - Mark bookmarks not having all of the tags in a set (NOT AND)

T u %   - Unmark bookmarks having a tag that matches a regexp
T u +   - Unmark bookmarks having at least one tag in a set  (OR)
T u *   - Unmark bookmarks having all of the tags in a set   (AND)
T u ~ + - Unmark bookmarks not having any tags in a set (NOT OR)
T u ~ * - Unmark bookmarks not having all tags in a set (NOT AND)

>       - Toggle showing only marked bookmarks
<       - Toggle showing only unmarked bookmarks

- >     - Omit the marked bookmarks; un-omit them if after `- S'

j >     - Jump to marked bookmarks in other windows
C-h >   - Show info about marked bookmarks (`C-u': internal form)

Y > -   - Move the marked bookmarks to a bookmark file
Y > +   - Copy the marked bookmarks to a bookmark file
Y > 0   - Copy the marked bookmarks to a new bookmark file
M-l     - Load marked bookmark-file bookmarks  (extra load)

M-R     - Relocate the marked bookmarks 

a >     - Edit annotations of marked bookmarks (`C-u': all)
E       - Edit internal Lisp records of marked bookmarks  (`C-u': all)

M-X     - Toggle temporary/savable status of marked bookmarks

M-d >   - Open Dired for marked file & directory bookmarks

M-s a C-s       - Isearch the marked bookmarks            (`C-u': all)
M-s a C-M-s     - Regexp-isearch the marked bookmarks     (`C-u': all)
M-s a M-s       - Regexp-search the marked file bookmarks (`C-u': all)
M-q             - Query-replace the marked file bookmarks

T > l   - List tags used in marked bookmarks  (`C-u': show tag values)
T > v   - Set value of a tag, for each marked bookmark    (`C-u': all)
T > C-y - Add tags copied from a bookmark to those marked (`C-u': all)
T > q   - Replace tags of marked with copied tags         (`C-u': all)

H > +   - Set highlighting for marked bookmarks
H > H   - Highlight the marked bookmarks
H > U   - Unhighlight the marked bookmarks

s >     - Sort marked (`>') bookmarks first
s D     - Sort flagged (`D') bookmarks first

Here's the `Mark' submenu of the `Bookmark+' menu-bar
menu, followed by its `Bookmarks of Type' submenu for
marking bookmarks of a specific kind:

https://www.emacswiki.org/emacs/BookmarkPlus#MarkMenu



reply via email to

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