Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bcardoso/org-backlinks
An interface for searching backlinks to Org headings.
https://github.com/bcardoso/org-backlinks
backlinks emacs emacs-lisp org-mode org-ql zettelkasten
Last synced: 28 days ago
JSON representation
An interface for searching backlinks to Org headings.
- Host: GitHub
- URL: https://github.com/bcardoso/org-backlinks
- Owner: bcardoso
- License: gpl-3.0
- Created: 2022-03-06T02:43:58.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-06-21T23:04:46.000Z (6 months ago)
- Last Synced: 2024-06-23T11:12:58.422Z (6 months ago)
- Topics: backlinks, emacs, emacs-lisp, org-mode, org-ql, zettelkasten
- Language: Emacs Lisp
- Homepage:
- Size: 196 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.org
- License: LICENSE
Awesome Lists containing this project
README
#+AUTHOR: Bruno Cardoso
#+DATE: 2022-03-05
#+STARTUP: indent content* org-backlinks
An interface for searching backlinks to Org headings.
This package aims to provide a sense of context when searching for links /to/ and /from/ the current note.
[[file:screenshot.png]]
Backlinks are the Org headings that have links to the current Org heading at point. Second order backlinks are the backlinks to each of the current heading's backlinks. Third order backlinks are the same but for the second order ones.
Optionally, it can also show the direct and indirect links of a note.
Direct links are the links to other headings present in the current heading. Indirect links are the direct links present in those headings.
[[file:diagram.png]]
The optional package =helm-org-backlinks= provides a Helm interface for =org-backlinks=.
This package requires [[https://github.com/alphapapa/org-ql][org-ql]].
** Installation
Clone this repo and add it to your =load-path=:
#+begin_src emacs-lisp
(add-to-list 'load-path "/path/to/org-backlinks")
(require 'org-backlinks)
(require 'helm-org-backlinks) ; optional Helm interface
(require 'consult-org-backlinks) ; optional Consult interface
#+end_srcOr, with use-package + straight.el:
#+begin_src emacs-lisp
(use-package org-backlinks
:straight (org-backlinks :host github :repo "bcardoso/org-backlinks"
:files ("org-backlinks.el"))
:bind ("C-c z" . org-backlinks));; optional Helm interface
(use-package helm-org-backlinks
:straight (helm-org-backlinks :host github :repo "bcardoso/org-backlinks"
:files ("helm-org-backlinks.el"))
:bind ("C-c z" . helm-org-backlinks));; optional Consult interface
(use-package consult-org-backlinks
:straight (consult-org-backlinks :host github :repo "bcardoso/org-backlinks"
:files ("consult-org-backlinks.el"))
:bind ("C-c z" . consult-org-backlinks))
#+end_src** Usage
Just run =M-x org-backlinks= or with the suggested binding =C-c z= in a Org heading.
Or run your preferred command: =M-x helm-org-backlinks= or =M-x consult-org-backlinks=.
=org-backlinks= will search the files defined by =org-backlinks-files= for the CUSTOM_ID or the ID of the current Org heading.
Set =org-backlinks-show-direct-links= to =t= to see both the direct and indirect links to other headings.
The other customizable variables are accessible through the customize interface:
- =M-x customize-group RET org-backlinks=.
** Integration
=org-backlinks= sources can be easily integrated into other Helm or Consult commands.
For example, this is how I integrate a simple backlink source into [[https://github.com/bcardoso/org-hop][org-hop]], my all-purpose Org heading hopping interface:
#+begin_src emacs-lisp
;; Consult interface
(require 'consult-org-backlinks)
(advice-add 'consult-org-hop :before #'org-backlinks-setup-simple)
(add-to-list 'consult-org-hop-sources 'consult-org-backlinks-source);; Helm inferface
(require 'helm-org-backlinks)
(advice-add 'helm-org-hop :before #'org-backlinks-setup-simple)
(add-to-list 'helm-org-hop-default-sources 'helm-org-backlinks-source)
#+end_src** Changelog
- v0.2.0 :: add [[https://github.com/minad/consult/][consult]] support.
- v0.1.0 :: initial concept & [[https://github.com/emacs-helm/helm][helm]] interface.