(require 'hydra) (require 'outline) ;; org mode files (defhydra my/hydra-orgmodes (:color blue :hint nil) " _n_: notes _c_: chaim _w_: wildman _o_: ool _u_: uddin _s_: steve _r_: refile _f_: fh _p_: read papers _R_: paper notes _h_: hpcbio _q_: quit _z_: quit " ("n" (find-file "~/projects/org-notes/notes.org")) ("c" (find-file "~/projects/org-notes/chaim.org")) ("w" (find-file "~/projects/org-notes/wildman.org")) ("u" (find-file "~/projects/org-notes/uddin.org")) ("o" (find-file "~/projects/org-notes/ool.org")) ("f" (find-file "~/projects/org-notes/fh.org")) ("s" (find-file "~/projects/org-notes/sndservers.org")) ("r" (find-file "~/projects/org-notes/refile.org")) ("p" (find-file "~/projects/research/papers_to_read.org")) ("R" (find-file "~/projects/research/paper_notes.org")) ("h" (find-file "~/projects/org-notes/hpcbio.org")) ("q" nil "quit") ("z" nil "quit") ) (global-set-key (kbd "C-c 2") 'my/hydra-orgmodes/body) (global-set-key (kbd "C-c @") 'my/hydra-orgmodes/body) ;; from https://github.com/abo-abo/hydra/wiki/Emacs (defhydra my/hydra-outline (:color pink :hint nil) " ^Hide^ ^Show^ ^Move ^^^^^^------------------------------------------------------ _q_: sublevels _a_: all _u_: up _t_: body _e_: entry _n_: next visible _o_: other _i_: children _p_: previous visible _c_: entry _k_: branches _f_: forward same level _l_: leaves _s_: subtree _b_: backward same level _d_: subtree " ;; Hide ("q" hide-sublevels) ; Hide everything but the top-level headings ("t" hide-body) ; Hide everything but headings (all body lines) ("o" hide-other) ; Hide other branches ("c" hide-entry) ; Hide this entry's body ("l" hide-leaves) ; Hide body lines in this entry and sub-entries ("d" hide-subtree) ; Hide everything in this entry and sub-entries ;; Show ("a" show-all) ; Show (expand) everything ("e" show-entry) ; Show this heading's body ("i" show-children) ; Show this heading's immediate child sub-headings ("k" show-branches) ; Show all sub-headings under this heading ("s" show-subtree) ; Show (expand) everything in this heading & below ;; Move ("u" outline-up-heading) ; Up ("n" outline-next-visible-heading) ; Next ("p" outline-previous-visible-heading) ; Previous ("f" outline-forward-same-level) ; Forward - same level ("b" outline-backward-same-level) ; Backward - same level ("z" nil "leave")) (global-set-key (kbd "C-c #") 'my/hydra-outline/body) ; by example (global-set-key (kbd "C-c 3") 'my/hydra-outline/body) ; by example (provide 'don-hydra)