org-roam / org-roam-server Goto Github PK
View Code? Open in Web Editor NEWA Web Application to Visualize the Org-Roam Database
License: MIT License
A Web Application to Visualize the Org-Roam Database
License: MIT License
Hi, I am relatively new to org-roam
world, and I've been using it just few days. But I started to notice weird performance issues occurring when executing unrelated interactive commands and I think this issue is related to org-roam-server
.
org-roam-server-mode
on org-roam-directory
with ~200 filesorg-roam-find-file
in emacs and org-roam-protocol
click in org-roam-server
browser windowjk
scroll for couple of seconds (basically DoSing emacs)Now you can see that aside from expected redisplay_internal
, there is httpd--filter
taking most of the CPU time.
...
+ httpd--filter 474 55%
+ redisplay_internal (C function) 233 27%
...
When I do something more natural in emacs, like searching for something in M-x
and switching between few buffers, it is a server-process-filter
which takes most of the CPU time.
Emacs should not feel sluggish when doing things unrelated to org-roam
.
emacs 27.0.91, Arch Linux, vanilla doom emacs with org-roam
and org-roam-server
from github. Everything latest and up-to-date.
Example:
dir_a/1_org-roam.db
dir_a1/2_org-roam.db
dir_a2/3_org-roam.db
dir_b/4_org-roam.db
dir_b1/5_org-roam.db
dir_b2/6_org-roam.db
Can I have such 6 different org-roam.db files, each for its own subdirectory .org files?
I am asking because org-brain has such a similar feature, called org-brain-switch-brain, where you can switch to another directory. Wondering if org-roam has a similar feature. Then both could work always in parallel. Separate org-brain, and its parallel friend org-roam. For those cases where you do not want to mix up things.
Hello,
The server will automatic bind to 127.0.0.1:8080. Do you think it would be to much work to make the port configurable?
Thanks a lot :-)
In file-viewer tab, in roam-buffer pane on the right, clicking on backlink results in "Not Found" error in preview pane on the left because the link ids are consistently getting prefixed with slash:
<a name="backlink" id="/20200619173004-something.org" href="javascript:void(0)">Something</a>
Toplevel file links inside <h3>
tag don't have leading slash and are working correctly, opening file to the left file preview pane.
This is an issue with server elisp code but it wasn't immediately obvious to me what exactly is causing it.
This might be interesting to get brief overviews of connected nodes on the main view: "once a node is clicked all nodes are greyed out except for first and second order connected nodes"
https://visjs.github.io/vis-network/examples/network/exampleApplications/neighbourhoodHighlight.html
It would be cool if the server could read local variables, like org-roam does, by being launched in the browser from emacs or set a custom org-roam directory from the browser, if one has more than one org-roam-directory, for instance defined in .dir-locals.el
.
Yours is a wonderful addition to the nascent and expanding org-roam ecosystem. Thanks.
What I expected:
Starting org-roam-server-mode
in Emacs then navigating to localhost:8080 displays the org-roam-server graph.
What actually happened:
I started org-roam-server-mode
in Emacs and receive the following error:
EmacSQL had an unhandled condition: "near line 891: no such column: title"
💥
Details:
Emacs: 27.0.91
Configuration: DooM
OS: Darwin/macOS
Emacsql-version: 3.0.0
emacsql-sqlite3-executable: /usr/bin/sqlite3
org-roam
is working correctly in the same configuration.
The web application launches on localhost:8080, but does not display any org-roam contents.
My org-roam files are synced to Dropbox and all org-roam configuration points to the Dropbox folder containing them.
Troubleshooting steps:
What I want to achieve:
org-roam-server should load corresponding window / frame
What I have:
Windows10
Issue:
Thank you in advance for your insight and support and greetings,
Jochen
8080 is a fairly common local-use HTTP port and it would be good to make this configurable to avoid conflicts with other applications or other users.
The filter (at the bottom left of the server on 127.0.0.1:8080) in the "Database network view" supposedly takes input. When I type in the filter, it says "No Results Found", even though the tags exist in the roam files.
Expected behavior - it should display nodes with that tag.
Current implementation of filtering is a whitelist of tags. But there are times when I would like a blacklist of tags instead. These hides a set of tags instead of only showing a set of tags.
For now I am modifying index.html
as follows when I want a blacklist.
replace
var view = new vis.DataView(nodeDataset, {
filter: function (item) {
if (filters.size > 0) {
if (item.tags) {
tags = new Set(item.tags);
for (let filter of filters.values()) {
var parsed_filter = JSON.parse(filter);
if (parsed_filter.parent === "tags"){
if (!tags.has(parsed_filter.id)) {
return false;
}
}
}
} else {
return false;
}
}
return true;
}
});
with
var view = new vis.DataView(nodeDataset, {
filter: function (item) {
if (filters.size > 0) {
if (item.tags) {
tags = new Set(item.tags);
for (let filter of filters.values()) {
var parsed_filter = JSON.parse(filter);
if (parsed_filter.parent === "tags"){
if (tags.has(parsed_filter.id)) {
return false;
}
}
}
} else {
return true;
}
}
return true;
}
});
replacing !tags.has(parsed_filter.id)
with tags.has(parsed_filter.id)
and return false;
with return true;
we can also extend bufferview(buffer network) with dropdownfilters and extra logic like globalview(database network).
ROAM_TAGS is here to stay, Therefore I think building on it in org-roam-server is sustainable.
Hi! If you have intentions of keeping this maintained (I see you made a PR to melpa), do consider moving it into the org-roam team: https://github.com/org-roam
First of all, thanks for the great package! I really like the possibility to get an overview and also the new dark mode is a valuable addition.
Sadly, readibility due to low contrast for congested areas on my screen (1080p) in dark mode is often low, especially when zoomed out.
Here is a comparison between both light and dark mode for roughly the same area:
May I suggest a lighter grey or plain white for easier readibility?
Great work and huge thanks!!!
Looking forward to a feature that enables us to filter our notes on graph!
Or are there some tricks that could work around for now?
It would be awesome to have an input on the database view to filter the nodes by title (or some other attribute) and get all nodes connected to the input match.
Is it possible to make a interface for custom css? So that we could achieve the following, when browsing files in file viewer. For now, we could merely scan through a file but not able to see multiple files all at once.
I'm really enjoying using this code in my org-roam setup.
I'm working on a website, and I debug changes to the website on a localhost web server running on port 8080. It would be nice if I could change the HTTP port for the org-roam-server to something other than 8080 so I can use both at the same time.
Is there a way to do this?
Thanks!
It seems, so, cool idea.
org protocol was creating buffers pointing to %2path%2Fto%2Ffile.org. I added (setq file (org-link-decode file))
to org-roam-protocol-open-file
to solve this issue.
Enabling Preview and mousing over a node yields the following:
500 Internal Error
Internal error when handling this request.
error: (error CC Mode is incompatible with this version of Emacs - support for the ‘syntax-table’ text property is required.)
I'm using Emacs 26.3 on NixOS. It looks like a problem with my Emacs but this is the only place I've seen it. I'm also surprised that CC Mode is even relevant here.
If you set this parameter, the links are not shown.
org-roam-server-network-arrows t
It worked a few commits ago.
My tag files tend to have the same number of lines since it's mainly just template + linking other files through - tags ::
. You can use the number of lines to differentiate notes from tags.
I was thinking tags should be grayish, whereas notes should be more saturated. Maybe even extend it further by making the color saturation a spectrum so you can differentiate between small notes and large notes.
when I include a file using#+INCLUDE
,there is an error error: (error Cannot include file ~/.emacs.d/elpa/org-roam-server-20200608.1547/
,I don't konw how to solve it.
New notes are not registered for preview because initialization of servlets are done while the mode is initializing.
A hook should be added to find file to initialize new servlets.
Hello,Thanks for this awesome project.
But,I encountered a problem when I using org-roam, that is, the picture will not be exported. I am very puzzled. I checked for a long time, until I closed the org-roam-server-mode, everything works well again, I guess there may be some problems.
Can anyone help me?
Hi,
When I add an HTML attribute to an inline image, it gets added to the surrounding <p></p>
element: for example:<p width="400px"><image ..... /></p>
However, if format my image link in a way that breaks the regexp that filters for the image path and manually export my org file to HTML, then the width attribute gets applied properly: to the <image/>
element itself. This however breaks the image preview in org-roam-server
My elisp is pretty poor so I couldn't understand how to fix this but overall, we just need make sure that the enclosing paragraph element doesn't get inserted
I'd like to categorize my nodes and have org-roam-server
's database display reflect that categorization with the colors of the nodes. The problem is that I can't tell what currently governs the color.
A note about that in the README would be much appreciated, even if it's just a reference to a dependency. Thank you!
When "File viewer" is pressed, 2 rectangles appear and in the top-left a combobox appears, but without any options. Near it, top-left from the left rectangle, a blue "Back" appears.
I'm in Debian 10 with i3, and tested with Firefox 68.8.0esr and Google Chrome 81.0.4044.138 (Build oficial), with the same result.
How can I help to debug this issue? Any more info, or some specific test?
I'm not very knowledgeable on code or development, but can follow instructions. :)
Thanks a lot...
After updating org-roam
to version 1.1.1, I get the following error on /roam-data
:
`(file-error Opening input file File name too long /home/matt/roam/{"nodes":[{"id":"20200529150127-lisp","label":"Lisp","url":"org-protocol:/roam-file?file=%2Fhome%2Fmatt%2Flog%2FOrg%2Froam%2F20200529150127-lisp.org","path":"/home/matt/roam/20200529150127-lisp.org","group":4}…`
It then proceeds to list out all my roam nodes.
The graph is absolutely great for visualising note relationships and weekly reviews.
If I want to export a topical Buffer Network (or even a full database network), it would be great to be able to share a "static local" copy of the graph + notes that can then be added to for example, an online blog, or a quick set of notes with friends.
Usecase - example: you study for a course, and have your notes, but also want to share this with others in the class. Example: you create a course and want to give people a layout view of the topics, from which they can drill down.
Thanks for all the hard work. It will be nice to have an option to display forward links and backward links as separate edges connecting files. It makes it easier to figure out which file is the linking originating from.
Here the connection from browser (firefox) to emacs does not work, what can be the reason?
Ubuntu 18.04, emacs 26.3, org-mode 9.3.6, firefox 76.0.1
org-roam-server-colormode or some such to avoid clicking dark mode at the beginning of each session. Given a dark emacs theme and viewing the server on an EAF browser window
https://github.com/manateelazycat/emacs-application-framework
the background is dark as is the text but otherwise works great.
Just installed org-roam-server for the first time, the webpage loads but there's no content. All the drop-down menus are blank and no graph is displayed. In the console I see a 500 error being received on the roam-data API call. Delving into the httpd emacs messages, I found the error emacsql-error "near line 13: no such column: files.file"
printed every time the page tried to query roam data.
I would love to be able to point my ipad to my computer and access the server, unfourtunately I can only access it at localhost:8080
but not at 192.xxx.x.xxx:8080
.
We're about to push a significant change to the db upstream with org-roam/org-roam/pull/783, more specifically renaming the link-types.
You might want to pin Org-roam until you've addressed it.
Hello,
For some reason when I enable the preview of OR notes I get the following error:
"error: (wrong-type-argument stringp nil)"
Any idea how I can go about debugging this issue?
Thank you!
Hi,
I come up with an issue with org-babel. When I try to preview an org file with SRC area inside, emacs ask me to evaluate the code. whether I choose evaluate or not, it won't show the preview in the browser.
condition:
Thank you!
P.S: Is the browser you are using in the README an emacs-embedded one?
org-roam/org-roam/pull/908 has changed the way we treat titles
: rather than storing all the possible titles for a file in a list, we isolate each of those in a different cell.
This might cause problem for Org-roam-server, as it did upstream, cf. org-roam/org-roam/issues/912.
The tag of org roam dont show up in title, so we could not find out files by tag in org roam server right now.
Aside, filters on tag system can do quite a lot as we could make up our own structure by tags.
As it is, any local process (including web browsers), whether owned by the org-roam-server user or not, can access all of the org-roam data. This poses a fairly significant security risk, especially on multiuser systems. HTTP authentication would (hopefully? I don't know how to do this in elisp) be fairly trivial to implement and could help out here.
Hey! Thanks for putting this project together.
Im trying to get this going and am running into some errors:
Im using doom emacs and this is the related config I have going:
;; .doom.d/config.el
(setq org-roam-directory "~/Desktop/03-resources/org-roam")
(after! org-roam
(setq org-roam-graph-viewer "/usr/bin/open")
(setq org-roam-ref-capture-templates
'(("r" "ref" plain (function org-roam-capture--get-point)
"%?"
:file-name "websites/${slug}"
:head "#+TITLE: ${title}
#+ROAM_KEY: ${ref}
- source :: ${ref}"
:unnarrowed t)))
(setq org-roam-capture-templates
'(("d" "default" plain (function org-roam--capture-get-point)
"%?"
:file-name "${slug}"
:head "#+TITLE: ${title}\n"
:unnarrowed t))))
(require 'simple-httpd)
(setq httpd-root "/var/www")
(httpd-start)
(use-package org-roam-server
:ensure nil
:load-path "~/Desktop/01-projects/org-roam-server/")
;; .doom.d/init.el
(org +roam)
Do you have any suggestions on how to debug this?
org-roam-server version: 20200624.1658
I have set
(use-package org-roam-server
:ensure t
:config
(setq org-roam-server-host "127.0.0.1"
org-roam-server-port 18080
;; ...
but the server still listening 127.0.0.1:8080
。
Thanks for your project, it's really awesome !
I would like to have the same behavior as the gif in your readme : when I click on a node I would like to open it in another buffer, not in the current one (the EAF browser buffer).
It's not the case from scratch, so have you done some modifications in your EAF config to make it possible ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.