Giter Club home page Giter Club logo

org-roam-ui's Introduction

ci MELPA Screenshot 2021-10-12 at 12 51 39

org-roam-ui: a graphical frontend for your org-roam Zettelkasten

Table of Contents

Org-Roam-UI is a frontend for exploring and interacting with your org-roam notes.

Org-Roam-UI is meant a successor of org-roam-server that extends functionality of org-roam with a Web app that runs side-by-side with Emacs.

Changelog

For major new features/bugfixes we will update changelog.

Installation

org-roam-ui is on MELPA!

org-roam-ui requires org-roam, websocket, simple-httpd, f and Emacs >= 27 for fast JSON parsing.

package.el

M-x package-install org-roam-ui

No configuration is necessary when you use package.el to install ORUI.

Doom

Add the following to your package.el

Org-roam-ui tries to keep up with the latest features of org-roam, which conflicts with Doom Emacs's desire for stability. To make sure nothing breaks, use the latest version of org-roam by unpinning it.

(unpin! org-roam)
(package! org-roam-ui)

Then something along the following to your config.el

(use-package! websocket
    :after org-roam)

(use-package! org-roam-ui
    :after org-roam ;; or :after org
;;         normally we'd recommend hooking orui after org-roam, but since org-roam does not have
;;         a hookable mode anymore, you're advised to pick something yourself
;;         if you don't care about startup time, use
;;  :hook (after-init . org-roam-ui-mode)
    :config
    (setq org-roam-ui-sync-theme t
          org-roam-ui-follow t
          org-roam-ui-update-on-save t
          org-roam-ui-open-on-start t))

We recommend only loading org-roam-ui after loading org(-roam) as starting the server and making database requests can impact startup times quite a lot.

straight/use-package

(use-package org-roam-ui
  :straight
    (:host github :repo "org-roam/org-roam-ui" :branch "main" :files ("*.el" "out"))
    :after org-roam
;;         normally we'd recommend hooking orui after org-roam, but since org-roam does not have
;;         a hookable mode anymore, you're advised to pick something yourself
;;         if you don't care about startup time, use
;;  :hook (after-init . org-roam-ui-mode)
    :config
    (setq org-roam-ui-sync-theme t
          org-roam-ui-follow t
          org-roam-ui-update-on-save t
          org-roam-ui-open-on-start t))

Usage

Use M-x org-roam-ui-mode RET to enable the global mode. It will start a web server on http://127.0.0.1:35901/ and connect to it via a WebSocket for real-time updates.

Commands

ORUI provides a few commands for interacting with the graph without ever having to leave Emacs. NOTE: This is quite janky at the moment and will change in the future. Consider this more of a teaser.

Moving around

(org-roam-ui-node-zoom)

Zooms to the current node in the global view ignoring local mode.

(org-roam-ui-node-local)

Opens the current node in local view.

You can optionally give these command three parameters:

  1. the node id you want to zoom to (by default the current node)
  2. The speed at which you want to zoom (can be set in the UI) in ms.
  3. The padding of the zoom in px.

These options might not work at the moment, please configure them in the UI for the time being.

Manipulating graph

(org-roam-ui-add-to-local-graph &optional id)

Adds the node with the given id to the local graph. If no id is given, the current node is used. If the local graph is not open, it will be opened.

(org-roam-ui-remove-from-local-graph &optional id)

Removes the node with the given id from the local graph. If no id is given, the current node is used.

Configuration

Org-Roam-UI exposes a few variables, but most of the customization is done in the web app.

Following

ORUI follows you around Emacs by default. To disable this, set

(setq org-roam-ui-follow nil)

or disable the minor mode org-roam-ui-follow-mode.

Updating

We plan to make updates to the graph happen smoothly, at the moment it is only possible to reload the entire graph when an update happens (but local mode is preserved). This is enabled by default, to disable

(setq org-roam-ui-update-on-save nil)

Theme

Org-Roam-UI can sync your Emacs theme! This is the default behavior, to disable it do

(setq org-roam-ui-sync-theme nil)

Then call M-x orui-sync-theme.

You can also provide your own theme if you do not like syncing nor like the default one. To do so, set org-roam-ui-custom-theme to an alist of (rather specific) variables, like so

(setq org-roam-ui-custom-theme
    '((bg . "#1E2029")
        (bg-alt . "#282a36")
        (fg . "#f8f8f2")
        (fg-alt . "#6272a4")
        (red . "#ff5555")
        (orange . "#f1fa8c")
        (yellow ."#ffb86c")
        (green . "#50fa7b")
        (cyan . "#8be9fd")
        (blue . "#ff79c6")
        (violet . "#8be9fd")
        (magenta . "#bd93f9")))

