38

GitHub - publicimageltd/delve: Delve into your org-roam zettelkasten.

 3 years ago
source link: https://github.com/publicimageltd/delve
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

README.org

delve.el

Delve is a tool to delve into your org roam zettelkasten. Its main purpose is to find pages by following links (either backlinks or references made in the page itself). Thus you can quickly overview the network of interpage relations you have created. For this purpose, you can also use the predefined searches which attempt to highlight some focal points of this network (e.g., those pages which have the most links, or the last modified pages).

Opening Delve the first time, you can browse your zettelkasten by ROAM_TAG, or use one of the predefined searches. Further functionality will be added.

Delve inherits and extends the functionality from the now deprecated org-roam-dashboard.

Obligatory screenshot and some explanation

./screenshots/screenshot_last_modified.png

On this screenshot, you can see that the user has opened the list of the last ten modified pages. On the lower part of the buffer, you can see several tags like “Alias” (I have tagged aliased pages for debugging purposes), “Begriff” (German for ‘concept’), “Dashboard” (pages of importance for the current project), “Gedanke” (free standing thought), etc. If I want to see the pages with these tags, I can move the cursor to that line and press <TAB> to expand it. Delve will present the same type of list as above.

There’s quite some information stuffed into each line. Let’s take as an example the first page of the list of the last 10 modified pages:

./screenshots/detail.png

That page has the title Imagination. It has been modified on November, 4th. The icon right beside the date shows that this page is actually the result of a search for pages. It is tagged as a concept (‘Begriff’). Since it is on the top of this result list, it is the last modified page of the whole database.

As you can see, there are 17 links pointing from that page to some other page, and 19 other pages which point to that page (backlinks) on the topic of imagination. The type of links is visualized by using arrows: 19 pages point to the title, the title points to 17 other pages.

If you would want to follow these links, you could move te cursor on the page item and press the right or the left cursor key, respectively. A sublist would be inserted showing all the links.

Here’s an example of such an expanded list:

./screenshots/detail2.png

The top item is a page with “Criticism of AI” (“Kritik der KI”). There are two links pointing to that page, incidentally two article reference pages. These page items have a an arrow pointing to the right on their very left side, that marks them as “links pointing to the top file”. The last item is a page for the concept “Artificial Intelligence” (“Künstliche Intelligenz”). As the item on its left side indicates, that’s a link found in the top page (“Criticism of AI”) itself.

The most important feature is that the user can now look at each of these linked pages again, and investigate their links. So we could now, for example, look at what pages link to “Artificial Intelligence” or what references are made within this page, without leaving Delve.

Features

Note that this is still a work in progress. See #bugs–problems–untested-stuff below.

  • Display lists of org roam pages (=Zettel) with additional information on backlinks, “tolinks”, and modification date.
  • Expand the Zettel item (page) to see backlinks, or links pointing to the zettel, or both.
  • Interactively browse the Zettelkasten according to predefined searches (Last ten modified pages; top linked pages; etc.)
  • Visit the Zettel at point to edit it. Delve provides an interactive command to switch back and forth between the Delve buffers and the org roam buffers.
  • Remote editing: From within the tree view, add or remove tags.
  • Additional minor mode (delve-minor-mode) for org roam pages, allowing to open a new Delve buffer with the current org roam page as top item.

Installation

Basic Installation

Delve depends on another tool of mine called lister. But neither package is available at melpa yet. So you have to download both packes (delve and lister) in order to make this work:

(use-package lister
  :quelpa (lister :fetcher git
  		  :url "https://github.com/publicimageltd/lister"))

(use-package delve
  :quelpa (delve :fetcher git 
		 :url "https://github.com/publicimageltd/delve")
  :config
  (use-package delve-minor-mode
    :config
    (add-hook 'org-mode-hook #'delve-minor-mode-maybe-activate))
  :bind
  (("<f12>" . delve-open-or-select)))

This snippet above also installs the delve-minor-mode. It is a local minor mode which is only activated if the org mode file visited belongs to the org roam database (e.g., is placed with in the org roam directory). See #delve-minor-mode below.

Further Configuration

For pretty icons, install all-the-icons.el. If you also want pretty icons when calling delve-open-or-select, use the following option:

(setq delve-use-icons-in-completions t) ;; per default nil

Keybindings

Delve

Use the usual navigation keys. Additionally, the following keys apply:

KeyFunctionENTERVisit Zettel at pointTABExpand on Zettel or search at point, or hide itLEFTInsert list with all backlinks pointing to Zettel at pointRIGHTInsert list with all links in the Zettel at point+Add tag to the Zettel at point-Remove tag from the Zettel at pointgRefresh the buffer contents.Refresh the item at pointC-lReplace current list with the expanded Zettel at pointrRevert buffer to the original list

Delve minor mode

This is a local minor mode which adds some convenience key bindings to the org roam page buffer.

Per default, this submap is mapped to the prefix C-d. This yields:

KeyFunctionC-d dOpen a new delve buffer with the current page as top item, and expand itC-d +Add a tagC-d -Remove a tag

Using C-d d in an org-roam buffer is particularly useful: It presents all links from the current page as a delve list. See, for example, the following example of a page with two backlinks (and no links from the page itself):

./screenshots/example-backlinks-org-roam-page.png

Pressing C-d d creates a tree representation of that buffer:

./screenshots/example-backlinks.png

The first two items in this list are the backlinks (in the right part of the org roam buffer ). The other, links with an right arrow pointing to the left, are those links which point from the current page to another page (i.e., a link to the page titled “Kreativität” (“Creativity”). Each of these linked pages is displayed with their respective links, so that the user could now expand on them to dive deeper into the Zettelkasten.

Bugs / Problems / Untested Stuff

  • Aliases are not recognized. Sometimes this leads to undesireable results, because you just see the Zettel with the same title listed twice or even more often. An algorithm to effectively identify duplicates is on the way.
  • There is a general problem with duplicate items, not related to aliases, which I could not track them down yet.
  • You can currently mark items (by pressing m) and unmark them all (u). But you can’t do anything with the marked items yet.

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK