Org-agenda 'current directory' to org-roam directory?

Hey, I guess this is more of org-mode question, but maybe somebody already solved it.

So I have org-roam stuff in one subdirectory. I have my own custom agenda view build which I use a lot. All of this is in git repo, which I commit/push often. It would be convenient for me to be able to start magit from agenda buffer, but take org-roam-directory as base. Now the ‘current’ directory for org-agenda buffer is HOME dir.

Anyone knows how I could change ‘current directory’ for org-agenda buffer? I could change default emacs directory but that is too big impact on other stuff…

Maybe this?

You can call magit-status with prefix-arg (C-u), it will prompt you for git repository. So if you keybinding for magit-status is C-xg, you can do C-uC-xg, it will prompt for git repo.

Thx nobiot,

Yeah it could probably be automated using something like that, need to play with it more. Thx

If you just need to change the value of current-directory , I would simply create a custom command and use let to set the value and call magit