2 ;; custom-set-variables was added by Custom.
3 ;; If you edit it by hand, you could mess it up, so be careful.
4 ;; Your init file should contain only one such instance.
5 ;; If there is more than one, they won't work right.
6 '(bibtex-user-optional-fields (quote (("annote" "Personal annotation (ignored)") ("abstract" "") ("pmid" "") ("doi" ""))))
7 '(calendar-latitude [33 57 north])
8 '(calendar-longitude [117 24 west])
10 '(confirm-kill-emacs (quote y-or-n-p))
11 '(cperl-lazy-help-time nil)
12 '(debian-changelog-mailing-address "don@debian.org")
14 '(display-time-24hr-format t)
15 '(display-time-day-and-date t)
16 '(display-time-mode t)
17 '(font-latex-fontify-script nil)
18 '(font-latex-fontify-sectioning (quote color))
19 '(font-latex-script-display (quote (nil)))
20 '(global-auto-revert-mode t)
21 '(global-font-lock-mode t nil (font-lock))
22 '(global-set-key "\347" t)
24 '(iswitchb-prompt-newbuffer nil)
25 '(log-edit-keep-buffer t)
26 '(mail-user-agent (quote sendmail-user-agent))
27 '(markdown-enable-math t)
28 '(markdown-follow-wiki-link-on-enter nil)
29 '(mutt-alias-file-list (quote ("~/.mutt/aliases" "~/.mail_aliases")))
30 '(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")))
31 '(post-email-address "don@donarmstrong.com")
32 '(post-kill-quoted-sig nil)
33 '(post-mail-message "mutt\\(ng\\|\\)-[a-z0-9]+-[0-9]+-.*")
34 '(post-uses-fill-mode nil)
35 '(ps-footer-font-size (quote (8 . 10)))
36 '(ps-header-font-size (quote (8 . 10)))
37 '(ps-header-title-font-size (quote (10 . 10)))
38 '(ps-line-number-color "blue")
40 '(ps-print-footer-frame nil)
41 '(ps-print-only-one-header t)
42 '(safe-local-variable-values (quote ((auto-save-default) (make-backup-files))))
43 '(sentence-end "[.?!][]\"')]*\\($\\| \\| \\)[
45 '(sentence-end-double-space nil)
47 '(tool-bar-mode nil nil (tool-bar))
48 '(user-mail-address "don@donarmstrong.com")
49 '(vc-delete-logbuf-window nil)
50 '(vc-follow-symlinks t))
51 (fset 'perl-mode 'cperl-mode)
52 ;;(load-file "cperl-mode.el")
53 (add-to-list 'load-path '"~/lib/emacs_el/")
54 (add-to-list 'load-path '"~/lib/emacs_el/tiny-tools/tiny")
55 (add-to-list 'load-path '"~/lib/emacs_el/tiny-tools/other")
56 ;;(add-to-list 'Tex-style-path '"~/lib/emacs_el/auctex/")
59 (require 'tinyprocmail)
65 ;;(require 'emacs-wiki)
69 (require 'google-weather)
70 (require 'org-google-weather)
71 (setq org-google-weather-format "%i %c, [%l,%h] %s %C")
74 (global-set-key "\C-xp" 'server-edit)
76 (setq auto-mode-alist (cons '("\.wml$" .
77 (lambda () (html-mode) (auto-fill-mode)))
80 ;; Use c-mode for perl .xs files
81 (add-to-list 'auto-mode-alist '("\\.xs\\'" . c-mode))
82 (add-to-list 'auto-mode-alist '("\\.\\([pP][Llm]\\|al\\)\\'" . cperl-mode))
83 (add-to-list 'interpreter-mode-alist '("perl" . cperl-mode))
84 (add-to-list 'interpreter-mode-alist '("perl5" . cperl-mode))
85 (add-to-list 'interpreter-mode-alist '("miniperl" . cperl-mode))
87 (add-to-list 'auto-mode-alist '("muttng-[a-z0-9]+-[0-9]+-" . post-mode))
88 (add-to-list 'auto-mode-alist '("muttngrc" . muttrc-mode))
90 (add-to-list 'auto-mode-alist '("mutt-[a-z0-9]+-[0-9]+-" . post-mode))
91 (add-to-list 'auto-mode-alist '("muttrc" . muttrc-mode))
93 (add-to-list 'auto-mode-alist '("\\.mdwn$" . markdown-mode))
97 (global-unset-key "\M-g")
98 (global-set-key "\M-g" 'goto-line)
100 ;;(autoload 'perl-mode "cperl-mode"
101 ;; "alternate mode for editing Perl programs" t)
103 ;; self-insert-command hack.
104 ;; Without this, "if<SP>" expands to
107 ;; which really should be,
112 ;; cperl-auto-newline t
113 ;; cperl-auto-newline-after-colon t
114 cperl-continued-statement-offset 4
115 cperl-brace-offset -4
116 cperl-label-offset -4
117 cperl-highlight-variables-indiscriminately t
118 cperl-electric-lbrace-space nil
120 (add-hook 'cperl-mode-hook (lambda () (cperl-set-style "PerlStyle")))
124 ;(load-library "php-mode")
126 (setq c-indent-level 8)
127 (setq c-brace-imaginary-offset 0)
128 (setq c-brace-offset -8)
129 (setq c-argdecl-indent 8)
130 (setq c-label-offset -8)
131 (setq c-continued-statement-offset 8)
132 (setq indent-tabs-mode nil)
136 ;; (autoload 'php-mode "php-mode" "PHP editing mode" t)
137 ;; (add-to-list 'auto-mode-alist '("\\.php3?\\'" . php-mode))
138 ;; (add-to-list 'auto-mode-alist '("\\.phtml?\\'" . php-mode))
139 ;; (add-to-list 'auto-mode-alist '("\\.php?\\'" . php-mode))
140 ;; (add-to-list 'auto-mode-alist '("\\.php4?\\'" . php-mode))
142 ;; REFTEX (much enhanced management of cross-ref, labels, etc)
143 ;; http://www.strw.leidenuniv.nl/~dominik/Tools/reftex/
144 (autoload 'reftex-mode "reftex" "RefTeX Minor Mode" t)
145 (autoload 'turn-on-reftex "reftex" "RefTeX Minor Mode" nil)
146 (autoload 'reftex-citation "reftex-cite" "Make citation" nil)
147 (autoload 'reftex-index-phrase-mode "reftex-index" "Phrase mode" t)
148 (add-hook 'LaTeX-mode-hook 'turn-on-reftex) ; with AUCTeX LaTeX mode
149 (add-hook 'latex-mode-hook 'turn-on-reftex) ; with Emacs latex mode
150 (add-hook 'LaTeX-mode-hook 'outline-minor-mode) ; with AUCTeX LaTeX mode
151 (add-hook 'latex-mode-hook 'outline-minor-mode) ; with Emacs latex mode
153 ;; (TeX-add-style-hook
158 ;; (custom-set-variables
159 ;; '(font-latex-user-keyword-classes
162 ;; font-lock-function-name-face 2 (command 1 t))))
165 (require 'font-latex)
166 (add-to-list 'font-latex-match-reference-keywords "fref")
167 (add-to-list 'font-latex-match-reference-keywords "Fref")
168 (add-to-list 'font-latex-match-reference-keywords "citep")
169 (add-to-list 'font-latex-match-reference-keywords "citet")
170 (font-latex-match-reference-make)
171 (add-to-list 'font-latex-match-function-keywords "DLA")
172 (add-to-list 'font-latex-match-function-keywords "RZ")
173 (add-to-list 'font-latex-match-function-keywords "OM")
174 (add-to-list 'font-latex-match-function-keywords "DL")
175 (add-to-list 'font-latex-match-function-keywords "fixme")
176 (add-to-list 'font-latex-match-function-keywords "acs")
177 (add-to-list 'font-latex-match-function-keywords "acsp")
178 (add-to-list 'font-latex-match-function-keywords "ac")
179 (add-to-list 'font-latex-match-function-keywords "acp")
180 (add-to-list 'font-latex-match-function-keywords "acl")
181 (add-to-list 'font-latex-match-function-keywords "aclp")
182 (add-to-list 'font-latex-match-function-keywords "acsu")
183 (add-to-list 'font-latex-match-function-keywords "aclu")
184 (add-to-list 'font-latex-match-function-keywords "acused")
185 (font-latex-match-function-make)
186 (setq TeX-parse-self t)
187 (setq TeX-auto-save t)
188 (setq-default TeX-master nil)
190 (defun insert-date ()
191 "Insert date at point."
193 (insert (format-time-string "%A, %B %e, %Y %k:%M:%S %Z")))
194 (global-set-key "\C-[d" 'insert-date)
196 (defun unfill-paragraph (arg)
197 "Pull this whole paragraph up onto one line."
199 (let ((fill-column 10000))
200 (fill-paragraph arg))
203 ;(iswitchb-default-keybindings)
205 (column-number-mode t)
206 (setq reftex-plug-into-AUCTeX t)
210 (require 'mode-compile)
212 (setq reftex-default-bibliography
215 (defadvice server-process-filter (after post-mode-message first activate)
216 "If the buffer is in post mode, overwrite the server-edit
217 message with a post-save-current-buffer-and-exit message."
218 (if (eq major-mode 'post-mode)
220 (substitute-command-keys "Type \\[describe-mode] for help composing; \\[post-save-current-buffer-and-exit] when done."))))
221 ; This is also needed to see the magic message. Set to a higher
222 ; number if you have a faster computer or read slower than me.
223 '(font-lock-verbose 1000)
224 ;(setq server-temp-file-regexp "mutt\(-\|ng-\)")
225 ; (add-hook 'server-switch-hook
226 ; (function (lambda()
227 ; (cond ((string-match "Post" mode-name)
229 ; set-buffer-file-coding-system 'utf-8
233 (add-hook 'post-mode-hook
237 (fset 'insert-function-documentation
238 [?\C-x ?i home ?\C-k ?/ ?h ?o ?m ?e ?/ ?d ?o ?n ?/ ?l ?i ?b ?/ ?t ?e ?m ?p ?l ?a ?t ?e ?s ?/ ?p ?e ?r ?l ?_ ?f ?u ?n ?c ?t ?i ?o ?n ?_ ?d ?o ?c ?u ?m ?e ?n ?t ?a ?t ?i ?o ?n return])
239 (global-set-key "\M-f" 'insert-function-documentation)
241 (eval-after-load "lilypond-mode"
243 (load-library "lyqi-mode")
244 (define-key LilyPond-mode-map "\C-cq" 'lyqi-mode)))
246 (autoload 'spamassassin-mode "spamassassin-mode" nil t)
248 (desktop-load-default)
252 ;; custom-set-faces was added by Custom.
253 ;; If you edit it by hand, you could mess it up, so be careful.
254 ;; Your init file should contain only one such instance.
255 ;; If there is more than one, they won't work right.
256 '(menu ((((type x-toolkit)) (:background "black" :foreground "grey90")))))
258 (defun ess-change-directory (path)
259 "Set the current working directory to PATH for both *R* and Emacs."
260 (interactive "DDirectory to change to: ")
262 (when (file-exists-p path)
263 (ess-command (concat "setwd(\"" path "\")\n"))
264 ;; use file-name-as-directory to ensure it has trailing /
265 (setq default-directory (file-name-as-directory path))))
267 (put 'upcase-region 'disabled nil)
269 (put 'downcase-region 'disabled nil)
271 ;; The following lines are always needed. Choose your own keys.
272 (add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))
273 (add-hook 'org-mode-hook 'turn-on-font-lock) ; not needed when global-font-lock-mode is on
274 (global-set-key "\C-cl" 'org-store-link)
275 (global-set-key "\C-ca" 'org-agenda)
276 (global-set-key "\C-cb" 'org-iswitchb)
277 (setq org-log-done 'time)
278 (setq org-log-done 'note)
279 (setq org-agenda-ndays 5)
282 (autoload 'flyspell-mode "flyspell" "On-the-fly spelling checker." t)
283 (add-hook 'message-mode-hook 'turn-on-flyspell)
284 (add-hook 'text-mode-hook 'turn-on-flyspell)
285 (add-hook 'c-mode-common-hook 'flyspell-prog-mode)
286 (add-hook 'cperl-mode-hook 'flyspell-prog-mode)
287 (add-hook 'tcl-mode-hook 'flyspell-prog-mode)
288 (add-hook 'ess-mode-hook 'flyspell-prog-mode)
289 (defun turn-on-flyspell ()
290 "Force flyspell-mode on using a positive arg. For use in hooks."
294 ;;; outlining support for ess modes
295 (add-hook 'ess-mode-hook
298 (setq outline-regexp "\\(^#\\{4,5\\} \\)\\|\\(^[a-zA-Z0-9_\.]+ ?<- ?function(.*{\\)")
300 (lambda () (interactive) (cond ((looking-at "^##### ") 1)((looking-at "^#### ") 2)((looking-at "^[a-zA-Z0-9_\.]+ ?<- ?function(.*{") 3) (t 1000)))
303 ; Outline-minor-mode key map
304 (define-prefix-command 'cm-map nil "Outline-")
306 (define-key cm-map "q" 'hide-sublevels) ; Hide everything but the top-level headings
307 (define-key cm-map "t" 'hide-body) ; Hide everything but headings (all body lines)
308 (define-key cm-map "o" 'hide-other) ; Hide other branches
309 (define-key cm-map "c" 'hide-entry) ; Hide this entry's body
310 (define-key cm-map "l" 'hide-leaves) ; Hide body lines in this entry and sub-entries
311 (define-key cm-map "d" 'hide-subtree) ; Hide everything in this entry and sub-entries
313 (define-key cm-map "a" 'show-all) ; Show (expand) everything
314 (define-key cm-map "e" 'show-entry) ; Show this heading's body
315 (define-key cm-map "i" 'show-children) ; Show this heading's immediate child sub-headings
316 (define-key cm-map "k" 'show-branches) ; Show all sub-headings under this heading
317 (define-key cm-map "s" 'show-subtree) ; Show (expand) everything in this heading & below
319 (define-key cm-map "u" 'outline-up-heading) ; Up
320 (define-key cm-map "n" 'outline-next-visible-heading) ; Next
321 (define-key cm-map "p" 'outline-previous-visible-heading) ; Previous
322 (define-key cm-map "f" 'outline-forward-same-level) ; Forward - same level
323 (define-key cm-map "b" 'outline-backward-same-level) ; Backward - same level
324 (global-set-key "\M-o" cm-map)
326 (defun my-org-mode-setup ()
327 (when (and (buffer-file-name)
328 (file-exists-p (buffer-file-name)))
329 (load-library "reftex")
330 (and (buffer-file-name)
331 (file-exists-p (buffer-file-name))
333 (reftex-set-cite-format
334 '((?b . "[[bib::%l]]")
335 (?n . "[[note::%l]]"))))
336 (define-key org-mode-map "\C-c\C-g" 'reftex-citation)
338 (add-hook 'org-mode-hook 'my-org-mode-setup)
340 (setq org-mobile-directory "/rzlab.ucr.edu:/sites/dav.donarmstrong.com/root/org/")
341 (setq org-directory "/home/don/org-mode/")
342 (setq org-mobile-inbox-for-pull "/home/don/org-mode/from-mobile.org")