Coder Social home page Coder Social logo

org-roam / org-roam Goto Github PK

View Code? Open in Web Editor NEW
5.4K 5.4K 464.0 40.93 MB

Rudimentary Roam replica with Org-mode

Home Page: https://www.orgroam.com

License: GNU General Public License v3.0

Emacs Lisp 98.49% Makefile 1.37% Shell 0.14%
hacktoberfest memex org-mode pkm roam zettelkasten

org-roam's Introduction

Org-roam GitHub Release MELPA License GPL 3

Org-roam Logo

Org-roam is a plain-text knowledge management system. It brings some of Roam's more powerful features into the Org-mode ecosystem.

Org-roam borrows principles from the Zettelkasten method, providing a solution for non-hierarchical note-taking. It should also work as a plug-and-play solution for anyone already using Org-mode for their personal wiki.

  • Private and Secure: Edit your personal wiki completely offline, entirely in your control. Encrypt your notes with GPG. Take lasting notes in plain-text.
  • Networked Thought: Connect notes and thoughts together with ease using backlinks. Discover surprising and previously unseen connections in your notes with the built-in graph visualization.
  • Extensible and Powerful: Leverage Emacs' fantastic text-editing interface, and the mature Emacs and Org-mode ecosystem of packages.
  • Free and Open Source: Org-roam is licensed under the GNU General Public License version 3 or later.

Org-roam Screenshot

Installation

Down below you will find basic installation instructions for how to quickly install org-roam using various environments for various purposes. For more detailed information, please read the manual.

Using package.el

Toggle instructions

You can install org-roam from MELPA or MELPA Stable using package.el:

M-x package-install RET org-roam RET

Using straight.el

Toggle instructions

Installation from MELPA or MELPA Stable using straight.el:

