3

I understand how to create a single list of bookmarks. But when there are may of them it becomes hard to navigate. A natural solution is to create a tree of bookmarks lists:

enter image description here

I learned how to save the bookmarks into a separate file and load it using bmkp-switch-bookmark-file-create.

But how to create a bookmark in the main list that will open another file with bookmarks and switch between them? So it would look like web navigation. I read bookmarks+ documentation, but it's very hard to comprehend it.

Update

I created a new bookmarks list in ~/test.bmk. Then added a link to this file to the main list using C-x p y. The link appeared. But when I open that link using C-x j y it doesn't do what I expect. I thought that the current list will be replaced by the one stored in the file.

But it added the new links to the current list instead. How to replace the list to new one?

1 Answer 1

2

Not sure what your question is. A bookmark list and a bookmark file are flat lists - they are not trees.

But you can have a bookmark that itself points to a set of bookmarks. There are a couple of ways you can do this.

  1. You can bookmark a bookmark file, so that "jumping" to that bookmark loads that bookmark file. If you use C-u when you do that then you switch to that bookmark file (i.e., only its bookmarks). Otherwise, you add its bookmarks to the current list of bookmarks.

  2. You can bookmark a bookmark list, that is, a particular state of the bookmark-list display - what you see in buffer *Bookmark List*. This means bookmarking a particular view of a set of bookmarks. That view is a sorted, filtered, etc. subset of the bookmarks that are current. When you "jump" to a bookmark-list bookmark the display is updated to show the view that was saved in the bookmark.

If you like, you can think of a bookmark file, some of whose bookmarks are themselves bookmark-file bookmarks, as being a bookmark tree. Think of each bookmark in the tree as being either a node (a bookmark-file bookmark) or a leaf (an ordinary bookmark). Similarly for bookmark-list bookmarks.

There are also other ways to define sets of bookmarks than using bookmark files or bookmark-list displays. In particular, tags let you define any number of sets of bookmarks. You can show or access the bookmarks that have whatever combination of tags you like. And you can of course create bookmark files or bookmark lists from such a set (e.g., you can make a bookmark file from all bookmarks that have a certain set of tags).

So while you don't literally have bookmark trees, in the sense of a Lisp-list tree, you do have various ways of defining and using different sets of bookmarks. And at least for bookmark files and bookmark lists you can encapsulate such a set in a single bookmark. (Similarly for sets of bookmarks defined using Dired markings.)

5
  • I want to create multiple bookmark files. And connect them into a tree, so there will be bookmarks in one file leading to another file of bookmarks.
    – user4035
    Apr 17, 2018 at 7:47
  • Can you give an example of how to bookmark a bookmark file? When I do it, it opens the file in fundamental mode. C-u doesn't do anything.
    – user4035
    Apr 17, 2018 at 8:02
  • You should be able to use bmkp-set-bookmark-file-bookmark (bound by default to C-x p y and C-x p c y) to create or update a bookmark-file bookmark. To jump to such a bookmark, use bmkp-bookmark-file-jump (bound by default to C-x j y). If you use C-u C-x j y then the bookmark-file replaces the current bookmark list, instead of just adding its bookmarks to it - that is, it switches from the current bookmark file to the new one. If you see some other behavior, use M-x bmkp-send-bug-report to report a bug, providing a step-by-step recipe to repro the problem.
    – Drew
    Apr 17, 2018 at 14:01
  • I tried to do as you suggested, but couldn't achieve my goal. Could you please look at the updated question.
    – user4035
    Apr 19, 2018 at 9:55
  • I already answered that: "If you use C-u when you do that then you switch to that bookmark file (i.e., only its bookmarks). Otherwise, you add its bookmarks to the current list of bookmarks." Did you try using C-u C-x j y?
    – Drew
    Apr 19, 2018 at 13:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.