If you use GitHub - org-roam/org-roam: Rudimentary Roam replica with Org-mode or GitHub - Kungsgeten/org-brain: Org-mode wiki + concept-mapping this package is rather useless to you.
It adds a backend to company-mode based on bookmark-list. With bookmark-plus we add a new bookmark-type: org-id-links.
If you delete a org-header you have to manually delete the bookmark else you have dead completion-candidates.
This package provides code which glues following packages together:
- company-mode
- org
- org-id
- bookmark-plus
This package is not complete and can certainly be improved. This is
just a extraction from my personal historically growing init.el
file. If you have a suggestion, find a bug or want to continue on this
idea, feel free to create an issue or fork the repo.
The Workflow makes use of following shortcuts:
C-c l/(org-store-link): Store org-header to bookmark-list (becoms an completion candidate)C-x x j~/ ~(bookmark-jump): Jump to org-header (via bookmark)
Step-by-step Guide:
- Run the minimal configuration
- Create a new org-buffer
- Add new header:
* Cleaning my Fondue-Caquelon - Type
C-c l/(org-store-link) - Add a description to the header beginning with “Cle”
company-modeshould suggest completion candidateCleaning my Fondue-Caquelon- Type
ENT(new org-id-link created) - Switch to buffer
*scratch* - Type
C-x x j/(bookmark-jump) - Pick
Cleaning my Fondue-CaquelonandENT - Switches to org-buffer (from step 2) and point jumps to the picked header (from step 3)
This works across files and is performent because the candidates are
hand-picked. If it get’s slow, call bookmark-list and delete old
bookmarks which became irrelevant.
(defvar bootstrap-version)
(let ((bootstrap-file
(expand-file-name
"straight/repos/straight.el/bootstrap.el"
(or (bound-and-true-p straight-base-dir)
user-emacs-directory)))
(bootstrap-version 7))
(unless (file-exists-p bootstrap-file)
(with-current-buffer
(url-retrieve-synchronously
"https://raw.githubusercontent.com/radian-software/straight.el/develop/install.el"
'silent 'inhibit-cookies)
(goto-char (point-max))
(eval-print-last-sexp)))
(load bootstrap-file nil 'nomessage))
(straight-use-package 'use-package)
(straight-use-package 'el-patch)
(use-package bookmark+
:straight t
:init
(make-directory "~/.emacs.d/bookmark-plus" t)
:custom
(bmkp-bmenu-commands-file (expand-file-name "~/.emacs.d/bookmark-plus/.emacs-bmk-bmenu-commands.el"))
(bmkp-bmenu-state-file (expand-file-name "~/.emacs.d/bookmark-plus/.emacs-bmk-bmenu-state.el"))
(bmkp-bmenu-image-bookmark-icon-file (expand-file-name "~/.emacs.d/bookmark-plus/.emacs-bmk-bmenu-image-file-icon.png"))
(bmkp-last-as-first-bookmark-file "~/.emacs.d/emacs-bookmarks")
(bookmark-default-file "~/.emacs.d/emacs-bookmarks")
(bmkp-jump-map-prefix-keys nil)
:config
(setq bookmark-search-size 32
bookmark-save-flag 1))
(use-package company
:straight t)
(use-package org-link-battery
:straight (org-link-battery :type git :host github :repo "lordnik22/org-link-battery"))
(use-package org
:bind
(("C-c l" . org-store-link))
:hook
((org-mode-hook . company-org-bookmark-hook)
(org-mode-hook . company-mode)))
(use-package org-id
:config
(setq org-id-link-to-org-use-id 'create-if-interactive
org-id-link-to-use-id t))
(use-package ol
:config
(setq org-link-make-description-function 'org-link-battery-id-description-function)
(org-link-set-parameters "id" :complete 'org-link-battery-id-complete-link))