## GNU Hypobole 1.0
There have been a few recent discussions about the [GNU Hyperbole](https://www.gnu.org/software/hyperbole/) package, which provides worldwide interlinking capabilities across different buffers and modes via implicit and explicit links, which are activated with a single command or key. This feature is interesting, but Hyperbole comes with a additional baggage, the Koutliner, HyRolo, HyControl and technical debt, which makes the package hard to get into. For this reason I tried to cook down the package to a minimal subset - GNU Hypobole. Since Emacs is Elisp and Elisp is Emacs it also makes sense to hack it yourself. Still, the following package is only meant as a demonstrator. If you truly want to use the hotkey functionality, you may rather use the original Hyperbole package, [Embark](https://github.com/oantolin/embark) (`embark-dwim` as hotkey and `embark-act` for additional actions) or simply [Org-mode](https://orgmode.org/) (`org-open-at-point-global` for Org links in arbitrary modes). Also consider contributing to Emacs or the package ecosystem! Thank you for reading!
## The Code
;;; hypobole.el --- Worldwide interlinking capabilities -*- lexical-binding: t -*-
;; The assist key command `hypobole-key' (C-c h) recognizes:
;;
;; + {C-h h} macros
;; + Org links (org-open-at-point-global)
;; + Toggeable Org elements in Org (C-c C-c)
;; + URLs
;; + Files
;; + Symbols
;; + S-expressions
(require 'ffap)
(require 'pp)
(require 'org)
(defvar hypobole-links
'(hypobole-kmacro
hypobole-org-link
hypobole-org-toggle
hypobole-url
hypobole-file
hypobole-symbol
hypobole-sexp
hypobole-nop))
(defun hypobole-nop ()
(user-error "No link at point"))
(defun hypobole-kmacro ()
(interactive)
(save-excursion
(let ((beg (progn (skip-chars-backward "^{}\n") (point)))
(end (progn (skip-chars-forward "^{}\n") (point))))
(when (and (eq (char-before beg) ?{) (eq (char-after end) ?}))
(setq unread-command-events (listify-key-sequence (kbd (buffer-substring beg end))))
t))))
(defun hypobole-org-link ()
(interactive)
(ignore-errors
(progn
(if (derived-mode-p 'org-mode)
(org-open-at-point)
(org-open-at-point-global))
t)))
(defun hypobole-org-toggle ()
(interactive)
(when (derived-mode-p 'org-mode)
(ignore-errors (or (org-ctrl-c-ctrl-c) t))))
(defun hypobole-url ()
(interactive)
(when-let (url (ffap-url-at-point))
(browse-url url)
t))
(defun hypobole-file ()
(interactive)
(when-let (file (ffap-file-at-point))
(find-file file)
t))
(defun hypobole-symbol ()
(interactive)
(when-let* ((symbol (thing-at-point 'symbol))
(symbol (intern-soft symbol))
((or (boundp symbol) (fboundp symbol))))
(describe-symbol symbol)
t))
(defun hypobole-sexp ()
(interactive)
(when-let* ((sexp (sexp-at-point))
((consp sexp)))
(pp-display-expression (eval sexp t) "*Pp Eval Output*")
t))
(defun hypobole-key ()
(interactive)
(run-hook-with-args-until-success 'hypobole-links))
(global-set-key (kbd "C-c h") 'hypobole-key)
(provide 'hypobole)
;;; hypobole.el ends here