You can optionally provide (base1 . "#XXXXXX") arguments after the last one to also set the background shades, otherwise ORUI will guess based on the provides bg and fg.

Open on start

By default, org-roam-ui will try to open itself in your default browser. To disable this, set

(setq org-roam-ui-open-on-start nil)

Disclaimers ‼

  • We only support org-roam v2; v1 will never be supported.
  • As the name suggests, Org-Roam-UI only works with org-roam! If you organize your notes in some other form org-roam-ui cannot work, as it uses org-roam to fetch all the connections.
  • Feature-parity with org-roam-server is not the goal. Although we aim to make a similar product which is having a visual graph to help you explore and navigate your org-roam nodes, we do not intend to replicate all of the, nor be limited to replicating the features of org-roam-server.
  • This is alpha software: please do give it a try and use it, but expect bugs and troubleshooting!
  • The project was created by a couple of tinkerers to scratch their own itch. We don't get rewarded in any material way and development may stop any day (because life). The best way to keep the project alive is to explore the code and contribute!

FAQ 🗨

Q: Aaaaand it broke: what do?

Sorry! This is still alpha software, so expect it to break from time to time. Best thing you can try is to remove your settings by going to "Storage > Local Storage" on Firefox or "Application > Local Storage" on Chromium and deleting everything there.

If the issue still persists, please file a bug report with

  1. Your browsers console log
  2. Your browsers
  3. What you were doing when it broke

and we'll try to help you ASAP!

Q: Clicking 'Open in Emacs' gives an error around json-parse-string, how do I fix this?

If you receive an error, in emacs, stating function definition is void json-parse-string, then you must compile emacs with json support. This is not automatically done on systems such as Gentoo.

Q: Graph Slow! Faster?

While we try to optimize the display of the graph, there is only so much we can do. For largish networks (>2k nodes) dragging the graph around a lot can cause some performance issues, but there are a few things you can do to speed it up.

Close the tweaks panel

At the time of writing (Aug 8) it is very much not optimized, and shifting between global and local mode or 2d or 3d is noticeably slower with the tweaks panel open than without. This will be fixed in a future release.

Use a Chromium based browser

As much as it saddens us to say, Firefox's rendering engine is quite a bit slower than its Chromium cousins. Compare the performance of the two and see if that's the main issue first.

Turn off the particles

I know, very cool to see those little guys travel up and down your notes, but very slow, especially in 3D mode.

Turn off labels

Probably the second slowest thing to render, with little possibility of speeding it up. Consider only turning on labels on highlight or cranking up the "Label appearance scale".

Turn off highlight animations

I know, they're gorgeous, but not very performant.

Turn off collision

Nice, but costly! If you like to have the graph more spread out, turning off collision will change little in the resulting layout, but will help performance quite a bit.

Turn off gravity

Fewer forces fewer worries

Favor 2D over 3D

I know, it looks cool, but man is it slow.

Don't drag the dang thing around so much!

In our experience, once the graph has actually settled and nothing needs to be rendered again, looking around should pose little trouble. At the moment there is no way of "saving" the graph configuration, but we are exploring the possibility. The graph layout algorithm is deterministic however, so barring any changes to the data it should produce the same results each time.

Q: Will you implement X?

Hopefully, yeah! But time is limited, and so is the amount of features we can cram into this things before it implodes in itself, so we are adding things incrementally to make sure they work. That said, we'd love to hear from you! If your feature is not already on the project board, please post minor feature requests such as "I want to be able to color this specific node" in the minor feature requests discussion and major feature requests (e.g. "I want to publish my graph) in the major feature requests discussion or upvote those already posted, this way we can adjust our priorities somewhat!

Q: This doesn't work with org-roam v1/org-brain/Zettledelft!

Correct! We only support org-roam v2, although we might introduce a backend agnostic implementation later.

Features ✨

Org-roam-ui's main feature is the ability to generate a graph visualization of your org-roam notes.

Cool graph

image

Open notes in Emacs

(Double) clicking a node will open the corresponding note in Emacs, very cool. You don't need org-protocol for this, it works out of the box!

2021-07-31.18-16-52.mkv.mp4

Note previewing

For when you leave Emacs in a moment of weakness.

fileviewer.mp4

Follow your movement in Emacs!

When you open a note in Emacs, org-roam-ui will move to the corresponding node on the graph.

2021-07-31.18-17-19.mkv.mp4

Theme syncing

Your gruvbox is only a M-x orui-sync-theme away (or you can just select them in the settings).

2021-07-31.18-26-01.mkv.mp4

Filters

Filter out all those "temporary" notes you'll sift through someday.

filters.mp4

3 D

Literally deepen your understanding of your thoughts (and it looks cool)

