X-Git-Url: https://git.donarmstrong.com/?p=home-base.git;a=blobdiff_plain;f=.emacs;h=97abbe2ab791db88b65c7a32c0aa67b44f35b7bf;hp=e8dd095802fa631ee2c93f2a37ea6375a43faab5;hb=831ed8a318b3f6c5e39cb52b42f211f73f23785b;hpb=d05b7a52f56a137ab358d3d74eace25df90ff698 diff --git a/.emacs b/.emacs index e8dd095..97abbe2 100644 --- a/.emacs +++ b/.emacs @@ -24,8 +24,10 @@ '(iswitchb-prompt-newbuffer nil) '(log-edit-keep-buffer t) '(mail-user-agent (quote sendmail-user-agent)) + '(markdown-enable-math t) + '(markdown-follow-wiki-link-on-enter nil) '(mutt-alias-file-list (quote ("~/.mutt/aliases" "~/.mail_aliases"))) - '(org-agenda-files (quote ("~/projects/notes/notes.org" "~/projects/origins_of_life/paper/figure_list.org" "~/projects/origins_of_life/notes.org" "~/projects/sysadmin/sndservers/notes.org"))) + '(org-agenda-files (quote ("~/projects/debbugs/notes.org" "~/projects/notes/notes.org" "~/projects/origins_of_life/paper/figure_list.org" "~/projects/origins_of_life/ool.org" "~/projects/sysadmin/sndservers/sndservers.org" "~/projects/chaim/chaim.org" "~/projects/fh/fh.org" "~/projects/notes/library_books.org"))) '(post-email-address "don@donarmstrong.com") '(post-kill-quoted-sig nil) '(post-mail-message "mutt\\(ng\\|\\)-[a-z0-9]+-[0-9]+-.*") @@ -43,7 +45,9 @@ '(sentence-end-double-space nil) '(show-paren-mode t) '(tool-bar-mode nil nil (tool-bar)) - '(user-mail-address "don@donarmstrong.com")) + '(user-mail-address "don@donarmstrong.com") + '(vc-delete-logbuf-window nil) + '(vc-follow-symlinks t)) (fset 'perl-mode 'cperl-mode) ;;(load-file "cperl-mode.el") (add-to-list 'load-path '"~/lib/emacs_el/") @@ -64,6 +68,8 @@ ;;(require 'fixme) (require 'google-weather) (require 'org-google-weather) +(setq org-google-weather-format "%i %c, [%l,%h] %s %C") + (global-set-key "\C-xp" 'server-edit) @@ -84,6 +90,9 @@ (add-to-list 'auto-mode-alist '("mutt-[a-z0-9]+-[0-9]+-" . post-mode)) (add-to-list 'auto-mode-alist '("muttrc" . muttrc-mode)) +(add-to-list 'auto-mode-alist '("\\.mdwn$" . markdown-mode)) + + (global-unset-key "\M-g") (global-set-key "\M-g" 'goto-line) @@ -161,6 +170,8 @@ (font-latex-match-reference-make) (add-to-list 'font-latex-match-function-keywords "DLA") (add-to-list 'font-latex-match-function-keywords "RZ") +(add-to-list 'font-latex-match-function-keywords "OM") +(add-to-list 'font-latex-match-function-keywords "DL") (add-to-list 'font-latex-match-function-keywords "fixme") (add-to-list 'font-latex-match-function-keywords "acs") (add-to-list 'font-latex-match-function-keywords "acsp") @@ -264,4 +275,68 @@ (global-set-key "\C-ca" 'org-agenda) (global-set-key "\C-cb" 'org-iswitchb) (setq org-log-done 'time) -(setq org-log-done 'note) \ No newline at end of file +(setq org-log-done 'note) +(setq org-agenda-ndays 5) + + +(autoload 'flyspell-mode "flyspell" "On-the-fly spelling checker." t) +(add-hook 'message-mode-hook 'turn-on-flyspell) +(add-hook 'text-mode-hook 'turn-on-flyspell) +(add-hook 'c-mode-common-hook 'flyspell-prog-mode) +(add-hook 'cperl-mode-hook 'flyspell-prog-mode) +(add-hook 'tcl-mode-hook 'flyspell-prog-mode) +(add-hook 'ess-mode-hook 'flyspell-prog-mode) +(defun turn-on-flyspell () + "Force flyspell-mode on using a positive arg. For use in hooks." + (interactive) + (flyspell-mode 1)) + +;;; outlining support for ess modes +(add-hook 'ess-mode-hook + '(lambda () + (outline-minor-mode) + (setq outline-regexp "\\(^#\\{4,5\\} \\)\\|\\(^[a-zA-Z0-9_\.]+ ?<- ?function(.*{\\)") + (defun outline-level + (lambda () (interactive) (cond ((looking-at "^##### ") 1)((looking-at "^#### ") 2)((looking-at "^[a-zA-Z0-9_\.]+ ?<- ?function(.*{") 3) (t 1000))) + ))) + + ; Outline-minor-mode key map + (define-prefix-command 'cm-map nil "Outline-") + ; HIDE + (define-key cm-map "q" 'hide-sublevels) ; Hide everything but the top-level headings + (define-key cm-map "t" 'hide-body) ; Hide everything but headings (all body lines) + (define-key cm-map "o" 'hide-other) ; Hide other branches + (define-key cm-map "c" 'hide-entry) ; Hide this entry's body + (define-key cm-map "l" 'hide-leaves) ; Hide body lines in this entry and sub-entries + (define-key cm-map "d" 'hide-subtree) ; Hide everything in this entry and sub-entries + ; SHOW + (define-key cm-map "a" 'show-all) ; Show (expand) everything + (define-key cm-map "e" 'show-entry) ; Show this heading's body + (define-key cm-map "i" 'show-children) ; Show this heading's immediate child sub-headings + (define-key cm-map "k" 'show-branches) ; Show all sub-headings under this heading + (define-key cm-map "s" 'show-subtree) ; Show (expand) everything in this heading & below + ; MOVE + (define-key cm-map "u" 'outline-up-heading) ; Up + (define-key cm-map "n" 'outline-next-visible-heading) ; Next + (define-key cm-map "p" 'outline-previous-visible-heading) ; Previous + (define-key cm-map "f" 'outline-forward-same-level) ; Forward - same level + (define-key cm-map "b" 'outline-backward-same-level) ; Backward - same level + (global-set-key "\M-o" cm-map) + +(defun my-org-mode-setup () + (when (and (buffer-file-name) + (file-exists-p (buffer-file-name))) + (load-library "reftex") + (and (buffer-file-name) + (file-exists-p (buffer-file-name)) + (reftex-parse-all)) + (reftex-set-cite-format + '((?b . "[[bib::%l]]") + (?n . "[[note::%l]]")))) + (define-key org-mode-map "\C-c\C-g" 'reftex-citation) +) +(add-hook 'org-mode-hook 'my-org-mode-setup) + +(setq org-mobile-directory "/rzlab.ucr.edu:/sites/dav.donarmstrong.com/root/org/") +(setq org-directory "/home/don/org-mode/") +(setq org-mobile-inbox-for-pull "/home/don/org-mode/from-mobile.org")