Using org-roam-graph "arg node"

Hi, org-roam-graph suggests that the graph can be generated from the present node as the top node, and limited to only certain levels of nodes associated with the node in the opened .org file. I have not been able to figure out how to actually set that option. thanks for any help.

from autoloads.el:

*(autoload 'org-roam-graph “org-roam-graph” "*
Build and possibly display a graph for NODE.
ARG may be any of the following values:

    • nil show the graph.*
    • `\[universal-argument]’ show the graph for NODE.*
    • `\[universal-argument]’ N show the graph for NODE limiting nodes to N steps.*

(fn &optional ARG NODE)" t nil)

  • John

Universal argument is bound to C-u by default. So…

  • For the second bullet point, do C-u first and then call org-roam-graph – e.g. C-u M-x org-roam-graph
  • For the third bullet point C-u and press a number (e.g. 2 ) and then call org-roam-graph – e.g. C-u 2 M-x org-roam-graph

You can use your keybinding instead of M-x of course. C-u waits for a command.

You can see this in Emacs manual by evaluating the following. The numeric argument is also part of the Emacs tutorial that comes with Emacs (C-h t).

(info "(emacs) Arguments")

In addition… I’d suggest that you use C-h f to inspect the documentation for functions and commandas rather than looking at autoloads.el. This way, you will see “\[universal-argument]” translated into your key binding

Thanks, this is perfect. For all the years I’ve used Emacs, I’ve never taken time to go under the hood. Teach a man to fish…

1 Like