(straight-use-package 'org-roam)

Or with use-package:

(use-package org-roam
  :straight t
  ...)

If you need to install the package directly from the source repository, instead of from MELPA, the next sample shows how to do so:

(use-package org-roam
  :straight (:host github :repo "org-roam/org-roam"
             :files (:defaults "extensions/*"))
  ...)

If you plan to use your own local fork for the development and contribution, the next sample will get you there:

(use-package org-roam
  :straight (:local-repo "/path/to/org-roam-fork"
             :files (:defaults "extensions/*")
             :build (:not compile))
  ...)

Using Doom Emacs

Toggle instructions

Doom's :lang org module comes with support for org-roam, but it's not enabled by default. To activate it pass +roam2 flag to org module in your $DOOMDIR/init.el (e.g. (org +roam2)), save the file and run doom sync -u in your shell.

To provide better stability, Doom pins the package to a specific commit. If you need to unpin it (not recommended doing that, request Doom to bump the package instead) use the next in your packages.el:

(unpin! org-roam)

If for some reasons you want to use a different recipe for org-roam, you can use the next form in your packages.el to install the package from a recipe repository (e.g. MELPA):

(package! org-roam)

You can pass :pin "commit hash" to pin the package to a specific commit.

With the next sample you can install the package directly from the source repository:

(package! org-roam
  :recipe (:host github :repo "org-roam/org-roam"
           :files (:defaults "extensions/*")))

And if you plan to use your own local fork for the development or contribution, the next sample will get you there:

(package! org-roam
  :recipe (:local-repo "/path/to/org-roam-fork"
           :files (:defaults "extensions/*")
           :build (:not compile)))

Without a package manager

Toggle instructions

To install the package without using a package manager you have the next two options:

  1. Install the package by cloning it with git from the source repository.
  2. Or install the package by downloading the latest release version.

In both of the cases you will need to ensure that you have all the required dependencies. These include:

  • dash
  • f
  • s
  • org (9.4 is the minimal required version!)
  • emacsql
  • emacsql-sqlite
  • magit-section
  • filenotify-recursive

After installing the package, you will need to properly setup load-path to the package:

(add-to-list 'load-path "/path/to/org-roam/")
(add-to-list 'load-path "/path/to-org-roam/extensions/")

After which you should be able to resolve (require 'org-roam) call without any problems.

Org-roam also comes with .texi files to integrate with Emacs' built-in Info system. Read the manual to find more details for how to install them manually.

Configuration

Here's a very basic sample for configuration of org-roam using use-package:

(use-package org-roam
  :ensure t
  :custom
  (org-roam-directory (file-truename "/path/to/org-files/"))
  :bind (("C-c n l" . org-roam-buffer-toggle)
         ("C-c n f" . org-roam-node-find)
         ("C-c n g" . org-roam-graph)
         ("C-c n i" . org-roam-node-insert)
         ("C-c n c" . org-roam-capture)
         ;; Dailies
         ("C-c n j" . org-roam-dailies-capture-today))
  :config
  ;; If you're using a vertical completion framework, you might want a more informative completion interface
  (setq org-roam-node-display-template (concat "${title:*} " (propertize "${tags:10}" 'face 'org-tag)))
  (org-roam-db-autosync-mode)
  ;; If using org-roam-protocol
  (require 'org-roam-protocol))

Note that the file-truename function is only necessary when you use symbolic link to org-roam-directory. Org-roam won't automatically resolve symbolic link to the directory.

Getting Started

David Wilson of System Crafters has produced an introductory video that covers the basic commands:

Getting Started with Org Roam - Build a Second Brain in Emacs

Getting Help

Before creating a new topic/issue, please be mindful of our time and ensure that it has not already been addressed on GitHub or on Discourse.

  • If you are new to Emacs and have problem setting up Org-roam, please ask your question on Slack, channel #how-do-i.
  • For quick questions, please ask them on Slack, channel #troubleshooting.
  • If something is not working as it should, or if you would like to suggest a new feature, please create a new issue.
  • If you have questions about your workflow with the slip-box method, please find a relevant topic on Discourse, or create a new one.

Knowledge Bases using Org-roam

Contributing

To report bugs and suggest new feature use the issue tracker. If you have some code which you would like to be merged, then open a pull request. Please also see CONTRIBUTING.md.

License

Copyright © Jethro Kuan and contributors. Distributed under the GNU General Public License, Version 3.

org-roam's People

Contributors

bdarcus avatar celeritascelery avatar d12frosted avatar daniel-koudouna avatar dit7ya avatar herbertjones avatar hugo-heagren avatar jdormit avatar jeremyf avatar jethrokuan avatar juergenhoetzel avatar kisaragi-hiu avatar kljohann avatar konubinix avatar l3kn avatar langston-barrett avatar minad avatar myshevchuk avatar natask avatar nobiot avatar pcrama avatar progfolio avatar qzdl avatar rasendubi avatar rodrigomorales1 avatar timquelch avatar wannli avatar wetlize avatar whil- avatar zaeph 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  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

org-roam's Issues

Enter new Zettel name only once with org-roam-insert

A feature request really for anyone who can more quickly think how to do this...

When I invoke org-roam-insert and type a new name for a Zettel that doesn't yet exist, it drops me to a prompt to enter the File ID (org-roam--insert-title). Feature request for it to take whatever name I've just entered, a file that doesn't yet exist, and create that file with that name.

(Similar to how Deft functions with deft-new-file.)

Cant get started: org-roam-directory doesn't work

custom.el:-

'(org-roam-directory "~/.emacs.d/orgfiles/roam-files/")

Screenshot from 2020-02-09 21-34-12

Have no idea what's happening here.

(expand-file-name org-roam-directory)
Shows the proper directory.

(.emacs.d is in fact a symlink to ~/Dropbox/homefiles/DotFiles/.emacs.d but that shouldnt matter)

Feature: Finding unlinked references

For the currently open org-roam file, we can grep other files for the current file's title, to find any matches. Display any matches below the backlinks. One-click to replace the match with a file link to the current file.

Remove dependency on f

Right now only 1 function is used from f, should be relatively easy to replicate that functionality here. #39

Spacemacs install (hack solution)

Today I got this installed as a Spacemacs layer and thought I'd quickly share what I found, since it was not trivial. Most of the mess and time I took were because quelpa didn't like polyfill. I've never made my own package for distribution so maybe there is a quick fix without this hack:

git clone <org-roam.git url> /path/to/layer/local/org-roam.git

In org-roam-polyfill.el:

Prepend:

;;; org-roam-polyfill.el --- Roam Research replica with Org-mode

;;; Commentary:
;;

;;; Code:

Append:

;;; org-roam-polyfill.el ends here

Then, in /path/to/layer/packages.el

(defconst my-packages
  '(
;; Must load polyfill manually or the require within org-roam.el doesn't work
    (org-roam-polyfill :location
              (recipe :fetcher file :path "/path/to/layer/local/org-roam.git/org-roam-polyfill.el")
              :update nil)
    (org-roam :location
              (recipe :fetcher local)
              :update nil)
    )


;; Do this to get org-roam-polyfill to load, otherwise its discarded
(defun my/init-org-roam-polyfill () '())

(defun my/init-org-roam ()
  (use-package org-roam
    :after org
    :hook (org-mode . org-roam-mode)
    :custom
    (org-roam-directory org-directory)
    :init
    (progn
      (spacemacs/declare-prefix-for-mode 'org-mode "mr" "org-roam")
      (spacemacs/set-leader-keys-for-major-mode 'org-mode
        "rl" 'org-roam
        "rt" 'org-roam-today
        "rf" 'org-roam-find-file
        "ri" 'org-roam-insert
        "rg" 'org-roam-show-graph)
      )))

Couple of questions

This is awesome. Thank you. A couple of questions:

  • Do you keep your TODO out of your org-roam folder? If not, how do you handle them? Isn't org-mode slow to parse the TODOs from all of the files?
  • Do you keep all of your notes in one org-roam folder? Or do you imagine having multiple org-roams?

Many thanks!

When using description lists, only description is shown in backlink

I got inspiration from your demo gifs and used the following:

#+TITLE: Programming Language Pragmatics

- tags :: [[book]] [[Programming Language]]

However, on the book page, backlinks show only:

** [[Programming Language Pragmatics]]
[[book]] [[Programming Language]]

i.e. tags :: is missing.

I believe this has something to do with the org-element-at-point returning description when invoked on the book link (not the full list item).

org-roam buffer aesthetic improvements

Here are a few proposals for making the org-roam buffer more aesthetically pleasing and de-cluttered. These are my personal preferences, and of course can differ for others.

  1. No need to have the first line backlinks for...
  2. .org extensions can be suppressed in the backlink file titles.
  3. BEGIN_SRC etc. can be suppressed.
  4. The file links display in an ugly markup format, ideally it should look exactly like in the original file it has been linked from. (As we are not directly editing this buffer, maybe this can be in some other format such as HTML? I am very unsure about this though.)

org-roam--maybe-update-buffer slow for files outside of org-roam-directory

At least, I think that's what's going on:

- org-roam--maybe-update-buffer                                  1491  92%
 - org-roam--find-all-files                                      1460  90%
  - org-roam--find-files                                         1460  90%
   - org-roam--find-files                                        1235  76%
    - org-roam--find-files                                        548  33%
     - org-roam--find-files                                       438  27%
      - org-roam--find-files                                      178  11%
       - org-roam--find-files                                      31   1%
          org-roam--find-files                                      2   0%
        + file-exists-p                                             1   0%
       + file-readable-p                                            2   0%
         file-name-extension                                        2   0%
       + directory-files                                            1   0%
      + directory-files                                             5   0%
        file-name-extension                                         1   0%
     + directory-files                                              4   0%
     + file-readable-p                                              1   0%
     + file-name-extension                                          1   0%
    + file-truename                                               451  27%
    + directory-files                                               9   0%
      file-name-extension                                           3   0%
    + file-readable-p                                               1   0%
   + file-truename                                                159   9%
   + directory-files                                                7   0%
   + file-name-extension                                            1   0%

That's the profile I get when trying to move the point around my emacs config.org, which is not in my org-roam-directory. I haven't looked into the code much, but it looks like org-roam expects org-roam-current-file-id to get set and if it can't find one, it keeps looking, after every command.

Add test cases for all functions

Functions

  • org-roam--build-cache-async
  • org-roam-insert
  • cache updates on:
    • file creation
    • link addition
    • link removal

Scenarios

  • flat structure
  • nested structure

How to handle file attachments?

I occasionally will want to attach a PDF or some other related file (heck, even a video game save file) to a roam file - is there a way to make sure org-roam handles the file / copies it to somewhere safe, or should I do this myself and link to the file from wherever I want it to be?

make it recursive?

Hi, first thanks for making this! It's a great idea and could solve lots of problems. I have come across one issue and I think this is crucial as a lot of users may end up cross referencing their notes along with task items. If you nest files in directories, it breaks the backlinks and org-roam fails to find entries. You can add multiple directories to org-roam-directories and it'll work, but the hyperlinks in the org-roam buffer are broken and point to invalid file paths.

Support configuration for file-name aliases

For example: World-War-Two.org and WWII.org should link to the same file. Is it possible to define the aliases somewhere so that org-roam does not create duplicate files unnecessarily?

Suggestion: automatic collection of tags

I add #+FILETAGS: lines at the beginning of my notes (just after the title), and I wanted a quick way to list all the tags I use and easily access them. I've written these two functions to do this. They depend on dash and deft (I can remove the dependency of dash, but deft is very useful to do the tag search). I'm putting it here in case you find it useful. (And sorry for my bad elisp, I'm not very proficient in that language.)

(defun as/open-in-deft (filter)
  (deft)
  (deft-filter filter t))

(defun as/collect-filetags ()
  (interactive)
  (let* ((command (concat "grep -h '^#+FILETAGS:' " org-roam-directory "/*.org"))
         (output (shell-command-to-string command))
         (lines (split-string output "[ \n]+" t "#\\+FILETAGS:"))
         (tags (sort (-flatten (mapcar (lambda (l) (split-string l ":" t)) lines)) #'string<))
         (counts (-reduce-from (lambda (plist tag)
                                 (if (string-match "^##" tag)
                                     plist
                                   (let* ((tagname (substring tag 1))
                                          (nb (lax-plist-get plist tagname)))
                                     (lax-plist-put plist tagname (if nb (+ nb 1) 1)))))
                               nil tags)))
    (let ((file (concat org-roam-directory "/taglist.org")))
    (write-region "#+TITLE: Tag List\n\n" nil file nil)
    (while counts
      (let ((tag (car counts))
            (nb  (cadr counts)))
        (write-region
         ;; The next line is a dirty hack to avoid the tag being explicitely in
         ;; the tag list, hence in deft search results
         (format "- [[elisp:(as/open-in-deft (concat \"#\" \"%s\"))][%s]] :: %d\n" tag tag nb)
         nil file t)
        (setq counts (cddr counts)))))))

Feature request: allow timestamps as file names

I have a simple implementation of a zettelkasten using deft and org files, which seems to be the basis behing org-roam. I let deft use timestamps as file names as it makes for stable links, and I can easily edit the title of a note without breaking links. It seems that you use the title itself as file name. Could it be adapted?

`org-roam-insert` mistakes temp files ended with "~"

Hi Jethro,

org-roam-insert is a really nice enhancement of org-insert-link and I enjoy using it very much to create new forward links. However, it seems to return both a-fictional-file.org and a-fictional-file.org~ as potential links, which is quite confusing.

Better hook for `org-roam-update-buffer`

Currently, a post-command-hook is used to update the buffer when another file is selected.

None of the standard hooks seems to run each time a buffer is opened or comes into focus.

The best solution I've found so far is adding an advice after the select-window function,
which works for all ways of selecting / opening an org file I've tested.

Maybe there is another hook / function that would be even better?

org-roam-show-graph

How to make the graph.svg file open in emacs and not one's default browser?

Document customization options

  • org-roam-directory
  • org-roam-position
  • org-roam-file-format
  • org-roam-link-title-format
  • org-roam-use-timestamp-as-filename
  • org-roam-autopopulate-title
  • org-roam-buffer
  • org-roam-graph-viewer
  • org-roam-graphviz-executable

Require org-roam fails with cannot find 'f file

When I try to load org-roam I get the following error

Debugger entered--Lisp error: (file-missing "Cannot open load file" "No such file or directory" "f")
require(f)
eval-buffer(#<buffer load> nil "/home/ANT.AMAZON.COM/renukr/.emacs.d/lisp/org-roam/org-roam.el" nil t) ; Reading at buffer position 229
load-with-code-conversion("/home/ANT.AMAZON.COM/renukr/.emacs.d/lisp/org-roam/org-roam.el" "/home/ANT.AMAZON.COM/renukr/.emacs.d/lisp/org-roam/org-roam.el" nil t)
require(org-roam)
eval((require (quote org-roam)) nil)
elisp--eval-last-sexp(nil)
eval-last-sexp(nil)
funcall-interactively(eval-last-sexp nil)
call-interactively(eval-last-sexp nil nil)
command-execute(eval-last-sexp)

https://github.com/jethrokuan/org-roam/blob/32865d3d0cc5c647904211fb59f121580fc6e68a/org-roam.el#L12

RFC: Removing the ID workflow

I'm finding that manually keeping IDs unique is becoming much more of a hassle than it is worth.

I'm going to cut a 0.1.0 release soon, which will support both titles and IDs. After 0.1.0, I'm planning to move forward with:

  1. Removing IDs -- files will be created with timestamped names
  2. The #+TITLE: of the Org file will be used in place of IDs, everywhere. Where the values must be unique, the file name is used instead, but this is generally invisible to the user.

This will greatly simplify the code-base, and allow me to push for more features.

Edit: When I say removing the ID workflow, I meant removing the choice between looking at IDs, and looking at titles with org-roam-insert, and org-roam-find-file. This mainly affects people who don't bother to add a #+TITLE to their org files. But now, org-roam also does that for you.

Org-roam fails to find backlinks when both files reside in nested folder

Hey man, i've been testing and loving the progress you are making on this. I did come across this issue which i've actually seen since early on. So if a backlink is inserted for 2 files that reside in nested folder, org-roam fails to find the backlink and displays a blank window. It requires at least one of the files to be in the parent folder. I've tried rebuilding the cache a few times with no change.

(seq org-roam-directory "~/root/")

Folder structure:

./root/
./test.org #backlink: beta.org (works)
../nestedfolder1/
.../alpha.org #backlink: beta.org (fails)
.../beta.org
  • test.org will display the backlink correctly
  • alpha.org will display a blank org-roam buffer window

Huge latency at start of Org-roam

I happen to see huge latency at every start of org-roam, or each buffer change to an org buffer.

Here are enclosed the profiler reports for Memory and CPU respectively :

Memory :

  • timer-event-handler 279,189,753 93%
  • apply 279,189,753 93%
  • org-roam--build-cache-async 279,189,753 93%
  • setq 279,007,713 93%
    - org-roam--find-all-files 279,007,713 93%
    • org-roam--find-files 279,007,713 93%
    • if 279,007,713 93%
    • let 279,007,673 93%
    • let 278,989,999 93%
      - while 278,989,999 93%
      • cond 278,989,999 93%
      • if 278,962,833 93%
      • progn 278,960,761 93%
      • setq 278,960,761 93%
        - append 278,960,761 93%
        • org-roam--find-files 278,960,761 93%
        • if 278,960,761 93%
        • let 278,954,981 93%
        • let 278,870,845 93%
          - while 278,870,845 93%
          • cond 278,870,845 93%
          • if 278,870,845 93%
          • progn 278,870,845 93%
          • setq 278,870,845 93%
            - append 278,870,845 93%
            • org-roam--find-files 278,870,845 93%
            • if 277,773,573 93%
            • let 252,883,214 84%
            • let 190,833,546 64%
              - while 190,833,546 64%
              • cond 178,830,067 60%
              • and 86,725,554 29%
              • string= 36,549,233 12%
              • file-name-extension 33,409,421 11%
                file-name-sans-versions 6,246 0%
                file-name-nondirectory 6,246 0%
                vector 4,164 0%
                make-byte-code 2,082 0%
                #<compiled 0x1b553f5> 2,082 0%
                not 2,072 0%
      • and 18,406 0%
  • async-start 182,040 0%
  • command-execute 18,483,416 6%
  • linum-update-current 27,880 0%
  • ... 8,188 0%
  • redisplay_internal (C function) 2,096 0%
  • polymode-post-command-select-buffer 1,056 0%
    async-when-done 912 0%
  • flycheck-display-error-at-point-soon 160 0%

and CPU :

  • ... 4686 90%
  • while 4176 80%
  • cond 4176 80%
  • if 4176 80%
    - progn 4176 80%
    • setq 4176 80%
    • append 4176 80%
    • org-roam--find-files 4176 80%
    • if 4176 80%
      - let 4176 80%
      • let 4176 80%
      • while 4176 80%
      • cond 4176 80%
      • if 4176 80%
        - progn 4176 80%
        • setq 4176 80%
        • append 4176 80%
        • org-roam--find-files 4172 80%
        • if 4172 80%
          - let 4024 77%
          • let 2472 47%
          • while 2472 47%
          • cond 2436 47%
          • and 1124 21%
            - string= 404 7%
            • file-name-extension 380 7%
              file-name-sans-versions 100 1%
              #<compiled 0x1af2921> 4 0%
          • if 28 0%
            setq 12 0%
            Automatic GC 510 9%
  • command-execute 459 8%
  • timer-event-handler 24 0%
  • linum-update-current 8 0%

Thanks !

Adding support for encryption

It would be useful to have support for encrypting individual notes using via GnuPG. These files have a org.gpg extension which are not picked up by org-roam currently.

Having just one encrypted note in your notes directory would require a password each time the cache is rebuilt (unless the password is cached). If this is done often it could be annoying, so perhaps the encrypted notes should only be cached once.

Would this feature be a useful addition to org-roam, or is it out of scope? Are there any potential problems adding a new file extension in addition to .org (this might be nice to have regardless of encryption)?

Void-function: closure in org-roam--build-cache-async

After #72 , there were some strange issues with emacs-async and lexical-binding which resulted in:

error in process sentinel: async-handle-result: Symbol’s function definition is void: closure

Debugger entered--Lisp error: (void-function closure)
  signal(void-function (closure))
  async-handle-result((closure (t) (cache) (setq org-roam-forward-links-cache (plist-get cache :forward)) (setq org-roam-backward-links-cache (plist-get cache :backward)) (setq org-roam-titles-cache (plist-get cache :titles)) (setq org-roam-cache-initialized t) (message "Org-roam cache built!")) (async-signal (void-function closure)) #<buffer *emacs*>)
  async-when-done(#<process emacs> "finished\n")

org-roam <> org-zettelkasten Discussion Thread

@l3kn Since we're both working on something similar, I thought we should have some discussion about where each package should go, so efforts are not duplicated. As far as possible, maybe we can extract out certain package logic to allow for reuse.

For me, I'm just working towards emulating Roam. Unless there's some amazing feature that Roam doesn't have that I can create, i think that's as far as I'd go. For now, I'm curious as to:

  1. What are you creating beyond what Roam provides, and how does it help you? Zettelkasten is meant to be a simple workflow, and I'm striving for that.
  2. It seems like you will be building another external indexer. I think that would be useful in my case as well, so perhaps we can work together on that.
  3. I'm just curious to understand your workflow in general, with your package. Would you mind sharing a bit more? Happy to take a video call.

Confusion around file names and creating existing links

Hi!

Thank you so much for creating this. I'm in the process of emptying my org-brain repository and entering the information in here -- which is a much better fit for how I want to be able to think.

Something just happened, which I think is related to the default behavior of using timestamps for file names (or may be a bug in the background updater - I don't quite know how to troubleshoot the current state of things):

  1. I created an org-roam file with org-roam-find-file for a link about how to handle projects in org-mode.
  2. In that file, I pasted the link, I also used org-roam-insert-file to insert a link to a non-existing roam file called "org-mode".
  3. I then used org-roam-find-file to open the file org-mode, which created a new file when my intent was to open the file I had just created with that name.

I'm not exactly sure what happened, but my intent was to have a single file with the name org-mode.

Predictable link-following behaviour

I'm wondering if anyone else is having inconsistent behaviour when following links.

The only way to follow links from org seems to be org-open-at-point. This doesn't mirror the behaviour of find-file for me. It sometimes opens a new window, and the org-roam buffer is updated with a considerable delay. For evil users, this also messes with evil jumping.

I've written a find function to use more predictable behaviour, Would this be useful to add as a PR? As I don't use vanilla org-mode features, this might be a solved problem.

org-roam-insert breaks with arrayp nil

Hi, I like the concept of a mode very much - thank you for your post!

I've tried to use it and org-roam-insert broke down on me with

Lisp error: (wrong-type-argument arrayp nil)
  file-truename(nil)
  (file-name-directory (file-truename (buffer-file-name (current-buffer))))
  (let* ((completions (mapcar (function (lambda (file) (list (org-roam--get-title-or-slug file) file))) (org-roam--find-all-files))) (title (completing-read "File: " completions)) (absolute-file-path (or (car (cdr (assoc title completions))) (org-roam--make-new-file-path (org-roam--get-new-id title) t))) (current-file-path (file-name-directory (file-truename (buffer-file-name (current-buffer)))))) (if (file-exists-p absolute-file-path) nil (org-roam--make-file absolute-file-path title)) (insert (format "[[%s][%s]]" (concat "file:" (file-relative-name absolute-file-path current-file-path)) (format org-roam-link-title-format title))))
  org-roam-insert()
  funcall-interactively(org-roam-insert)
  call-interactively(org-roam-insert nil nil)
  command-execute(org-roam-insert)

I'm using doom-emacs, my init code is:

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

  (add-hook 'org-mode-hook #'org-roam)
  (add-hook 'after-init #'org-roam--build-cache-async)
  ;; :hook
  ;; ((org-mode . org-roam-mode)
  ;;  (after-init . org-roam--build-cache-async) ;; optional!
  ;;  )
  (setq org-roam-directory "~/Dropbox/org-current/roam")

  (map!
   "C-c n l" #'org-roam
   "C-c n t" #'org-roam-today
   "C-c n f" #'org-roam-find-file
   "C-c n i" #'org-roam-insert
   "C-c n g" #'org-roam-show-graph
   )
  )

org-roam--update-buffer breaks org-capture

If you org-capture, then C-c C-c this error occurs:

Debugger entered--Lisp error: (wrong-type-argument arrayp nil)
  substring(nil 0 1)
  file-truename(nil)
  org-roam--update-buffer()
  org-roam--update-cache()
  run-hooks(after-save-hook)
  basic-save-buffer(nil)
  save-buffer()
  org-capture-finalize(nil)
  funcall-interactively(org-capture-finalize nil)
  call-interactively(org-capture-finalize nil nil)
  command-execute(org-capture-finalize)

Rename file - update corresponding links.

Hi, thanks for a great project. Is it possible to have backlinks automatically update if you rename an org-roam file? I believe that this would lead to more long-term stability.

Speed up `org-roam-find-files` using external tools

Shelling out to find should lead to significant speed improvements over the current e-lisp implementation. The elisp implementation will be a fallback for environments without these unix tools (i.e. windows).

Add org-roam-insert with downcased titles

Many times, I'd manually downcase the titles inserted by org-roam-insert so they'd flow nicely within the text. This should be automatic, perhaps through the prefix-key.

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.