Skip to content

lordnik22/org-bookmarker-plus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

Org Bookmarker Plus

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:

It provides code to glue everything together. It’s just a collection of some “config-gems” without the goal to develop a monstrosity.

Contribution

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.

Workflow

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:

  1. Run the minimal configuration
  2. Create a new org-buffer
  3. Add new header: * Cleaning my Fondue-Caquelon
  4. Type C-c l / (org-store-link)
  5. Add a description to the header beginning with “Cle”
  6. company-mode should suggest completion candidate Cleaning my Fondue-Caquelon
  7. Type ENT (new org-id-link created)
  8. Switch to buffer *scratch*
  9. Type C-x x j / (bookmark-jump)
  10. Pick Cleaning my Fondue-Caquelon and ENT
  11. Switches to org-buffer (from step 2) and point jumps to the picked header (from step 3)

Minimal configuration

(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))

About

Using custom bookmark+-type for jump-to- and completion-candidates in org

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors