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 '(post-email-address "don@donarmstrong.com")
31 '(post-kill-quoted-sig nil)
32 '(post-mail-message "mutt\\(ng\\|\\)-[a-z0-9]+-[0-9]+-.*")
33 '(post-uses-fill-mode nil)
34 '(ps-footer-font-size (quote (8 . 10)))
35 '(ps-header-font-size (quote (8 . 10)))
36 '(ps-header-title-font-size (quote (10 . 10)))
37 '(ps-line-number-color "blue")
39 '(ps-print-footer-frame nil)
40 '(ps-print-only-one-header t)
41 '(safe-local-variable-values (quote ((auto-save-default) (make-backup-files))))
42 '(sentence-end "[.?!][]\"')]*\\($\\| \\| \\)[
44 '(sentence-end-double-space nil)
46 '(tool-bar-mode nil nil (tool-bar))
47 '(user-mail-address "don@donarmstrong.com")
48 '(vc-delete-logbuf-window nil)
49 '(vc-follow-symlinks t))
50 (fset 'perl-mode 'cperl-mode)
51 ;;(load-file "cperl-mode.el")
52 (add-to-list 'load-path '"~/lib/emacs_el/")
53 ;; this is the tiny-tools module from https://github.com/jaalto/project--emacs-tiny-tools.git
54 (add-to-list 'load-path '"~/lib/emacs_el/tiny-tools/lisp/tiny")
55 (add-to-list 'load-path '"~/lib/emacs_el/tiny-tools/lisp/other")
56 ;;(add-to-list 'Tex-style-path '"~/lib/emacs_el/auctex/")
58 ; org mode agenda files
59 (setq org-agenda-files (quote ("~/projects/debbugs/notes.org"
60 "~/projects/notes/notes.org"
61 "~/projects/origins_of_life/ool.org"
62 "~/projects/sysadmin/sndservers/sndservers.org"
63 "~/projects/chaim/chaim.org"
64 "~/projects/fh/fh.org")))
66 (setq tinyprocmail--procmail-version "v3.22")
67 (add-hook 'tinyprocmail--load-hook 'tinyprocmail-install)
68 (require 'tinyprocmail)
74 ;;(require 'emacs-wiki)
78 (require 'google-weather)
79 (require 'org-google-weather)
80 (setq-default org-google-weather-format "%i %c, [%l,%h] %s %C")
83 (global-set-key "\C-xp" 'server-edit)
85 (setq-default auto-mode-alist (cons '("\.wml$" .
86 (lambda () (html-mode) (auto-fill-mode)))
89 ;; Use c-mode for perl .xs files
90 (add-to-list 'auto-mode-alist '("\\.xs\\'" . c-mode))
91 (add-to-list 'auto-mode-alist '("\\.\\([pP][Llm]\\|al\\)\\'" . cperl-mode))
92 (add-to-list 'interpreter-mode-alist '("perl" . cperl-mode))
93 (add-to-list 'interpreter-mode-alist '("perl5" . cperl-mode))
94 (add-to-list 'interpreter-mode-alist '("miniperl" . cperl-mode))
96 (add-to-list 'auto-mode-alist '("muttng-[a-z0-9]+-[0-9]+-" . post-mode))
97 (add-to-list 'auto-mode-alist '("muttngrc" . muttrc-mode))
99 (add-to-list 'auto-mode-alist '("mutt-[a-z0-9]+-[0-9]+-" . post-mode))
100 (add-to-list 'auto-mode-alist '("muttrc" . muttrc-mode))
102 (add-to-list 'auto-mode-alist '("\\.mdwn$" . markdown-mode))
106 (global-unset-key "\M-g")
107 (global-set-key "\M-g" 'goto-line)
109 ;;(autoload 'perl-mode "cperl-mode"
110 ;; "alternate mode for editing Perl programs" t)
112 ;; self-insert-command hack.
113 ;; Without this, "if<SP>" expands to
116 ;; which really should be,
119 (setq-default cperl-hairy t
121 ;; cperl-auto-newline t
122 ;; cperl-auto-newline-after-colon t
123 cperl-continued-statement-offset 4
124 cperl-brace-offset -4
125 cperl-label-offset -4
126 cperl-highlight-variables-indiscriminately t
127 cperl-electric-lbrace-space nil
129 (add-hook 'cperl-mode-hook (lambda () (cperl-set-style "PerlStyle")))
133 ;(load-library "php-mode")
135 (setq-default c-indent-level 8)
136 (setq-default c-brace-imaginary-offset 0)
137 (setq-default c-brace-offset -8)
138 (setq-default c-argdecl-indent 8)
139 (setq-default c-label-offset -8)
140 (setq-default c-continued-statement-offset 8)
142 (setq-default indent-tabs-mode nil)
143 (setq-default tab-width 8)
146 ;; (autoload 'php-mode "php-mode" "PHP editing mode" t)
147 ;; (add-to-list 'auto-mode-alist '("\\.php3?\\'" . php-mode))
148 ;; (add-to-list 'auto-mode-alist '("\\.phtml?\\'" . php-mode))
149 ;; (add-to-list 'auto-mode-alist '("\\.php?\\'" . php-mode))
150 ;; (add-to-list 'auto-mode-alist '("\\.php4?\\'" . php-mode))
152 ;; REFTEX (much enhanced management of cross-ref, labels, etc)
153 ;; http://www.strw.leidenuniv.nl/~dominik/Tools/reftex/
154 (autoload 'reftex-mode "reftex" "RefTeX Minor Mode" t)
155 (autoload 'turn-on-reftex "reftex" "RefTeX Minor Mode" nil)
156 (autoload 'reftex-citation "reftex-cite" "Make citation" nil)
157 (autoload 'reftex-index-phrase-mode "reftex-index" "Phrase mode" t)
158 (add-hook 'LaTeX-mode-hook 'turn-on-reftex) ; with AUCTeX LaTeX mode
159 (add-hook 'latex-mode-hook 'turn-on-reftex) ; with Emacs latex mode
160 (add-hook 'LaTeX-mode-hook 'outline-minor-mode) ; with AUCTeX LaTeX mode
161 (add-hook 'latex-mode-hook 'outline-minor-mode) ; with Emacs latex mode
163 ;; (TeX-add-style-hook
168 ;; (custom-set-variables
169 ;; '(font-latex-user-keyword-classes
172 ;; font-lock-function-name-face 2 (command 1 t))))
175 (require 'font-latex)
176 (add-to-list 'font-latex-match-reference-keywords "fref")
177 (add-to-list 'font-latex-match-reference-keywords "Fref")
178 (add-to-list 'font-latex-match-reference-keywords "citep")
179 (add-to-list 'font-latex-match-reference-keywords "citet")
180 (font-latex-match-reference-make)
181 (add-to-list 'font-latex-match-function-keywords "DLA")
182 (add-to-list 'font-latex-match-function-keywords "RZ")
183 (add-to-list 'font-latex-match-function-keywords "OM")
184 (add-to-list 'font-latex-match-function-keywords "DL")
185 (add-to-list 'font-latex-match-function-keywords "fixme")
186 (add-to-list 'font-latex-match-function-keywords "acs")
187 (add-to-list 'font-latex-match-function-keywords "acsp")
188 (add-to-list 'font-latex-match-function-keywords "ac")
189 (add-to-list 'font-latex-match-function-keywords "acp")
190 (add-to-list 'font-latex-match-function-keywords "acl")
191 (add-to-list 'font-latex-match-function-keywords "aclp")
192 (add-to-list 'font-latex-match-function-keywords "acsu")
193 (add-to-list 'font-latex-match-function-keywords "aclu")
194 (add-to-list 'font-latex-match-function-keywords "acused")
195 (font-latex-match-function-make)
196 (setq-default TeX-parse-self t)
197 (setq-default TeX-auto-save t)
198 (setq-default TeX-master nil)
200 (defun insert-date ()
201 "Insert date at point."
203 (insert (format-time-string "%A, %B %e, %Y %k:%M:%S %Z")))
204 (global-set-key "\C-[d" 'insert-date)
206 (defun unfill-paragraph (arg)
207 "Pull this whole paragraph up onto one line."
209 (let ((fill-column 10000))
210 (fill-paragraph arg))
213 ;(iswitchb-default-keybindings)
215 (column-number-mode t)
216 (setq-default reftex-plug-into-AUCTeX t)
220 (require 'mode-compile)
222 (setq-default reftex-default-bibliography
225 (defadvice server-process-filter (after post-mode-message first activate)
226 "If the buffer is in post mode, overwrite the server-edit
227 message with a post-save-current-buffer-and-exit message."
228 (if (eq major-mode 'post-mode)
230 (substitute-command-keys "Type \\[describe-mode] for help composing; \\[post-save-current-buffer-and-exit] when done."))))
231 ; This is also needed to see the magic message. Set to a higher
232 ; number if you have a faster computer or read slower than me.
233 '(font-lock-verbose 1000)
234 ;(setq-default server-temp-file-regexp "mutt\(-\|ng-\)")
235 ; (add-hook 'server-switch-hook
236 ; (function (lambda()
237 ; (cond ((string-match "Post" mode-name)
239 ; set-buffer-file-coding-system 'utf-8
243 (add-hook 'post-mode-hook
247 (fset 'insert-function-documentation
248 [?\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])
249 (global-set-key "\M-f" 'insert-function-documentation)
251 (eval-after-load "lilypond-mode"
253 (load-library "lyqi-mode")
254 (define-key LilyPond-mode-map "\C-cq" 'lyqi-mode)))
256 (autoload 'spamassassin-mode "spamassassin-mode" nil t)
258 (desktop-load-default)
262 ;; custom-set-faces was added by Custom.
263 ;; If you edit it by hand, you could mess it up, so be careful.
264 ;; Your init file should contain only one such instance.
265 ;; If there is more than one, they won't work right.
266 '(menu ((((type x-toolkit)) (:background "black" :foreground "grey90")))))
268 (defun ess-change-directory (path)
269 "Set the current working directory to PATH for both *R* and Emacs."
270 (interactive "DDirectory to change to: ")
272 (when (file-exists-p path)
273 (ess-command (concat "setwd(\"" path "\")\n"))
274 ;; use file-name-as-directory to ensure it has trailing /
275 (setq default-directory (file-name-as-directory path))))
277 (put 'upcase-region 'disabled nil)
279 (put 'downcase-region 'disabled nil)
281 ;; The following lines are always needed. Choose your own keys.
282 (add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))
283 (add-hook 'org-mode-hook 'turn-on-font-lock) ; not needed when global-font-lock-mode is on
284 (global-set-key "\C-cl" 'org-store-link)
285 (global-set-key "\C-ca" 'org-agenda)
286 (global-set-key "\C-cb" 'org-iswitchb)
287 (setq-default org-log-done 'time)
288 (setq-default org-agenda-ndays 5)
291 (autoload 'flyspell-mode "flyspell" "On-the-fly spelling checker." t)
292 (add-hook 'message-mode-hook 'turn-on-flyspell)
293 (add-hook 'text-mode-hook 'turn-on-flyspell)
294 (add-hook 'c-mode-common-hook 'flyspell-prog-mode)
295 (add-hook 'cperl-mode-hook 'flyspell-prog-mode)
296 (add-hook 'tcl-mode-hook 'flyspell-prog-mode)
297 (add-hook 'ess-mode-hook 'flyspell-prog-mode)
298 (defun turn-on-flyspell ()
299 "Force flyspell-mode on using a positive arg. For use in hooks."
303 ;;; outlining support for ess modes
304 (add-hook 'ess-mode-hook
307 (setq outline-regexp "\\(^#\\{4,5\\} \\)\\|\\(^[a-zA-Z0-9_\.]+ ?<- ?function(.*{\\)")
309 (lambda () (interactive) (cond ((looking-at "^##### ") 1)((looking-at "^#### ") 2)((looking-at "^[a-zA-Z0-9_\.]+ ?<- ?function(.*{") 3) (t 1000)))
312 ; Outline-minor-mode key map
313 (define-prefix-command 'cm-map nil "Outline-")
315 (define-key cm-map "q" 'hide-sublevels) ; Hide everything but the top-level headings
316 (define-key cm-map "t" 'hide-body) ; Hide everything but headings (all body lines)
317 (define-key cm-map "o" 'hide-other) ; Hide other branches
318 (define-key cm-map "c" 'hide-entry) ; Hide this entry's body
319 (define-key cm-map "l" 'hide-leaves) ; Hide body lines in this entry and sub-entries
320 (define-key cm-map "d" 'hide-subtree) ; Hide everything in this entry and sub-entries
322 (define-key cm-map "a" 'show-all) ; Show (expand) everything
323 (define-key cm-map "e" 'show-entry) ; Show this heading's body
324 (define-key cm-map "i" 'show-children) ; Show this heading's immediate child sub-headings
325 (define-key cm-map "k" 'show-branches) ; Show all sub-headings under this heading
326 (define-key cm-map "s" 'show-subtree) ; Show (expand) everything in this heading & below
328 (define-key cm-map "u" 'outline-up-heading) ; Up
329 (define-key cm-map "n" 'outline-next-visible-heading) ; Next
330 (define-key cm-map "p" 'outline-previous-visible-heading) ; Previous
331 (define-key cm-map "f" 'outline-forward-same-level) ; Forward - same level
332 (define-key cm-map "b" 'outline-backward-same-level) ; Backward - same level
333 (global-set-key "\M-o" cm-map)
335 (defun my-org-mode-setup ()
336 (when (and (buffer-file-name)
337 (file-exists-p (buffer-file-name)))
338 (load-library "reftex")
339 (and (buffer-file-name)
340 (file-exists-p (buffer-file-name))
342 (reftex-set-cite-format
343 '((?b . "[[bib::%l]]")
344 (?n . "[[note::%l]]"))))
345 (define-key org-mode-map "\C-c\C-g" 'reftex-citation)
347 (add-hook 'org-mode-hook 'my-org-mode-setup)
349 (setq-default org-mobile-directory "/rzlab.ucr.edu:/sites/dav.donarmstrong.com/root/org/")
350 (setq-default org-directory "/home/don/org-mode/")
351 (setq-default org-mobile-inbox-for-pull "/home/don/org-mode/from-mobile.org")
354 (setq-default debian-changelog-mailing-address "don@debian.org")
355 (setq-default debian-changelog-full-name "Don Armstrong")
359 (define-key global-map (kbd "C-;") 'iedit-mode)
361 (require 'multi-web-mode)
362 (setq mweb-default-major-mode 'html-mode)
363 (setq mweb-tags '((php-mode "<\\?php\\|<\\? \\|<\\?=" "\\?>")
364 (js-mode "<script +\\(type=\"text/javascript\"\\|language=\"javascript\"\\)[^>]*>" "</script>")
365 (css-mode "<style +type=\"text/css\"[^>]*>" "</style>")))
366 (setq mweb-filename-extensions '("php" "htm" "html" "ctp" "phtml" "php4" "php5"))
367 (multi-web-global-mode 1)