2016-05-26 18:51:39 -04:00
|
|
|
;;; module-org.el --- -*- no-byte-compile: t; -*-
|
2016-03-01 01:59:36 -05:00
|
|
|
|
2016-09-05 12:31:55 +02:00
|
|
|
(defconst org-directory (expand-file-name "~/Notes/"))
|
2016-03-01 01:59:36 -05:00
|
|
|
|
|
|
|
(define-minor-mode evil-org-mode
|
|
|
|
"Evil-mode bindings for org-mode."
|
|
|
|
:init-value nil
|
2016-08-21 16:53:38 +02:00
|
|
|
:lighter " !"
|
|
|
|
:keymap (make-sparse-keymap)
|
|
|
|
:group 'evil-org)
|
2016-03-01 01:59:36 -05:00
|
|
|
|
2016-08-21 16:53:38 +02:00
|
|
|
(add-hook 'org-load-hook 'doom|org-init t)
|
|
|
|
(add-hook 'org-load-hook 'doom|org-keybinds t)
|
|
|
|
(add-hook 'org-load-hook 'doom|org-hacks t)
|
|
|
|
(add-hook 'org-mode-hook 'doom|org-hook)
|
2016-03-01 01:59:36 -05:00
|
|
|
|
2016-05-08 18:29:57 -04:00
|
|
|
;;
|
2016-05-20 22:37:30 -04:00
|
|
|
(defun doom|org-hook ()
|
2016-03-01 01:59:36 -05:00
|
|
|
(evil-org-mode +1)
|
2016-04-08 14:05:14 -04:00
|
|
|
(visual-line-mode +1)
|
2016-08-21 16:53:38 +02:00
|
|
|
(setq line-spacing 1)
|
2016-03-01 01:59:36 -05:00
|
|
|
|
|
|
|
;; If saveplace places the point in a folded position, unfold it on load
|
|
|
|
(when (outline-invisible-p)
|
|
|
|
(ignore-errors
|
|
|
|
(save-excursion
|
|
|
|
(outline-previous-visible-heading 1)
|
|
|
|
(org-show-subtree))))
|
|
|
|
|
2016-05-20 22:37:30 -04:00
|
|
|
(defun doom|org-update ()
|
2016-03-01 01:59:36 -05:00
|
|
|
(when (file-exists-p buffer-file-name)
|
2016-03-06 22:54:04 -05:00
|
|
|
(org-update-statistics-cookies t)))
|
2016-03-01 01:59:36 -05:00
|
|
|
|
2016-05-20 22:37:30 -04:00
|
|
|
(add-hook 'before-save-hook 'doom|org-update nil t)
|
|
|
|
(add-hook 'evil-insert-state-exit-hook 'doom|org-update nil t))
|
2016-03-01 01:59:36 -05:00
|
|
|
|
2016-05-20 22:37:30 -04:00
|
|
|
(defun doom|org-init ()
|
2016-05-24 21:57:25 -04:00
|
|
|
(def-popup! " *Agenda Commands*" :align below :size 30)
|
|
|
|
(def-popup! " *Org todo*" :align below :size 5 :noselect t)
|
|
|
|
(def-popup! "*Calendar*" :align below :size 0.4)
|
|
|
|
(def-popup! "*Org Links*" :align below :size 5)
|
|
|
|
(def-popup! "^\\*Org Agenda.+" :align below :size 0.4 :regexp t)
|
|
|
|
(def-popup! "^\\*Org Src .+\\*$" :align below :size 0.4 :select t :regexp t)
|
|
|
|
(def-popup! "^\\*Org-Babel.*\\*$" :align below :size 0.4 :regexp t)
|
|
|
|
|
2016-03-01 01:59:36 -05:00
|
|
|
(setq-default
|
2016-03-13 15:31:02 -04:00
|
|
|
org-export-coding-system 'utf-8
|
|
|
|
|
2016-03-01 01:59:36 -05:00
|
|
|
;; Appearance
|
|
|
|
org-indent-mode-turns-on-hiding-stars t
|
|
|
|
org-adapt-indentation nil
|
|
|
|
org-blank-before-new-entry '((heading . nil) (plain-list-item . auto))
|
|
|
|
org-cycle-separator-lines 1
|
2016-03-13 15:31:02 -04:00
|
|
|
org-cycle-include-plain-lists t
|
2016-03-01 01:59:36 -05:00
|
|
|
org-ellipsis 'hs-face
|
|
|
|
org-entities-user '(("flat" "\\flat" nil "" "" "266D" "♭")
|
|
|
|
("sharp" "\\sharp" nil "" "" "266F" "♯"))
|
2016-05-08 18:29:57 -04:00
|
|
|
org-fontify-done-headline t
|
2016-03-01 01:59:36 -05:00
|
|
|
org-fontify-quote-and-verse-blocks t
|
|
|
|
org-fontify-whole-heading-line t
|
|
|
|
org-footnote-auto-label 'plain
|
|
|
|
org-hide-emphasis-markers t
|
2016-08-21 16:53:38 +02:00
|
|
|
org-hide-leading-stars t
|
2016-03-01 01:59:36 -05:00
|
|
|
org-image-actual-width nil
|
|
|
|
org-indent-indentation-per-level 2
|
|
|
|
org-pretty-entities t
|
2016-03-31 13:21:34 -04:00
|
|
|
org-pretty-entities-include-sub-superscripts t
|
2016-03-01 01:59:36 -05:00
|
|
|
org-startup-folded t
|
2016-03-06 22:54:04 -05:00
|
|
|
org-startup-indented t
|
2016-03-01 01:59:36 -05:00
|
|
|
org-startup-with-inline-images nil
|
2016-03-06 22:54:04 -05:00
|
|
|
org-tags-column 0
|
2016-03-01 01:59:36 -05:00
|
|
|
org-use-sub-superscripts '{}
|
|
|
|
|
|
|
|
;; Behavior
|
2016-03-06 22:54:04 -05:00
|
|
|
org-catch-invisible-edits 'show
|
2016-03-01 01:59:36 -05:00
|
|
|
org-checkbox-hierarchical-statistics nil
|
2016-09-05 12:32:28 +02:00
|
|
|
org-completion-use-ido nil ; Use ivy/counsel for refiling
|
2016-03-01 01:59:36 -05:00
|
|
|
org-confirm-elisp-link-function nil
|
|
|
|
org-default-priority ?C
|
|
|
|
org-hidden-keywords '(title)
|
|
|
|
org-hierarchical-todo-statistics t
|
|
|
|
org-log-done t
|
|
|
|
org-loop-over-headlines-in-active-region t
|
|
|
|
org-outline-path-complete-in-steps nil
|
|
|
|
org-refile-use-outline-path t
|
|
|
|
org-special-ctrl-a/e t
|
|
|
|
|
|
|
|
;; Sorting/refiling
|
2016-08-21 16:53:38 +02:00
|
|
|
org-archive-location (concat org-directory "/archived/%s::")
|
2016-03-01 01:59:36 -05:00
|
|
|
org-refile-targets '((nil . (:maxlevel . 2))) ; display full path in refile completion
|
|
|
|
|
|
|
|
;; Agenda
|
2016-03-06 22:54:04 -05:00
|
|
|
org-agenda-restore-windows-after-quit nil
|
|
|
|
org-agenda-skip-unavailable-files nil
|
|
|
|
org-agenda-dim-blocked-tasks nil
|
2016-03-13 15:31:02 -04:00
|
|
|
org-agenda-window-setup 'other-frame ; to get org-agenda to behave with shackle...
|
2016-03-06 22:54:04 -05:00
|
|
|
org-agenda-inhibit-startup t
|
2016-09-05 12:32:15 +02:00
|
|
|
org-agenda-files (append (f-entries org-directory (lambda (path) (f-ext? path "org")))
|
|
|
|
(f-entries (f-expand "projects" org-directory) (lambda (path) (f-ext? path "org")))
|
|
|
|
(f-entries (f-expand "contacts" org-directory) (lambda (path) (f-ext? path "org"))))
|
2016-08-21 16:53:38 +02:00
|
|
|
org-todo-keywords '((sequence "[ ](t)" "[-](p)" "[?](m)" "|" "[X](d)")
|
2016-03-06 22:54:04 -05:00
|
|
|
(sequence "TODO(T)" "|" "DONE(D)")
|
2016-03-01 01:59:36 -05:00
|
|
|
(sequence "IDEA(i)" "NEXT(n)" "ACTIVE(a)" "WAITING(w)" "LATER(l)" "|" "CANCELLED(c)"))
|
|
|
|
|
2016-03-13 15:31:02 -04:00
|
|
|
|
2016-03-01 01:59:36 -05:00
|
|
|
;; Babel
|
|
|
|
org-confirm-babel-evaluate nil ; you don't need my permission
|
|
|
|
org-src-fontify-natively t ; make code pretty
|
|
|
|
org-src-preserve-indentation t
|
|
|
|
org-src-tab-acts-natively t
|
|
|
|
org-src-window-setup 'current-window
|
2016-03-13 15:31:02 -04:00
|
|
|
org-edit-src-content-indentation 0
|
2016-03-01 01:59:36 -05:00
|
|
|
|
|
|
|
;; Latex
|
2016-05-08 18:29:57 -04:00
|
|
|
org-format-latex-options (plist-put org-format-latex-options :scale 1.4)
|
2016-03-01 01:59:36 -05:00
|
|
|
org-highlight-latex-and-related '(latex)
|
|
|
|
org-latex-create-formula-image-program 'dvipng
|
2016-05-08 18:29:57 -04:00
|
|
|
org-latex-image-default-width ".9\\linewidth"
|
2016-05-20 22:37:30 -04:00
|
|
|
org-latex-preview-ltxpng-directory (concat doom-temp-dir "/ltxpng/")
|
2016-03-01 01:59:36 -05:00
|
|
|
org-latex-remove-logfiles nil
|
|
|
|
org-startup-with-latex-preview nil
|
|
|
|
;; org-latex-packages-alist
|
|
|
|
;; '(("" "gauss" t)
|
|
|
|
;; ("" "physics" t) TODO Install this)
|
2016-08-21 16:53:38 +02:00
|
|
|
)
|
2016-05-08 18:28:38 -04:00
|
|
|
|
2016-03-01 01:59:36 -05:00
|
|
|
(org-babel-do-load-languages
|
|
|
|
'org-babel-load-languages
|
|
|
|
'((python . t) (ruby . t) (sh . t) (js . t) (css . t)
|
|
|
|
(plantuml . t) (emacs-lisp . t) (matlab . t)
|
|
|
|
(latex . t) (calc . t) (lisp . t) (lilypond . t)
|
2016-03-13 15:31:02 -04:00
|
|
|
;; (go . t)
|
2016-05-26 18:59:39 -04:00
|
|
|
;; (http . t)
|
|
|
|
;; (rust . t)
|
|
|
|
))
|
2016-03-01 01:59:36 -05:00
|
|
|
|
|
|
|
(let ((ext-regexp (regexp-opt '("GIF" "JPG" "JPEG" "SVG" "TIF" "TIFF" "BMP" "XPM"
|
|
|
|
"gif" "jpg" "jpeg" "svg" "tif" "tiff" "bmp" "xpm"))))
|
|
|
|
(setq iimage-mode-image-regex-alist
|
|
|
|
`((,(concat "\\(`?file://\\|\\[\\[\\|<\\|`\\)?\\([-+./_0-9a-zA-Z]+\\."
|
|
|
|
ext-regexp "\\)\\(\\]\\]\\|>\\|'\\)?") . 2)
|
|
|
|
(,(concat "<\\(http://.+\\." ext-regexp "\\)>") . 1))))
|
|
|
|
|
2016-05-08 18:29:57 -04:00
|
|
|
;; Fontify checkboxes and dividers
|
2016-03-01 01:59:36 -05:00
|
|
|
(defface org-list-bullet '((t ())) "Face for list bullets")
|
2016-05-08 18:29:57 -04:00
|
|
|
(font-lock-add-keywords
|
|
|
|
'org-mode '(("^ *\\([-+]\\|[0-9]+[).]\\) "
|
|
|
|
(1 'org-list-bullet))
|
|
|
|
("^ *\\(-----+\\)$"
|
|
|
|
(1 'org-meta-line))))
|
2016-03-01 01:59:36 -05:00
|
|
|
|
|
|
|
;; Enable encryption
|
|
|
|
(require 'epa-file)
|
|
|
|
(epa-file-enable)
|
|
|
|
(require 'org-crypt)
|
|
|
|
(org-crypt-use-before-save-magic)
|
|
|
|
(setq org-tags-exclude-from-inheritance '("crypt")
|
|
|
|
org-crypt-key user-mail-address
|
|
|
|
epa-file-encrypt-to user-mail-address)
|
|
|
|
|
2016-08-21 16:53:38 +02:00
|
|
|
;; smartparens config
|
|
|
|
(sp-with-modes '(org-mode)
|
|
|
|
(sp-local-pair "\\[" "\\]" :post-handlers '(("| " "SPC")))
|
|
|
|
(sp-local-pair "\\(" "\\)" :post-handlers '(("| " "SPC")))
|
|
|
|
(sp-local-pair "$$" "$$" :post-handlers '((:add " | ")) :unless '(sp-point-at-bol-p))
|
|
|
|
(sp-local-pair "{" nil))
|
|
|
|
|
|
|
|
;; bullets
|
|
|
|
(use-package org-bullets :commands org-bullets-mode))
|
|
|
|
|
|
|
|
(defun doom|org-hacks ()
|
|
|
|
;; Don't open separate windows
|
|
|
|
(push '(file . find-file) org-link-frame-setup)
|
|
|
|
|
|
|
|
;; Reveal files in finder
|
|
|
|
(setq org-file-apps '(("\\.org$" . emacs) (t . "open -R \"%s\"")))
|
|
|
|
|
2016-03-01 01:59:36 -05:00
|
|
|
;; Don't clobber recentf with agenda files
|
|
|
|
(defun org-is-agenda-file (filename)
|
|
|
|
(find (file-truename filename) org-agenda-files :key 'file-truename
|
|
|
|
:test 'equal))
|
|
|
|
(pushnew 'org-is-agenda-file recentf-exclude)
|
|
|
|
|
2016-08-21 16:53:38 +02:00
|
|
|
;; Don't track attachments
|
|
|
|
(push (format "/%s.+$" (regexp-quote org-attach-directory)) recentf-exclude)
|
2016-08-30 08:59:50 +02:00
|
|
|
(push ".attach" projectile-globally-ignored-file-suffixes)
|
2016-08-21 16:53:38 +02:00
|
|
|
|
2016-05-08 18:29:57 -04:00
|
|
|
;; Remove highlights on ESC
|
2016-05-20 22:37:30 -04:00
|
|
|
(defun doom*org-remove-occur-highlights (&rest args)
|
2016-05-08 18:29:57 -04:00
|
|
|
(when (eq major-mode 'org-mode) (org-remove-occur-highlights)))
|
2016-05-20 22:37:30 -04:00
|
|
|
(advice-add 'evil-force-normal-state :before 'doom*org-remove-occur-highlights)
|
2016-03-28 21:39:13 -04:00
|
|
|
|
2016-08-21 16:53:38 +02:00
|
|
|
;; Don't reset org-hide!
|
|
|
|
(advice-add 'org-find-invisible-foreground :override 'ignore)
|
|
|
|
|
|
|
|
;; Tame org-mode popups
|
|
|
|
;; Ensures org-src-edit yields control of its buffer to shackle.
|
|
|
|
(defun org-src-switch-to-buffer (buffer context)
|
|
|
|
(pop-to-buffer buffer))
|
|
|
|
|
|
|
|
;; And these for org-todo, org-link and org-agenda
|
|
|
|
(defun org-pop-to-buffer-same-window (&optional buffer-or-name norecord label)
|
|
|
|
"Pop to buffer specified by BUFFER-OR-NAME in the selected window."
|
|
|
|
(display-buffer buffer-or-name))
|
|
|
|
|
|
|
|
(defun org-switch-to-buffer-other-window (&rest args)
|
|
|
|
(mapc (lambda (b)
|
|
|
|
(let ((buf (if (stringp b) (get-buffer-create b) b)))
|
|
|
|
(pop-to-buffer buf t t)))
|
|
|
|
args))
|
|
|
|
|
|
|
|
;; Taming Org-agenda!
|
|
|
|
(defun doom/org-agenda-quit ()
|
|
|
|
"Necessary to finagle org-agenda into shackle popups and behave properly on quit."
|
|
|
|
(interactive)
|
|
|
|
(if org-agenda-columns-active
|
|
|
|
(org-columns-quit)
|
|
|
|
(let ((buf (current-buffer)))
|
|
|
|
(and (not (eq org-agenda-window-setup 'current-window))
|
|
|
|
(not (one-window-p))
|
|
|
|
(delete-window))
|
|
|
|
(kill-buffer buf)
|
|
|
|
(setq org-agenda-archives-mode nil
|
|
|
|
org-agenda-buffer nil))))
|
|
|
|
|
|
|
|
(after! org-agenda
|
|
|
|
(map! :map org-agenda-mode-map
|
|
|
|
:e "<escape>" 'doom/org-agenda-quit
|
|
|
|
:e "ESC" 'doom/org-agenda-quit
|
|
|
|
:e [escape] 'doom/org-agenda-quit
|
|
|
|
"q" 'doom/org-agenda-quit
|
|
|
|
"Q" 'doom/org-agenda-quit)))
|
2016-03-01 01:59:36 -05:00
|
|
|
|
2016-05-20 22:37:30 -04:00
|
|
|
(defun doom|org-keybinds ()
|
2016-03-01 01:59:36 -05:00
|
|
|
(map! (:map org-mode-map
|
2016-05-08 18:29:57 -04:00
|
|
|
"RET" nil
|
|
|
|
"C-j" nil
|
|
|
|
"C-k" nil
|
2016-05-20 22:37:30 -04:00
|
|
|
:i [remap doom/inflate-space-maybe] 'org-self-insert-command
|
2016-03-01 01:59:36 -05:00
|
|
|
:i "RET" 'org-return-indent)
|
|
|
|
|
|
|
|
(:map evil-org-mode-map
|
|
|
|
:ni "A-l" 'org-metaright
|
|
|
|
:ni "A-h" 'org-metaleft
|
|
|
|
:ni "A-k" 'org-metaup
|
|
|
|
:ni "A-j" 'org-metadown
|
|
|
|
;; Expand tables (or shiftmeta move)
|
2016-05-20 22:37:30 -04:00
|
|
|
:ni "A-L" 'doom/org-table-append-field-or-shift-right
|
|
|
|
:ni "A-H" 'doom/org-table-prepend-field-or-shift-left
|
|
|
|
:ni "A-K" 'doom/org-table-prepend-row-or-shift-up
|
|
|
|
:ni "A-J" 'doom/org-table-append-row-or-shift-down
|
2016-03-01 01:59:36 -05:00
|
|
|
|
2016-05-20 22:37:30 -04:00
|
|
|
:i "C-L" 'doom/org-table-next-field
|
|
|
|
:i "C-H" 'doom/org-table-previous-field
|
|
|
|
:i "C-K" 'doom/org-table-previous-row
|
|
|
|
:i "C-J" 'doom/org-table-next-row
|
2016-03-01 01:59:36 -05:00
|
|
|
|
|
|
|
:i "C-e" 'org-end-of-line
|
|
|
|
:i "C-a" 'org-beginning-of-line
|
2016-05-20 22:37:30 -04:00
|
|
|
:i "<tab>" 'doom/org-indent
|
|
|
|
:i "<S-tab>" 'doom/org-dedent
|
2016-03-01 01:59:36 -05:00
|
|
|
|
|
|
|
:nv "j" 'evil-next-visual-line
|
|
|
|
:nv "k" 'evil-previous-visual-line
|
2016-05-20 22:37:30 -04:00
|
|
|
:v "<S-tab>" 'doom/yas-insert-snippet
|
2016-03-01 01:59:36 -05:00
|
|
|
|
|
|
|
:i "M-a" (λ! (evil-visual-state) (org-mark-element))
|
|
|
|
:n "M-a" 'org-mark-element
|
|
|
|
:v "M-a" 'mark-whole-buffer
|
|
|
|
|
2016-05-20 22:37:30 -04:00
|
|
|
:ni "<M-return>" (λ! (doom/org-insert-item 'below))
|
|
|
|
:ni "<S-M-return>" (λ! (doom/org-insert-item 'above))
|
2016-03-01 01:59:36 -05:00
|
|
|
|
2016-05-20 22:37:30 -04:00
|
|
|
:i "M-b" (λ! (doom/org-surround "*")) ; bold
|
|
|
|
:i "M-u" (λ! (doom/org-surround "_")) ; underline
|
|
|
|
:i "M-i" (λ! (doom/org-surround "/")) ; italics
|
|
|
|
:i "M-`" (λ! (doom/org-surround "+")) ; strikethrough
|
2016-03-01 01:59:36 -05:00
|
|
|
|
|
|
|
:v "M-b" "S*"
|
|
|
|
:v "M-u" "S_"
|
|
|
|
:v "M-i" "S/"
|
|
|
|
:v "M-`" "S+"
|
|
|
|
|
|
|
|
(:leader
|
2016-05-20 22:37:30 -04:00
|
|
|
:n "oa" 'doom/org-attachment-reveal)
|
2016-03-01 01:59:36 -05:00
|
|
|
|
|
|
|
(:localleader
|
|
|
|
:n "/" 'org-sparse-tree
|
|
|
|
:n "?" 'org-tags-view
|
|
|
|
|
|
|
|
:n "n" (λ! (if (buffer-narrowed-p) (widen) (org-narrow-to-subtree)))
|
|
|
|
:n "e" 'org-edit-special
|
|
|
|
:n "=" 'org-align-all-tags
|
|
|
|
:nv "l" 'org-insert-link
|
|
|
|
:n "L" 'org-store-link
|
2016-05-20 22:37:30 -04:00
|
|
|
:n "x" 'doom/org-remove-link
|
2016-03-01 01:59:36 -05:00
|
|
|
;; :n "w" 'writing-mode
|
|
|
|
:n "v" 'variable-pitch-mode
|
2016-05-20 22:37:30 -04:00
|
|
|
:n "SPC" 'doom/org-toggle-checkbox
|
2016-03-01 01:59:36 -05:00
|
|
|
:n "RET" 'org-archive-subtree
|
|
|
|
|
|
|
|
:n "a" 'org-agenda
|
2016-05-20 22:37:30 -04:00
|
|
|
:n "A" 'doom:org-attachment-list
|
2016-03-01 01:59:36 -05:00
|
|
|
|
|
|
|
:n "d" 'org-time-stamp
|
2016-05-08 18:29:57 -04:00
|
|
|
:n "D" 'org-deadline
|
2016-05-20 22:37:30 -04:00
|
|
|
:n "i" 'doom/org-toggle-inline-images-at-point
|
2016-03-01 01:59:36 -05:00
|
|
|
:n "t" (λ! (org-todo (if (org-entry-is-todo-p) 'none 'todo)))
|
2016-03-06 22:54:04 -05:00
|
|
|
:v "t" (λ! (evil-ex-normal evil-visual-beginning evil-visual-end "\\t"))
|
2016-03-01 01:59:36 -05:00
|
|
|
:n "T" 'org-todo
|
|
|
|
:n "s" 'org-schedule
|
|
|
|
:n "r" 'org-refile
|
|
|
|
:n "R" (λ! (org-metaleft) (org-archive-to-archive-sibling)) ; archive to parent sibling
|
|
|
|
)
|
|
|
|
|
|
|
|
;; TODO Improve folding bindings
|
|
|
|
:n "za" 'org-cycle
|
|
|
|
:n "zA" 'org-shifttab
|
|
|
|
:n "zm" (λ! (outline-hide-sublevels 1))
|
|
|
|
:n "zr" 'outline-show-all
|
|
|
|
:n "zo" 'outline-show-subtree
|
|
|
|
:n "zO" 'outline-show-all
|
|
|
|
:n "zc" 'outline-hide-subtree
|
|
|
|
:n "zC" (λ! (outline-hide-sublevels 1))
|
|
|
|
:n "zd" (lambda (&optional arg) (interactive "p") (outline-hide-sublevels (or arg 3)))
|
|
|
|
|
|
|
|
:m "]]" (λ! (call-interactively 'org-forward-heading-same-level) (org-beginning-of-line))
|
|
|
|
:m "[[" (λ! (call-interactively 'org-backward-heading-same-level) (org-beginning-of-line))
|
|
|
|
:m "]l" 'org-next-link
|
|
|
|
:m "[l" 'org-previous-link
|
|
|
|
|
2016-05-20 22:37:30 -04:00
|
|
|
:n "RET" 'doom/org-dwim-at-point
|
2016-03-01 01:59:36 -05:00
|
|
|
|
|
|
|
:m "gh" 'outline-up-heading
|
|
|
|
:m "gj" 'org-forward-heading-same-level
|
|
|
|
:m "gk" 'org-backward-heading-same-level
|
|
|
|
:m "gl" (λ! (call-interactively 'outline-next-visible-heading) (show-children))
|
|
|
|
|
|
|
|
:n "go" 'org-open-at-point
|
|
|
|
:n "gO" (λ! (let ((org-link-frame-setup (append '((file . find-file-other-window)) org-link-frame-setup))
|
|
|
|
(org-file-apps '(("\\.org$" . emacs)
|
|
|
|
(t . "open \"%s\""))))
|
|
|
|
(call-interactively 'org-open-at-point)))
|
|
|
|
|
|
|
|
:n "gQ" 'org-fill-paragraph
|
|
|
|
:m "$" 'org-end-of-line
|
|
|
|
:m "^" 'org-beginning-of-line
|
|
|
|
:n "<" 'org-metaleft
|
|
|
|
:n ">" 'org-metaright
|
|
|
|
:v "<" (λ! (org-metaleft) (evil-visual-restore))
|
|
|
|
:v ">" (λ! (org-metaright) (evil-visual-restore))
|
|
|
|
:n "-" 'org-cycle-list-bullet
|
2016-08-21 16:53:38 +02:00
|
|
|
:m "<tab>" 'org-cycle)
|
2016-03-01 01:59:36 -05:00
|
|
|
|
|
|
|
(:map org-src-mode-map
|
|
|
|
:n "<escape>" (λ! (message "Exited") (org-edit-src-exit)))
|
|
|
|
|
|
|
|
(:after org-agenda
|
|
|
|
(:map org-agenda-mode-map
|
|
|
|
:e "<escape>" 'org-agenda-Quit
|
2016-05-08 18:29:57 -04:00
|
|
|
:e "m" 'org-agenda-month-view
|
2016-03-01 01:59:36 -05:00
|
|
|
:e "C-j" 'org-agenda-next-item
|
|
|
|
:e "C-k" 'org-agenda-previous-item
|
|
|
|
:e "C-n" 'org-agenda-next-item
|
|
|
|
:e "C-p" 'org-agenda-previous-item))))
|
|
|
|
|
|
|
|
(provide 'module-org)
|
|
|
|
;;; module-org.el ends here
|