lang/org: add goto-visible & refile-to-visible commands
- Bind 'gsh' to goto-visible command in org-mode - Bind '<localleader> g v' to goto-visible - Bind '<localleader> r v' to refile-to-visible - Add avy package to lang/org module Powered by avy.
This commit is contained in:
parent
77b0784075
commit
c8cfa31a1e
5 changed files with 45 additions and 0 deletions
19
modules/lang/org/autoload/org-avy.el
Normal file
19
modules/lang/org/autoload/org-avy.el
Normal file
|
@ -0,0 +1,19 @@
|
|||
;;; lang/org/autoload/org-avy.el -*- lexical-binding: t; -*-
|
||||
|
||||
;;;###autoload
|
||||
(defun +org-headline-avy ()
|
||||
"TODO"
|
||||
(save-excursion
|
||||
(when-let* ((org-reverse-note-order t)
|
||||
(pos (avy-with avy-goto-line (avy-jump (rx bol (1+ "*") (1+ blank))))))
|
||||
(when (integerp (car pos))
|
||||
;; If avy is aborted with "C-g", it returns `t', so we know it was NOT
|
||||
;; aborted when it returns an int. If it doesn't return an int, we
|
||||
;; return nil.
|
||||
(copy-marker (car pos))))))
|
||||
|
||||
;;;###autoload
|
||||
(defun +org/goto-visible ()
|
||||
"TODO"
|
||||
(interactive)
|
||||
(goto-char (+org-headline-avy)))
|
Loading…
Add table
Add a link
Reference in a new issue