2021-07-31.18-32-53.mkv.mp4

Planned features

Graph

In no particular order

  • Citation links + customization
  • Tag filtering/coloring
  • Local graph show Nth neighbor
  • Colorization options (by neighbors, centrality, etc)
  • Setting profiles

UI in general

  • File viewing using AST parsing
  • Displaying notes Andy Matushak style
  • Discovery options, e.g. "show shortest path between X and Y"

Integrations with other Org-mode packages

Use markdown notes interchangeably with Org-mode notes!

Delve

tbd

Supporting org-roam-ui

Chat

We have a small telegram group for discussing org-roam-ui, you can join if you're cool. https://t.me/+sEuL2qi37yw1NzQy

Feedback

For feature suggestions, please make an issue or check out the discussions for major and minor features. For other feedback, please go to the feedback discussion, or open up a new one!

Contribute 💪

The best way to support the continued development of org-roam-ui is to get involved yourself! To get started, simply

git clone https://github.com/org-roam/org-roam-ui
yarn
yarn dev

and a development server will be lauched on localhost:3000.

GitHub Community Guidelines apply.

If you are interested in being more closely involved with the project, go here to have an onboarding call with a member of the core team.

We would ❤️ to have you on board!

Donate

If you really really like org-roam-ui, you can make a one-time donation or sponsor one of us monthly!

Sponsors

org-roam-ui's People

Contributors

aloisjanicek avatar blester125 avatar bram85 avatar cdlm avatar danhuynhdev avatar egh avatar github-actions[bot] avatar gvelasq avatar hellseher avatar jwijenbergh avatar kirillrogovoy avatar nobiot avatar p4v4n avatar rasendubi avatar shaunsingh avatar tefkah avatar temporal avatar thedarktrumpet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

org-roam-ui's Issues

[MINOR] Add the option to word-wrap the labels for long titles

Have you checked whether this feature is not already on the project board?

yes

Is your feature request related to a problem? Please describe.
If there are many nodes together, and the titles are long, the labels become unreadable.

Describe the solution you'd like

Maybe if the user could word-wrap the labels, then the collisions could be less.

Describe alternatives you've considered

Adjusting the fonts or the graph's physics, but any setting that I have tried does not solve the problem.

Additional context
Two examples

image
image

Error "Symbol's function definition is void: json-parse-string" in Emacs 27.2

Hi,

I'm using Emacs 27.2 and when double-clicking to a node, Org-roam UI failed to open the file in Emacs, and threw this error:

