aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/overlays/kookie/emacs/org/default.el
blob: 2dc7523797580c43c770dc9aad93803e14d48d2f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
;; org.el
;;   Configure org-mode key bindings and custom functions
;;
;; This module depends on org mode.
;;
;;
;; This file is part of LIBKOOKIE, a collection of nix expressions.
;; LIBKOOKIE is licensed under the GPL-3.0 (or later) -- see LICENSE

(provide 'kookie-org)
(require 'org)

;;; Set .org as my file ending of choice
(add-to-list 'auto-mode-alist '("\\.org$" . org-mode))

(defun org-open-at-point-in-current-window ()
  "A utility function to easily navigate org-mode file trees"
  (interactive)
  (let ((org-link-frame-setup (quote
                               ((vm . vm-visit-folder)
                                (vm-imap . vm-visit-imap-folder)
                                (gnus . gnus)
                                (file . find-file)
                                (wl . wl)))
                              ))
    (org-open-at-point)))

;;; Org mode key bindings replicated here to make it easier for me
(define-key org-mode-map "\C-c\C-o" 'org-open-at-point-in-current-window)
(define-key org-mode-map "\C-S-<up>" nil)
(define-key org-mode-map "\C-S-<down>" nil)