Org-roam major redesign

I cannot speak for Jethro for his plans, but my interpretation so far is that for both of your questions, “it’s up to you, the user”.

This is not something I have done, but my understanding is that mouse click actions are also configured in the same way as keyboard keybindings via define-key, are they not? If this is correct then, it should be

(define-key org-roam-mode-map [some way to point to mouse-1 click] #’[the same command mapped to RET])

Yes for my config. I think the answer for you depends on your config (your personal one and Doom) — I don’t use Doom, but I have struggled with helping others using Doom. It’s currently just a matter of how your window management works in your Emacs.

1 Like

I took a look again at @jethro’s dot files (he uses doom), and he has this towards the end of his config, which I missed earlier, and is the only thing I see related this.

@mshevchuk - have you sorted these config details out? If and when you do, can you post details please?

The struggle was the behaviour of side-window. It was especially difficult in Doom to control when a new window gets created when you click on the link in backlinks buffer. It might as well be exactly how you like it. Winner Mode probably does not control this part. Try how it works on your end; you might even like what you get. I didn’t (there are one or two long debugging threads where I’m involved in this forum and/or in Slack; like this one). I prefer the way vanilla works.

@bruce, do you mean winner-mode or in general? I think winner-mode is mentioned in the manual at orgroam.com and is not anything specific to v2. As far as I understood, winner-mode is a sort of undo-mode but for windows configurations. Used with Org roam it allows for a simple browser experience where winner-redo and winner-undo are equivalent to “show next” and “show previous” buttons.

Regarding the config specific to v2, I’d suggest to completely comment out the old config (for org-roam-bibtex too if you use it) and try adopt something like this, which is my minimal working config for testing purposes:

(use-package! org-roam
  :after org
  :commands
  (org-roam-buffer
   org-roam-setup
   org-roam-capture
   org-roam-node-find)
  :config
  (require 'org-roam-backlinks)
  (require 'org-roam-reflinks)
  (require 'org-roam-unlinked-references)
  (setq org-roam-mode-sections
        (list #'org-roam-backlinks-insert-section
              #'org-roam-reflinks-insert-section
              #'org-roam-unlinked-references-insert-section))
  (org-roam-setup))

With the above there is no need to run org-roam-setup manually. It will be triggered by any command listed in the :commands section.

I meant in general, but including the similar window, etc behavior as v1.

I commented out the org-roam feature, and basically copy-and-pasted jethro’s config; just modifying paths.

Yeah,

(define-key org-roam-mode-map [mouse-1] #'org-roam-visit-thing)

But this won’t be included with org-roam.

2 Likes

So the idea is to keep org-roam itself as focused as possible, and allow for maximum flexibility in configuration?

But it would be appropriate to include it, say, in the Doom org module updated for v2?

I guess it would make sense at some point to include examples like these in, say, a wiki?

No, I just don’t think it’s a good default.

If the community thinks it’s good to have, I suppose.

Interesting. Why?

Some people just use the mouse to move around the buffer. Same with magit buffers: they don’t bind m1 too.

1 Like

@jethro, @bruce

I took the liberty of compiling this wiki on Org-roam GH repo, based on the experiences and tips discussed in this thread. @mshevchuk I have taken your Doom code as well (Remove it if you don’t like it, or add to it if like it :wink: ).

Language rough, and still WIP.
@jethro , it is not something you feel appropriate in the project repo, please advise – I think it is useful so I will be happy to move it somewhere else.

Edit: Changed the URL (git clone failed, probably because of the “inverted commas” around “Rough”).

4 Likes

Great start @nobiot; thanks for the putting this together!

Given the conversation yesterday, at some point I’d like to see a section on navigating and interacting with the buffer, given that this is a significant change as well.

1 Like

@nobiot, great job!

1 Like

Sure. It would be quicker if you started the section; it’s a wiki. I didn’t see the difference (I don’t use a mouse in Emacs, except for the menu bar).

I am also having this issue with org-ids. I use org-publish to export my org-roam files to html, but when using id: links, it results in “Unable to resolve link”. It seems from looking at the manual that only file links are supported for linking between files - Publishing links (The Org Manual).

1 Like

Added a quick snippet to hide and show the properties based on the tips shared a little ago.
This should help you toggle display of properties (both file and heading) on and off.

This is not specific to V2; you can try it even without Org-roam.
If you use it, please share your experience… (for further improvement, etc.)

2 Likes

I thought about that, but I don’t know how to write that section (other than to put in a note to how to configure links there to be clickable).

For example, am I even correct that default for v1 was clickable? If yes, then clearly that’s a change.

I don’t know any more about V1 :sweat_smile:; I have moved on. I have added a placeholder section and included the keybindings config for mouse that Jethro shared with us. Feel free to expand it or any other parts :slight_smile:

@jethro ,

org-roam-capture does not seem to work. The list of existing nodes show up. I enter a new node’s name to create a new file node. Nothing happens after this. org-roam-node-find works even for a new file node. I don’t use capture, so the template is the default one.

Is this something I should report in GH, or are you working on org-roam-capture?

Just wanted to say thanks @nobiot for your input in clarifying some v2 issues. I’ve just started with org-roam so decided to use v2 from the beginning. Also thanks to @jethro obviously for all his hard work in putting org-roam togehter!

2 Likes