Error (websocket): in callback `on-message': Symbol's function definition is void: json-parse-string

I checked the library /usr/local/share/emacs/27.2/lisp/json.el.gz and couldn't find the function json-parse-string.

Could you advise where that function comes from?

Follow-mode broken

On my system, follow-mode has been broken since commit 10bc61c (i.e., the last commit where it works is e71c0af).

The graph does not show a highlighted Emacs node, and neither does it highlight and follow when navigating nodes in Emacs.

Nodes not showing up after "Expand node"

First of all thank you for making this!

When poking around I found, that when clicking nodes once to "expand" them and to show only the network around them, they are invisible.
A "hack" around this is turning the 3D view on (and off if you only want to see 2D) – then the nodes show up.

Custom theme not working

Hello! Sorry for all the issues

The following snippet of code is what I'm using to theme orui:

#+begin_src elisp
(setq org-roam-ui-custom-theme
      (list
        (bg . '#2E3440')
        (bg-alt . '#3B4252')
        (fg . '#D8DEE9')
        (fg-alt . '#E5E9F0')
        (red . '#BF616A')
        (orange . '#D08770')
        (yellow .'#EBCB8B')
        (green . '#A3BE8C')
        (cyan . '#88C0D0')
        (blue . '#81A1C1')
        (violet . '#B48EAD')
        (magenta . '#8FBCBB')))
#+end_src

However, that gives this error:

Error in private config: config.el, (invalid-read-syntax # 1 0)

At the 3rd line (in front of bg), any idea what I could be doing wrong?

[MINOR] Show node labels "more intelligently".

It would be nice to show node labels "more intelligently". Now we can have all labels shown or no labels shown, based on the "label appearance scale". It would be really cool, if it worked something like maps, where you see only the most important labels when zoomed out (big cities) and as you zoom in, more labels (villages, street names, ...) start appearing.
This could be done based on number of in/outcoming links, or perhaps user-specifiable node-importance function.

Originally posted by @serycjon in #6 (comment)

Display graph and text side by side

Thanks for the great work!

I'm new to Emacs, so I apologize for the newbie question.

When I start up org-roam-ui, a browser window opens. How do I make the graph appear in Emacs itself, in the same window as the file I'm editing?

Thanks!

citet:key and citep:key do not show up on graph

I have notices that while org-ref style citations like cite:citekey are shown well and nice in the graph as either cite- or ref-links (depending on whether there is an existin note on the cited paper or not), the same is not the case when I use citet:citekey or citep:citekey.

I have tested and org-roam-bibtex does pick up these citet: and citep: links, as they are showing up in the backlink buffers of papers that have notes, so it must be some subtlety in the database that org-roam-ui doesn't pick up on.

How to locate a specific node searching on titles?

I opened this issue in the org-roam-server (org-roam/org-roam-server#114) about how to locate specific nodes in the graph.

One of the workarounds was to establish a fixed random seed in the graph to always see the very same graph every time we refresh the browser.

I don't know if any of those solutions is possible. I just put it here to start a discussion.

Best.

feature request: Hilight node which is opened in the emacs buffer

Hi, firs of all thank you for tis awesome package!

Would it be possible to make the node of the file opened in emacs highlighted? Maybe add an outer ring around it with a bright color.

I have a node with 30+ connections and when I open a child node is very hard to figure out which node I have opened in the graph.

Define / clarify behaviors when sqlite databases are empty

Thanks for your time and help and for the excellent work on this project!

Expected

  • When running org-roam-ui-mode, when the sqlite databases are empty (this occurs when the directory specified byorg-roam-directory contains no org roam files), the UI renders without any visible frontend errors or console errors.

Actual

  • In the browser console, I see an error:
Uncaught TypeError: e.nodes is null
  • I receive this websocket data:
{"type":"graphdata","data":{"nodes":null,"links":null,"tags":null}}

I think this is something we could fix when serializing the data that we send via the websocket by ensuring that all alist entries have a non-nil value

Desired behavior

  • The UI works with an empty DB / empty directory without any kind of error to reduce friction for brand new users
  • In a perfect world, there might even be a UI notice / alert to the user that they have no notes created yet. IMO, this is outside of the scope here, but I'd be happy to work on this if anyone is interested.

Suggested change

Thanks to @kirillrogovoy for suggesting a backend change as a good path. I'm happy to contribute any change; below is my thinking from looking at the code a bit:

Ideally, we prevent this state from ever occurring via Elisp changes. When we have an empty sqlite db, this is the value of the response variable at

(websocket-send-text oru-ws (json-encode `((type . "graphdata") (data . ,response))))))
:

