If I am not mistaken, org-roam-jump-to-index is gone in V2.
I would like to try to reintroduce it. Never coded anything before.
I would like to ask for some quick guideline or suggestion on the best way to approach this project. I thank you in advance for giving any consideration to this question.
I never used the index feature in V1 but by the looks of the code, you could pretty much copy and paste the whole thin — you would still need to adjust for different functions, etc.
It’s just a customising variable that defines the single index file name, and function to jump to it (or if the file does not exist yet, ask the user whether or not to create it).
One thing I notice is this line. org-roam-mode is no longer a global minor mode; you don’t need this check. You could check whether or not the current buffer is an Org-roam file but this may not be necessary.
Thank you @nobiot . I like to start with an easy problem
Sorry, one more thing for what it’s worth.
If you really never coded anything before, I would suggest to make it super simple and do it only for yourself first. This is something I would have advised myself when I started coding Emacs and Emacs Lisp 1-2 years ago (after meeting Org-roam) – I only changed one variable to make Org-roam to work with
.md file extension; less than 10 characters.
For example, the V1
jump-to-index function asks you a Y/N question if you don’t have the index file. You can remove this, if you are coding this feature for yourself – you know if you have the index file or not. Don’t ask. Make it simple. You can keep it as it is because that may be less change. That’s also simple. You can decide which will be simpler for you
In the first iteration, you don’t even need to make the index file path a customizing variable. You know where you want it to be. Hard code it; it’s only for yourself – again, you can keep V1 code as is.
Once you have completed the simple first version, then you could come back to it. Or decide to move on to something new.
I will follow your advice to the letter. I will post back here the result. Really grateful for the time you invested in mentoring me here.
This is my first version, I did put the code in the :config section of my (use-package org-roam), and so far it works. My first code in elisp (actually, in any language). I am an old guy and I cannot express my gratitude toward this community and in particular @nobiot for helping me out in taking the first step.
(defun org-roam-jump-to-index ()
"Stub of recreating the function from V1"