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/")
58 (setq tinyprocmail--procmail-version "v3.22")
59 (add-hook 'tinyprocmail--load-hook 'tinyprocmail-install)
60 (require 'tinyprocmail)
66 ;;(require 'emacs-wiki)
70 (require 'google-weather)
71 (require 'org-google-weather)
72 (setq-default org-google-weather-format "%i %c, [%l,%h] %s %C")
75 (global-set-key "\C-xp" 'server-edit)
77 (setq-default auto-mode-alist (cons '("\.wml$" .
78 (lambda () (html-mode) (auto-fill-mode)))
81 ;; Use c-mode for perl .xs files
82 (add-to-list 'auto-mode-alist '("\\.xs\\'" . c-mode))
83 (add-to-list 'auto-mode-alist '("\\.\\([pP][Llm]\\|al\\)\\'" . cperl-mode))
84 (add-to-list 'interpreter-mode-alist '("perl" . cperl-mode))
85 (add-to-list 'interpreter-mode-alist '("perl5" . cperl-mode))
86 (add-to-list 'interpreter-mode-alist '("miniperl" . cperl-mode))
88 (add-to-list 'auto-mode-alist '("muttng-[a-z0-9]+-[0-9]+-" . post-mode))
89 (add-to-list 'auto-mode-alist '("muttngrc" . muttrc-mode))
91 (add-to-list 'auto-mode-alist '("mutt-[a-z0-9]+-[0-9]+-" . post-mode))
92 (add-to-list 'auto-mode-alist '("muttrc" . muttrc-mode))
94 (add-to-list 'auto-mode-alist '("\\.mdwn$" . markdown-mode))
98 (global-unset-key "\M-g")
99 (global-set-key "\M-g" 'goto-line)
101 ;;(autoload 'perl-mode "cperl-mode"
102 ;; "alternate mode for editing Perl programs" t)
104 ;; self-insert-command hack.
105 ;; Without this, "if<SP>" expands to
108 ;; which really should be,
111 (setq-default cperl-hairy t
113 ;; cperl-auto-newline t
114 ;; cperl-auto-newline-after-colon t
115 cperl-continued-statement-offset 4
116 cperl-brace-offset -4
117 cperl-label-offset -4
118 cperl-highlight-variables-indiscriminately t
119 cperl-electric-lbrace-space nil
121 (add-hook 'cperl-mode-hook (lambda () (cperl-set-style "PerlStyle")))
125 ;(load-library "php-mode")
127 (setq-default c-indent-level 8)
128 (setq-default c-brace-imaginary-offset 0)
129 (setq-default c-brace-offset -8)
130 (setq-default c-argdecl-indent 8)
131 (setq-default c-label-offset -8)
132 (setq-default c-continued-statement-offset 8)
134 (setq-default indent-tabs-mode nil)
135 (setq-default tab-width 8)
138 ;; (autoload 'php-mode "php-mode" "PHP editing mode" t)
139 ;; (add-to-list 'auto-mode-alist '("\\.php3?\\'" . php-mode))
140 ;; (add-to-list 'auto-mode-alist '("\\.phtml?\\'" . php-mode))
141 ;; (add-to-list 'auto-mode-alist '("\\.php?\\'" . php-mode))
142 ;; (add-to-list 'auto-mode-alist '("\\.php4?\\'" . php-mode))
144 ;; REFTEX (much enhanced management of cross-ref, labels, etc)
145 ;; http://www.strw.leidenuniv.nl/~dominik/Tools/reftex/
146 (autoload 'reftex-mode "reftex" "RefTeX Minor Mode" t)
147 (autoload 'turn-on-reftex "reftex" "RefTeX Minor Mode" nil)
148 (autoload 'reftex-citation "reftex-cite" "Make citation" nil)
149 (autoload 'reftex-index-phrase-mode "reftex-index" "Phrase mode" t)
150 (add-hook 'LaTeX-mode-hook 'turn-on-reftex) ; with AUCTeX LaTeX mode
151 (add-hook 'latex-mode-hook 'turn-on-reftex) ; with Emacs latex mode
152 (add-hook 'LaTeX-mode-hook 'outline-minor-mode) ; with AUCTeX LaTeX mode
153 (add-hook 'latex-mode-hook 'outline-minor-mode) ; with Emacs latex mode
155 ;; (TeX-add-style-hook
160 ;; (custom-set-variables
161 ;; '(font-latex-user-keyword-classes
164 ;; font-lock-function-name-face 2 (command 1 t))))
167 (require 'font-latex)
168 (add-to-list 'font-latex-match-reference-keywords "fref")
169 (add-to-list 'font-latex-match-reference-keywords "Fref")
170 (add-to-list 'font-latex-match-reference-keywords "citep")
171 (add-to-list 'font-latex-match-reference-keywords "citet")
172 (font-latex-match-reference-make)
173 (add-to-list 'font-latex-match-function-keywords "DLA")
174 (add-to-list 'font-latex-match-function-keywords "RZ")
175 (add-to-list 'font-latex-match-function-keywords "OM")
176 (add-to-list 'font-latex-match-function-keywords "DL")
177 (add-to-list 'font-latex-match-function-keywords "fixme")
178 (add-to-list 'font-latex-match-function-keywords "acs")
179 (add-to-list 'font-latex-match-function-keywords "acsp")
180 (add-to-list 'font-latex-match-function-keywords "ac")
181 (add-to-list 'font-latex-match-function-keywords "acp")
182 (add-to-list 'font-latex-match-function-keywords "acl")
183 (add-to-list 'font-latex-match-function-keywords "aclp")
184 (add-to-list 'font-latex-match-function-keywords "acsu")
185 (add-to-list 'font-latex-match-function-keywords "aclu")
186 (add-to-list 'font-latex-match-function-keywords "acused")
187 (font-latex-match-function-make)
188 (setq-default TeX-parse-self t)
189 (setq-default TeX-auto-save t)
190 (setq-default TeX-master nil)
192 (defun insert-date ()
193 "Insert date at point."
195 (insert (format-time-string "%A, %B %e, %Y %k:%M:%S %Z")))
196 (global-set-key "\C-[d" 'insert-date)
198 (defun unfill-paragraph (arg)
199 "Pull this whole paragraph up onto one line."
201 (let ((fill-column 10000))
202 (fill-paragraph arg))
205 ;(iswitchb-default-keybindings)
207 (column-number-mode t)
208 (setq-default reftex-plug-into-AUCTeX t)
212 (require 'mode-compile)
214 (setq-default reftex-default-bibliography
217 (defadvice server-process-filter (after post-mode-message first activate)
218 "If the buffer is in post mode, overwrite the server-edit
219 message with a post-save-current-buffer-and-exit message."
220 (if (eq major-mode 'post-mode)
222 (substitute-command-keys "Type \\[describe-mode] for help composing; \\[post-save-current-buffer-and-exit] when done."))))
223 ; This is also needed to see the magic message. Set to a higher
224 ; number if you have a faster computer or read slower than me.
225 '(font-lock-verbose 1000)
226 ;(setq-default server-temp-file-regexp "mutt\(-\|ng-\)")
227 ; (add-hook 'server-switch-hook
228 ; (function (lambda()
229 ; (cond ((string-match "Post" mode-name)
231 ; set-buffer-file-coding-system 'utf-8
235 (add-hook 'post-mode-hook
239 (fset 'insert-function-documentation
240 [?\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])
241 (global-set-key "\M-f" 'insert-function-documentation)
243 (eval-after-load "lilypond-mode"
245 (load-library "lyqi-mode")
246 (define-key LilyPond-mode-map "\C-cq" 'lyqi-mode)))
248 (autoload 'spamassassin-mode "spamassassin-mode" nil t)
250 (desktop-load-default)
254 ;; custom-set-faces was added by Custom.
255 ;; If you edit it by hand, you could mess it up, so be careful.
256 ;; Your init file should contain only one such instance.
257 ;; If there is more than one, they won't work right.
258 '(menu ((((type x-toolkit)) (:background "black" :foreground "grey90")))))
260 (defun ess-change-directory (path)
261 "Set the current working directory to PATH for both *R* and Emacs."
262 (interactive "DDirectory to change to: ")
264 (when (file-exists-p path)
265 (ess-command (concat "setwd(\"" path "\")\n"))
266 ;; use file-name-as-directory to ensure it has trailing /
267 (setq default-directory (file-name-as-directory path))))
269 (put 'upcase-region 'disabled nil)
271 (put 'downcase-region 'disabled nil)
273 ;; The following lines are always needed. Choose your own keys.
274 (add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))
275 (add-hook 'org-mode-hook 'turn-on-font-lock) ; not needed when global-font-lock-mode is on
276 (global-set-key "\C-cl" 'org-store-link)
277 (global-set-key "\C-ca" 'org-agenda)
278 (global-set-key "\C-cb" 'org-iswitchb)
279 (setq-default org-log-done 'time)
280 (setq-default org-agenda-ndays 5)
283 (autoload 'flyspell-mode "flyspell" "On-the-fly spelling checker." t)
284 (add-hook 'message-mode-hook 'turn-on-flyspell)
285 (add-hook 'text-mode-hook 'turn-on-flyspell)
286 (add-hook 'c-mode-common-hook 'flyspell-prog-mode)
287 (add-hook 'cperl-mode-hook 'flyspell-prog-mode)
288 (add-hook 'tcl-mode-hook 'flyspell-prog-mode)
289 (add-hook 'ess-mode-hook 'flyspell-prog-mode)
290 (defun turn-on-flyspell ()
291 "Force flyspell-mode on using a positive arg. For use in hooks."
295 ;;; outlining support for ess modes
296 (add-hook 'ess-mode-hook
299 (setq outline-regexp "\\(^#\\{4,5\\} \\)\\|\\(^[a-zA-Z0-9_\.]+ ?<- ?function(.*{\\)")
301 (lambda () (interactive) (cond ((looking-at "^##### ") 1)((looking-at "^#### ") 2)((looking-at "^[a-zA-Z0-9_\.]+ ?<- ?function(.*{") 3) (t 1000)))
304 ; Outline-minor-mode key map
305 (define-prefix-command 'cm-map nil "Outline-")
307 (define-key cm-map "q" 'hide-sublevels) ; Hide everything but the top-level headings
308 (define-key cm-map "t" 'hide-body) ; Hide everything but headings (all body lines)
309 (define-key cm-map "o" 'hide-other) ; Hide other branches
310 (define-key cm-map "c" 'hide-entry) ; Hide this entry's body
311 (define-key cm-map "l" 'hide-leaves) ; Hide body lines in this entry and sub-entries
312 (define-key cm-map "d" 'hide-subtree) ; Hide everything in this entry and sub-entries
314 (define-key cm-map "a" 'show-all) ; Show (expand) everything
315 (define-key cm-map "e" 'show-entry) ; Show this heading's body
316 (define-key cm-map "i" 'show-children) ; Show this heading's immediate child sub-headings
317 (define-key cm-map "k" 'show-branches) ; Show all sub-headings under this heading
318 (define-key cm-map "s" 'show-subtree) ; Show (expand) everything in this heading & below
320 (define-key cm-map "u" 'outline-up-heading) ; Up
321 (define-key cm-map "n" 'outline-next-visible-heading) ; Next
322 (define-key cm-map "p" 'outline-previous-visible-heading) ; Previous
323 (define-key cm-map "f" 'outline-forward-same-level) ; Forward - same level
324 (define-key cm-map "b" 'outline-backward-same-level) ; Backward - same level
325 (global-set-key "\M-o" cm-map)
327 (defun my-org-mode-setup ()
328 (when (and (buffer-file-name)
329 (file-exists-p (buffer-file-name)))
330 (load-library "reftex")
331 (and (buffer-file-name)
332 (file-exists-p (buffer-file-name))
334 (reftex-set-cite-format
335 '((?b . "[[bib::%l]]")
336 (?n . "[[note::%l]]"))))
337 (define-key org-mode-map "\C-c\C-g" 'reftex-citation)
339 (add-hook 'org-mode-hook 'my-org-mode-setup)
341 (setq-default org-mobile-directory "/rzlab.ucr.edu:/sites/dav.donarmstrong.com/root/org/")
342 (setq-default org-directory "/home/don/org-mode/")
343 (setq-default org-mobile-inbox-for-pull "/home/don/org-mode/from-mobile.org")
346 (setq-default debian-changelog-mailing-address "don@debian.org")
347 (setq-default debian-changelog-full-name "Don Armstrong")
351 (define-key global-map (kbd "C-;") 'iedit-mode)