; response variable has this structure before we send it to the server when dbs are empty:
'((nodes) (links) (tags))
; this serializes like this:
(json-encode '((nodes) (links) (tags))
"{\"nodes\":null,\"links\":null,\"tags\":null}"

I was thinking we might be able to fix this issue by mapping over the response alist entries and sanitizing so that in the above example, we end up encoding this structure, instead of the original structure where nulls are possible:

(json-encode '((nodes . []) (links . []) (tags . [])))
"{\"nodes\":[],\"links\":[],\"tags\":[]}"

Repro steps

  1. Run the following Elisp snippet, which creates an empty directory, and then follows suggested org-roam setup and org-roam-ui setup, binding org-roam-directory to the empty directory.
(defun repro()
  ; org-roam
  (require 'org-roam)

  (let ((real-dir "~/Desktop/notes/org-roam") (empty-dir "~/Desktop/empty-dir"))
    (make-directory empty-dir t)
    (setq org-roam-directory empty-dir))
  (setq org-roam-v2-ack t)
  (org-roam-setup)

  ; org-roam-ui
  (add-to-list 'load-path "~/code/org-roam-ui")
  (load-library "org-roam-ui")
)
(repro)
  1. Run (org-roam-ui-mode) and navigate to the opened window.
  2. See a blank screen with a console error at http://localhost:35901/

Related issues or PRs

Abbreviation and year of cites/refs not correctly rendered

When I add a cite:-link using helm-bibtex, they are rendered with %^{author-abbrev} %^{year} title, where only the title contains the actual text that it should be. I can confirm that the bibtex entry has the abbrev and date correctly set. A screenshot to illustrate this:

image

I'm wondering if this is a bug someone else can reproduce, or an error in my configuration?

Filter

How difficult would it be to add the ability to filter certain nodes based on a substring entered in a text field?

Moreover, what if that text field understood regexes? Like for example the user types something like: "Biology|Unread|Aerodynamics/r" - /r is to distinguish between vanilla and regex strings, and the UI shows all the nodes related to those topics?

Application error: a client-side exception has occurred (developer guidance).

Issue

In *httpd* buffer, I get:

(stop "Fri Aug 13 08:27:43 2021")
(start "Fri Aug 13 08:27:45 2021")
(request
 (date "Fri, 13 Aug 2021 03:57:46 GMT")
 (address "127.0.0.1")
 (get "/sw.js")
 (headers
  ("GET" "/sw.js" "HTTP/1.1")
  ("Host" "localhost:35901")
  ("Connection" "keep-alive")
  ("Cache-Control" "max-age=0")
  ("User-Agent" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.25 Safari/537.36")
  ("Accept" "*/*")
  ("Service-Worker" "script")
  ("Sec-Fetch-Site" "same-origin")
  ("Sec-Fetch-Mode" "same-origin")
  ("Sec-Fetch-Dest" "serviceworker")
  ("Referer" "http://localhost:35901/")
  ("Accept-Encoding" "gzip, deflate, br")
  ("Accept-Language" "en-US,en;q=0.9")
  ("If-None-Match" "\"7f5c2115c2377148\"")
  ("If-Modified-Since" "Thu, 12 Aug 2021 17:34:28 GMT")
  ("Content" "")))
(file "/home/colawithsauce/.emacs.d/.local/straight/build-28.0.50/org-roam-ui/out/sw.js" not-modified)
(request
 (date "Fri, 13 Aug 2021 03:57:46 GMT")
 (address "127.0.0.1")
 (get "/workbox-ea903bce.js")
 (headers
  ("GET" "/workbox-ea903bce.js" "HTTP/1.1")
  ("Host" "localhost:35901")
  ("Connection" "keep-alive")
  ("Cache-Control" "max-age=0")
  ("User-Agent" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.25 Safari/537.36")
  ("Accept" "*/*")
  ("Sec-Fetch-Site" "same-origin")
  ("Sec-Fetch-Mode" "no-cors")
  ("Sec-Fetch-Dest" "script")
  ("Referer" "http://localhost:35901/sw.js")
  ("Accept-Encoding" "gzip, deflate, br")
  ("Accept-Language" "en-US,en;q=0.9")
  ("If-None-Match" "\"79cad6c0758a52dd\"")
  ("If-Modified-Since" "Thu, 12 Aug 2021 17:34:28 GMT")
  ("Content" "")))
(file "/home/colawithsauce/.emacs.d/.local/straight/build-28.0.50/org-roam-ui/out/workbox-ea903bce.js" not-modified)
(request
 (date "Fri, 13 Aug 2021 03:57:46 GMT")
 (address "127.0.0.1")
 (get "/_next/static/chunks/4.2dee5d830195ddd06029.js")
 (headers
  ("GET" "/_next/static/chunks/4.2dee5d830195ddd06029.js" "HTTP/1.1")
  ("Host" "localhost:35901")
  ("Connection" "keep-alive")
  ("Pragma" "no-cache")
  ("Cache-Control" "no-cache")
  ("User-Agent" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.25 Safari/537.36")
  ("Accept" "*/*")
  ("Sec-Fetch-Site" "same-origin")
  ("Sec-Fetch-Mode" "cors")
  ("Sec-Fetch-Dest" "empty")
  ("Referer" "http://localhost:35901/sw.js")
  ("Accept-Encoding" "gzip, deflate, br")
  ("Accept-Language" "en-US,en;q=0.9")
  ("Content" "")))
(error 404 nil)
(stop "Fri Aug 13 08:30:24 2021")
(start "Fri Aug 13 08:30:26 2021")
(connection "127.0.0.1")
(request
 (date "Fri, 13 Aug 2021 04:00:29 GMT")
 (address "127.0.0.1")
 (get "/sw.js")
 (headers
  ("GET" "/sw.js" "HTTP/1.1")
  ("Host" "localhost:35901")
  ("Connection" "keep-alive")
  ("Cache-Control" "max-age=0")
  ("User-Agent" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.25 Safari/537.36")
  ("Accept" "*/*")
  ("Service-Worker" "script")
  ("Sec-Fetch-Site" "same-origin")
  ("Sec-Fetch-Mode" "same-origin")
  ("Sec-Fetch-Dest" "serviceworker")
  ("Referer" "http://localhost:35901/")
  ("Accept-Encoding" "gzip, deflate, br")
  ("Accept-Language" "en-US,en;q=0.9")
  ("If-None-Match" "\"7f5c2115c2377148\"")
  ("If-Modified-Since" "Thu, 12 Aug 2021 17:34:28 GMT")
  ("Content" "")))
(file "/home/colawithsauce/.emacs.d/.local/straight/build-28.0.50/org-roam-ui/out/sw.js" not-modified)
(request
 (date "Fri, 13 Aug 2021 04:00:29 GMT")
 (address "127.0.0.1")
 (get "/workbox-ea903bce.js")
 (headers
  ("GET" "/workbox-ea903bce.js" "HTTP/1.1")
  ("Host" "localhost:35901")
  ("Connection" "keep-alive")
  ("Cache-Control" "max-age=0")
  ("User-Agent" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.25 Safari/537.36")
  ("Accept" "*/*")
  ("Sec-Fetch-Site" "same-origin")
  ("Sec-Fetch-Mode" "no-cors")
  ("Sec-Fetch-Dest" "script")
  ("Referer" "http://localhost:35901/sw.js")
  ("Accept-Encoding" "gzip, deflate, br")
  ("Accept-Language" "en-US,en;q=0.9")
  ("If-None-Match" "\"79cad6c0758a52dd\"")
  ("If-Modified-Since" "Thu, 12 Aug 2021 17:34:28 GMT")
  ("Content" "")))
(file "/home/colawithsauce/.emacs.d/.local/straight/build-28.0.50/org-roam-ui/out/workbox-ea903bce.js" not-modified)
(request
 (date "Fri, 13 Aug 2021 04:00:29 GMT")
 (address "127.0.0.1")
 (get "/_next/static/chunks/4.2dee5d830195ddd06029.js")
 (headers
  ("GET" "/_next/static/chunks/4.2dee5d830195ddd06029.js" "HTTP/1.1")
  ("Host" "localhost:35901")
  ("Connection" "keep-alive")
  ("Pragma" "no-cache")
  ("Cache-Control" "no-cache")
  ("User-Agent" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.25 Safari/537.36")
  ("Accept" "*/*")
  ("Sec-Fetch-Site" "same-origin")
  ("Sec-Fetch-Mode" "cors")
  ("Sec-Fetch-Dest" "empty")
  ("Referer" "http://localhost:35901/sw.js")
  ("Accept-Encoding" "gzip, deflate, br")
  ("Accept-Language" "en-US,en;q=0.9")
  ("Content" "")))
(error 404 nil)

environment

  1. emacs-version: 28.0.50, doom-emacs develop branch.
  2. Distro: Archlinux
  3. DE: Gnome40

[BUG] Creating and linking a node at the same time breaks follow mode

Describe the bug
When you capture a new org-file, follow mode stops.

To Reproduce
Steps to reproduce the behavior:

  1. Go to a random org-roam-node with org-roam-ui-follow-mode turned on.
  2. Do org-roam-insert-link
  3. Create a new node
  4. AAA

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

What browser were you using?
Firefox/Chrome/Webkit

Additional context
Add any other context about the problem here.

Preview mode

Hi, does org-roam-ui support preview-mode when you hover a node like org-roam-server ?

Missing nodes cause breakage

If there's a link containing an ID that does not correspond to a node, we see an exception thrown:

node not found: uuid

which is not appropriately handled so the graph stops working.

Children nodes do not correctly link to parent heading nodes.

When using the test file below, I am seeing some node are linking to nodes in other subtree, for example in the screenshot below we see that the Read Note 2 which has an olp of ("Headline" "Second Again") is being linked to the Another node with the :good: tag when it should be linked directly to the Headline node.

It seems there isn't a check for if the parent node is in the child notes olp.

Screenshot from 2021-08-16 11-37-16

Other than that, it seems to correctly handle the edges this file presents. There should probably be a test written based on this file to make sure there aren't regressions in the hierarchical inference.

:properties:
:ID:       18434726-762e-42d7-9042-3f71454248b5
:end:
#+title: test
#+startup: latexpreview inlineimages

#+begin_src elisp
(setq org-use-tag-inheritance 'nil)
#+end_src

* Headline
:properties:
:ID:       3d56e3ad-e9f1-405c-b308-306a86cac7b8
:end:
** Another :bad2:
:properties:
:ID:       a4e471b2-3dc3-4061-acde-f73bc7b73773
:end:
** Another :good:
:properties:
:ID:       7605a32c-81f8-45af-9496-702c803c16b1
:end:
*** Another :bad3:
:properties:
:ID:       72d7686f-ceed-47f6-98bb-59d5f5bfb94b
:end:
*** Real Note
:properties:
:ID:       1b242d67-5da1-4159-963b-137df2b03a5d
:end:
** Second Again
*** Read Note 2
:properties:
:ID:       28481dd7-ce04-4d8b-a264-f5933c119bf1
:end:
** Another :bad:
:properties:
:ID:       5004d23d-4c63-4930-9979-1fadd7a8ff65
:end:

Error in readme instructions

The instructions recommend to add org-roam-ui-mode to the org-roam-mode hook. However, this causes errors when using the org-roam buffer. It will call org-roam-ui-mode every time you switch to the org-roam-buffer, echoing an error and causing the contents of the org-roam buffer to be erased.

I think the hook should be changed to after-init-hook instead.

Error on save: (void-function org-roam-ui)

Hi, thanks for the awesome package!

Whenever I'm saving an org roam file, I'm getting

Error (after-save-hook): Error running hook "org-roam-ui--on-save" because: (void-function org-roam-ui)

image

The graph itself is still updated

Installation warnings

In toplevel form:
org-roam-ui.el:236:1:Warning: Unused lexical variable ‘list-nil’
org-roam-ui.el:338:1:Warning: Unused lexical argument ‘padding’
org-roam-ui.el:338:1:Warning: Unused lexical argument ‘speed’

Just bringing them to your attention so you don't forget about them.

doom/use-package: Org-roam-ui-mode isn't launching with org-roam

Hi, according to the use-package config for org-roam-ui, it should automatically launch it when org-roam is launched as well

(use-package! websocket
    :after org-roam)

(use-package! org-roam-ui
    :hook (org-roam . org-roam-ui-mode))

However, I need to manually run org-roam-ui-mode every time I startup org-roam. Is this the expected behavior? I also asked Henrik (creator of doom-emacs) and he mentioned it should automatically open it, and that its an org-roam-ui issue

org-roam-ui-mode crashing when "Expand Node" is changed to "Never"

Tested on Firefox 90.0.2 and Chromium 92.0.4515.107. When I expand the "Behavior" menu and switch Expand Node to "Never", the web interface crashes. It switches to a blank white screen that says "Application error: a client-side exception has occurred (developer guidance)."
Nothing is printed on the httpd buffer when this happens, and the UI can still be accessed by using an incognito window. It's not storing any cookies and refreshing the browser cache doesn't seem to help. Restarting org-roam-ui-mode and restarting emacs have no effect either. Once I change that setting in a browser, that browser can no longer access the UI unless I use a private browsing feature.
Screenshot of error message + web console output in Chromium:
image

  • The error messages don't show up until I toggle that setting to "Never".
  • It toggles to "Double click" and "Right click" without crashing.
  • Tested the "Open in Emacs" keybinding and got the same behavior. It switches to right and double clicking, but crashes when I set it to "Never"

Feature Request: Link Metadata

Is Your Feature Request Related To A Problem? Please Describe.

With notes often having many branches to other notes in many different contexts, it can be difficult to relate data in a meaningful way, understand what relevance certain links may have had, or simply be lost in a glut of links.

Describe The Solution You'd Like

Some additional fields for link metadata. This could be useful if one wanted to expand the depth of a network, but filter for certain conceptual links across wider regions of the networks. In other words, this can be used to capture wider bodies of knowledge or research themes.

for example:
[[<link id>][<link title>][:tags <tag> :context <short description>]]

Describe Alternatives You've Considered

A link-note that contains all the information as a separate entity. This could be viewed as a pop-up by hovering over the link and provide additional context.

Additional Context

Links between notes are almost as important as the notes themselves. There should be some kind of additional features that reflect this.

Org-roam-ui seems frozen

First kudos to the devs for making possible this new package.

Today I installed it, and once I entered to http://127.0.0.1:35901/ I observed a frozen ball of nodes without any connections,

image

If I click or try to drag any of the nodes, they simply disappear

image

I can help to debug this problem if you give some instructions.

Best

SQL error on initial startup

I just installed this package (using doom emacs) and upon starting org-roam-ui-mode, I get the following error:

Error (websocket): in callback `on-open': EmacSQL had an unhandled condition: "near line 11: no such table: nodes"

Application error, since pulling latest changes

I have been using org-roam-ui for the past few days and the only issue I had was this one

I've been following the issue and saw it was recently fixed so I updated to get the new changes.

Now when I run org-roam-ui-mode instead of a gorgeous graph I get white screen with the error "Application error: a client-side exception has occurred (developer guidance)."
I'm not really sure how to debug this further so let me know if there are any steps I can take to help debug the issue.
(I use doom emacs if that is relevant)
Cheers

Failed to load resource

org-roam-ui: 6f555f6
doom-emacs: develop dd55ebb67a51c73939a606159f55fffbd38bed47

.doom.d/package.el

(package! websocket)
(package! org-roam-ui
  :recipe
  (:host github
   :repo "org-roam/org-roam-ui"
   :files ("*.el" "out")))
  • Issue
Failed to load resource: the server responded with a status of 404 (Not Found)
_buildManifest.js:1 Failed to load resource: the server responded with a status of 404 (Not Found)
_ssgManifest.js:1 Failed to load resource: the server responded with a status of 404 (Not Found)
workbox-ea903bce.js:12 Uncaught (in promise) bad-precaching-response: bad-precaching-response :: [{"url":"http://localhost:35901/_next/static/chunks/4.2dee5d830195ddd06029.js","status":404}]
    at M.B (http://localhost:35901/workbox-ea903bce.js:710:15)
    at async M.U (http://localhost:35901/workbox-ea903bce.js:699:60)
    at async M.v (http://localhost:35901/workbox-ea903bce.js:392:19)

Won't open the index page

I have installed the package, when I enable org-roam-ui-mode, and I navigate to http://127.0.0.1:35901, it shows:

Not Found
The requested URL was not found on this server.

Where should I check?

  • tried tweaking org-roam-ui-port - same results

Literature note labels show up wrong

In my graph, literature nodes created with org-roam-bibtex are labeled with placeholders for author or title in front of the note title, as shown on this screenshot.

image

I also notice that it incorrectly corrects all-uppercase words to lowercase (the title of the note is "C III] Emission in Star-forming Galaxies Near and Far").

[Documentation BUG]: straight install example code has empty hook

In README.md, there's the sample code:

(use-package org-roam-ui
  :straight
    (:host github :repo "org-roam/org-roam-ui" :branch "main" :files ("*.el" "out"))
    :after org-roam
    :hook
;;         normally we'd recommend hooking orui after org-roam, but since org-roam does not have
;;         a hookable mode anymore, you're advised to pick something yourself
;;         if you don't care about startup time, use
;;  :hook (after-init . org-roam-ui-mode)
    :config
    (setq org-roam-ui-sync-theme t
          org-roam-ui-follow t
          org-roam-ui-update-on-save t
          org-roam-ui-open-on-start t))

but this code doesn't work unless the top :hook directive is also commented out. With it in, there's an error message starting like so:

signal(error ("use-package: :hook wants a non-empty list"))

Service worker 404

Request this js file

http://localhost:35901/_next/static/chunks/4.2dee5d830195ddd06029.js

But no such file in out directory but have 4.c9fdfbcb8f8ce1720633.js

Allow excluding dailies from graph

**Have you checked whether this feature is not already on the project board?

Yes

Describe the solution you'd like
I'd like a toggle to filter dailies out of the graph. Typically, nodes being linked by dailies doesn't represent a meaningful connection, so these links are usually undesirable.

Describe alternatives you've considered
I've considered tagging dailies with daily and filtering that, but this seems like some unnecessary duplication. It'd be cleaner to determine whether a note is a daily depending on the location of the file (i.e. is the file inside the org-roam-dailies-directory?).

[BUG] Emacs 26 support: eq: Symbol’s function definition is void: seq-first

Describe the bug
Installed org-roam-ui using the manual instructions with fresh source code pulled at time of bug submission.
When running M-x: org-roam-ui-mode, I get the message:

eq: Symbol’s function definition is void: seq-first

This is due to the fact that seq-first is introduced since Emacs 27. Since org-roam is supporting Emacs 26 as well, I feel that org-roam-ui should also.

To Reproduce
Steps to reproduce the behavior:

  1. Use an Emacs 26 installation
  2. Install the org-roam-ui package using manual instructions (but this should not matter)
  3. execute org-roam-ui-mode
  4. See error

Expected behavior
The org-roam-ui server should start.

Additional context
I supplied the seq-first function in my init.el for now, and that fixes it.
It seems to be the only Emacs 27/26 compatibility problem (so far).

Doom installation isn't working with `(package!)`

Hi, I'm getting the following error with doom

Installing plugins
  x There was an unexpected error
    Message: Wrong type argument
    Data: (wrong-type-argument . sequencep)
    Backtrace:
      (replace-regexp-in-string "^.+/" "" org-roam/org-roam-ui)
      (if host (replace-regexp-in-string "^.+/" "" repo) (let ((regexp "^.*/\\(.
      (let* ((--cl-rest-- recipe) (repo (car (cdr (plist-member --cl-rest-- ':re
      (straight-vc-git-local-repo-name (:host github :repo org-roam/org-roam-ui
      (apply straight-vc-git-local-repo-name (:host github :repo org-roam/org-ro
      (let ((func (intern (format "straight-vc-%S-%S" type method)))) (if (fboun
      (straight-vc local-repo-name git (:host github :repo org-roam/org-roam-ui
      (let* ((--cl-rest-- recipe) (type (car (cdr (plist-member --cl-rest-- ':ty
      (straight-vc-local-repo-name (:host github :repo org-roam/org-roam-ui :fil
      (or (straight-vc-local-repo-name plist) package)
  ! Extended backtrace logged to .emacs.d/.local/doom.error.log

org-roam-ui-sync-theme not working as expected

org-roam-ui-sync-theme not syncing with doom-themes. When I toggle the theme in doom orui creates a new tab in my browser, which freezes my doom emacs, and still, orui theme remains unchanged.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.