Moved org-mode settings together
This commit is contained in:
parent
9873823e76
commit
8735e338f9
2 changed files with 36 additions and 38 deletions
|
@ -185,10 +185,6 @@ Currently adds | & ! . + = - / % * , < > ? : ->"
|
||||||
(whitespace-mode)
|
(whitespace-mode)
|
||||||
(auto-fill-mode))
|
(auto-fill-mode))
|
||||||
|
|
||||||
(defun on-org-mode ()
|
|
||||||
(flyspell-mode 1)
|
|
||||||
(auto-fill-mode 1))
|
|
||||||
|
|
||||||
(defun on-php-mode ()
|
(defun on-php-mode ()
|
||||||
(local-set-key [f6] 'comment-line))
|
(local-set-key [f6] 'comment-line))
|
||||||
|
|
||||||
|
|
70
emacs.el
70
emacs.el
|
@ -22,6 +22,42 @@
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(set-column-markers 76 81)))
|
(set-column-markers 76 81)))
|
||||||
|
|
||||||
|
;; Org mode
|
||||||
|
(require 'org-crypt)
|
||||||
|
(require 'org-publish)
|
||||||
|
(setq
|
||||||
|
org-tags-exclude-from-inheritance '("crypt")
|
||||||
|
org-crypt-key "33E8CC1CC4"
|
||||||
|
org-use-fast-todo-selection t
|
||||||
|
org-default-notes-file (concat org-directory
|
||||||
|
"/notes.org")
|
||||||
|
org-outline-path-complete-in-steps t
|
||||||
|
org-return-follows-link t
|
||||||
|
org-log-into-drawer t
|
||||||
|
org-todo-keywords '((sequence "TODO(t)"
|
||||||
|
"IN PROGRESS(p)"
|
||||||
|
"WAITING(w@/!)"
|
||||||
|
"|"
|
||||||
|
"DONE(d!/!)"
|
||||||
|
"CANCELLED(c@/!)"))
|
||||||
|
org-refile-targets '((org-agenda-files :maxlevel . 5)
|
||||||
|
(nil :maxlevel . 5))
|
||||||
|
org-todo-keyword-faces
|
||||||
|
'(("TODO" :foreground "red" :weight bold)
|
||||||
|
("IN PROGRESS" :foreground "yellow" :weight bold)
|
||||||
|
("DONE" :foreground "forest green" :weight bold)
|
||||||
|
("WAITING" :foreground "orange" :weight bold)
|
||||||
|
("CANCELLED" :foreground "orangered" :weight bold)))
|
||||||
|
(add-to-list 'auto-mode-alist '("\\.commitmsg$" . org-mode))
|
||||||
|
(global-set-key "\C-cl" 'org-store-link)
|
||||||
|
(global-set-key "\C-cc" 'org-capture)
|
||||||
|
(global-set-key "\C-ca" 'org-agenda)
|
||||||
|
(add-hook 'org-mode-hook
|
||||||
|
(lambda ()
|
||||||
|
(flyspell-mode t)
|
||||||
|
(auto-fill-mode t)))
|
||||||
|
(org-crypt-use-before-save-magic)
|
||||||
|
|
||||||
(add-to-list 'load-path "~/.emacs.d/elisp/markdown-mode")
|
(add-to-list 'load-path "~/.emacs.d/elisp/markdown-mode")
|
||||||
(add-to-list 'load-path "~/.emacs.d/elisp/git-commit-mode")
|
(add-to-list 'load-path "~/.emacs.d/elisp/git-commit-mode")
|
||||||
(add-to-list 'load-path "~/.emacs.d/elisp/lua-mode")
|
(add-to-list 'load-path "~/.emacs.d/elisp/lua-mode")
|
||||||
|
@ -30,11 +66,9 @@
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;; REQUIRES ;;
|
;; REQUIRES ;;
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
(require 'org-crypt)
|
|
||||||
(require 'rainbow-delimiters)
|
(require 'rainbow-delimiters)
|
||||||
(require 'uniquify)
|
(require 'uniquify)
|
||||||
(require 'server)
|
(require 'server)
|
||||||
(require 'org-publish)
|
|
||||||
(require 'htmlize)
|
(require 'htmlize)
|
||||||
(require 'git)
|
(require 'git)
|
||||||
|
|
||||||
|
@ -87,19 +121,12 @@
|
||||||
(setq browse-url-generic-program (getenv "BROWSER"))
|
(setq browse-url-generic-program (getenv "BROWSER"))
|
||||||
(setq whitespace-style '(face trailing)) ; For use with markdown mode
|
(setq whitespace-style '(face trailing)) ; For use with markdown mode
|
||||||
(setq uniquify-buffer-name-style 'reverse)
|
(setq uniquify-buffer-name-style 'reverse)
|
||||||
(setq org-tags-exclude-from-inheritance '("crypt"))
|
|
||||||
(setq org-crypt-key "33E8CC1CC4")
|
|
||||||
(setq org-use-fast-todo-selection t)
|
|
||||||
(setq org-default-notes-file (concat org-directory "/notes.org"))
|
|
||||||
(setq jit-lock-defer-time 0.2) ; Don't fontlock immediately
|
(setq jit-lock-defer-time 0.2) ; Don't fontlock immediately
|
||||||
(setq htmlize-output-type 'inline-css)
|
(setq htmlize-output-type 'inline-css)
|
||||||
(setq ido-save-directory-list-file nil)
|
(setq ido-save-directory-list-file nil)
|
||||||
(setq ido-auto-merge-delay-time 2) ; Wait before fixing names
|
(setq ido-auto-merge-delay-time 2) ; Wait before fixing names
|
||||||
(setq org-outline-path-complete-in-steps t)
|
|
||||||
(setq org-return-follows-link t)
|
|
||||||
(setq mouse-autoselect-window t)
|
(setq mouse-autoselect-window t)
|
||||||
(setq pop-up-windows nil)
|
(setq pop-up-windows nil)
|
||||||
(setq org-log-into-drawer t)
|
|
||||||
(setq mail-header-separator "")
|
(setq mail-header-separator "")
|
||||||
|
|
||||||
(setq frame-title-format ; I don't like emacs@cloud, must have file
|
(setq frame-title-format ; I don't like emacs@cloud, must have file
|
||||||
|
@ -115,25 +142,6 @@
|
||||||
(setq default-frame-alist ; default frame settings
|
(setq default-frame-alist ; default frame settings
|
||||||
(append '((font . "DejaVu Sans Mono-10:antialias=true"))))
|
(append '((font . "DejaVu Sans Mono-10:antialias=true"))))
|
||||||
|
|
||||||
(setq org-todo-keywords
|
|
||||||
'((sequence "TODO(t)"
|
|
||||||
"IN PROGRESS(p)"
|
|
||||||
"WAITING(w@/!)"
|
|
||||||
"|"
|
|
||||||
"DONE(d!/!)"
|
|
||||||
"CANCELLED(c@/!)")))
|
|
||||||
|
|
||||||
(setq org-refile-targets
|
|
||||||
'((org-agenda-files :maxlevel . 5)
|
|
||||||
(nil :maxlevel . 5)))
|
|
||||||
|
|
||||||
(setq org-todo-keyword-faces
|
|
||||||
'(("TODO" :foreground "red" :weight bold)
|
|
||||||
("IN PROGRESS" :foreground "yellow" :weight bold)
|
|
||||||
("DONE" :foreground "forest green" :weight bold)
|
|
||||||
("WAITING" :foreground "orange" :weight bold)
|
|
||||||
("CANCELLED" :foreground "orangered" :weight bold)))
|
|
||||||
|
|
||||||
(if window-system
|
(if window-system
|
||||||
(x-init)
|
(x-init)
|
||||||
(cli-init))
|
(cli-init))
|
||||||
|
@ -169,7 +177,6 @@
|
||||||
(add-to-list 'auto-mode-alist '("\\.css$" . css-mode))
|
(add-to-list 'auto-mode-alist '("\\.css$" . css-mode))
|
||||||
(add-to-list 'auto-mode-alist '("stumpwmrc" . stumpwm-mode))
|
(add-to-list 'auto-mode-alist '("stumpwmrc" . stumpwm-mode))
|
||||||
(add-to-list 'auto-mode-alist '("\\.go$" . go-mode))
|
(add-to-list 'auto-mode-alist '("\\.go$" . go-mode))
|
||||||
(add-to-list 'auto-mode-alist '("\\.commitmsg$" . org-mode))
|
|
||||||
(add-to-list 'auto-mode-alist '(".*mutt.*" . message-mode))
|
(add-to-list 'auto-mode-alist '(".*mutt.*" . message-mode))
|
||||||
(add-to-list 'auto-mode-alist '("COMMIT_EDITMSG$" . git-commit-mode))
|
(add-to-list 'auto-mode-alist '("COMMIT_EDITMSG$" . git-commit-mode))
|
||||||
|
|
||||||
|
@ -181,9 +188,6 @@
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
(global-set-key "\C-m" 'newline-and-indent)
|
(global-set-key "\C-m" 'newline-and-indent)
|
||||||
(global-set-key (kbd "C-x n r") 'narrow-to-region)
|
(global-set-key (kbd "C-x n r") 'narrow-to-region)
|
||||||
(global-set-key "\C-cl" 'org-store-link)
|
|
||||||
(global-set-key "\C-cc" 'org-capture)
|
|
||||||
(global-set-key "\C-ca" 'org-agenda)
|
|
||||||
(global-set-key [f5] '(lambda ()
|
(global-set-key [f5] '(lambda ()
|
||||||
(interactive)
|
(interactive)
|
||||||
(revert-buffer nil t nil)))
|
(revert-buffer nil t nil)))
|
||||||
|
@ -201,7 +205,6 @@
|
||||||
(add-hook 'c-mode-hook 'on-c-mode)
|
(add-hook 'c-mode-hook 'on-c-mode)
|
||||||
(add-hook 'html-mode-hook 'on-html-mode)
|
(add-hook 'html-mode-hook 'on-html-mode)
|
||||||
(add-hook 'markdown-mode-hook 'on-markdown-mode)
|
(add-hook 'markdown-mode-hook 'on-markdown-mode)
|
||||||
(add-hook 'org-mode-hook 'on-org-mode)
|
|
||||||
(add-hook 'php-mode-hook 'on-php-mode)
|
(add-hook 'php-mode-hook 'on-php-mode)
|
||||||
(add-hook 'message-mode-hook 'on-mail-mode)
|
(add-hook 'message-mode-hook 'on-mail-mode)
|
||||||
(add-hook 'git-commit-mode-hook 'auto-fill-mode)
|
(add-hook 'git-commit-mode-hook 'auto-fill-mode)
|
||||||
|
@ -303,7 +306,6 @@
|
||||||
"?>\n"
|
"?>\n"
|
||||||
'(indent-region (point-min) (point-max)))
|
'(indent-region (point-min) (point-max)))
|
||||||
|
|
||||||
(org-crypt-use-before-save-magic)
|
|
||||||
(ad-activate 'server-create-window-system-frame)
|
(ad-activate 'server-create-window-system-frame)
|
||||||
(add-php-keywords)
|
(add-php-keywords)
|
||||||
(add-html-keywords)
|
(add-html-keywords)
|
||||||
|
|
Loading…
Reference in a new issue