From 5b773b687b8976f62972b1321c31813a158531b0 Mon Sep 17 00:00:00 2001 From: Leo Vivier Date: Fri, 1 May 2020 09:07:37 +0200 Subject: [PATCH] (doc): add key-binding for index in default configs (#543) * (doc): add key-binding for index in default configs * (fix): rename org-roam-find-index to -jump-to-index --- doc/configuration.md | 2 +- doc/installation.md | 2 ++ org-roam-compat.el | 2 ++ org-roam.el | 4 ++-- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/doc/configuration.md b/doc/configuration.md index c1a2140..f547ec7 100644 --- a/doc/configuration.md +++ b/doc/configuration.md @@ -88,7 +88,7 @@ In Org-roam, you can define the path to your index file by setting `org-roam-ind (setq org-roam-index-file "index.org") ``` -You can then bind `org-roam-find-index` in your configuration to access it (see [Basic Install and +You can then bind `org-roam-jump-to-index` in your configuration to access it (see [Basic Install and Configuration](installation.md/#basic-install-and-configuration) to review how to set key-bindings). diff --git a/doc/installation.md b/doc/installation.md index d8893f0..5fc327c 100644 --- a/doc/installation.md +++ b/doc/installation.md @@ -21,6 +21,7 @@ The recommended method of configuration is to use [use-package][use-package]. :bind (:map org-roam-mode-map (("C-c n l" . org-roam) ("C-c n f" . org-roam-find-file) + ("C-c n j" . org-roam-jump-to-index) ("C-c n b" . org-roam-switch-to-buffer) ("C-c n g" . org-roam-graph)) :map org-mode-map @@ -33,6 +34,7 @@ Or without `use-package`: (require 'org-roam) (define-key org-roam-mode-map (kbd "C-c n l") #'org-roam) (define-key org-roam-mode-map (kbd "C-c n f") #'org-roam-find-file) +(define-key org-roam-mode-map (kbd "C-c n j") #'org-roam-jump-to-index) (define-key org-roam-mode-map (kbd "C-c n b") #'org-roam-switch-to-buffer) (define-key org-roam-mode-map (kbd "C-c n g") #'org-roam-graph) (define-key org-mode-map (kbd "C-c n i") #'org-roam-insert) diff --git a/org-roam-compat.el b/org-roam-compat.el index 253675e..9bd865c 100644 --- a/org-roam-compat.el +++ b/org-roam-compat.el @@ -71,6 +71,8 @@ "org-roam 1.0.0") (define-obsolete-function-alias 'org-roam-graph-build 'org-roam-graph "org-roam 1.0.0") +(define-obsolete-function-alias 'org-roam-find-index 'org-roam-jump-to-index + "org-roam 1.1.0") ;;;; Variables (define-obsolete-variable-alias 'org-roam-graphviz-extra-options diff --git a/org-roam.el b/org-roam.el index f52c6a0..849c513 100644 --- a/org-roam.el +++ b/org-roam.el @@ -502,7 +502,7 @@ which takes as its argument an alist of path-completions. See (interactive) (find-file org-roam-directory)) -;;;; org-roam-find-index +;;;; org-roam-jump-to-index (defcustom org-roam-index-file nil "Path to the Org-roam index file. The path can be a string or a function. If it is a string, it @@ -533,7 +533,7 @@ whose title is 'Index'." (concat (file-truename org-roam-directory) path) index))) -(defun org-roam-find-index () +(defun org-roam-jump-to-index () "Find the index file in `org-roam-directory'. The path to the index can be defined in `org-roam-index-file'. Otherwise, the function will look in your `org-roam-directory'