Disclaimer: If you use GitHub - org-roam/org-roam: Rudimentary Roam replica with Org-mode, GitHub - Kungsgeten/org-brain: Org-mode wiki + concept-mapping or GitHub - meedstrom/org-node: A notetaking system like Roam using Emacs Org-mode · GitHub this package is rather useless to you.
It adds a backend to company-mode based on bookmark-list. With
bookmark-plus a new bookmark-type is introduced: org-id-links. Beaware
that only bookmarks with this new type are considered for completion.
If you delete a org-header you have to manually delete the bookmark
else you have dead completion-candidates. With M-x list-bookmarks
you can manage your bookmarks. If completion get’s slow or a
completion-candidate annoys you, you can delete these there.
This package evolves around following packages:
- org
- org-id
- bookmark-plus
- company-mode
It provides code to glue everything together. It’s just a collection of some “config-gems” without the goal to develop a monstrosity.
This package is not complete and can certainly be improved. This is
just an extraction of 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)
(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-bookmarker-plus
:straight (org-bookmarker-plus :type git :host github :repo "lordnik22/org-bookmarker-plus"))
(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-bookmarker-plus-id-description-function)
(org-link-set-parameters "id" :complete 'org-bookmarker-plus-id-complete-link))