; ;; INTERNALS ; (set-time-zone-rule "GMT-1") ;; Put local lisp code in load path (add-to-list 'load-path "/home/bruceh/Tools/gnu/emacs/site-lisp/") (remove-hook 'text-mode-hook 'flyspell-mode) ; Turn off spell check on-the-fly ;; Options Menu Settings ;; ===================== (cond ((and (string-match "XEmacs" emacs-version) (boundp 'emacs-major-version) (or (and (= emacs-major-version 19) (>= emacs-minor-version 14)) (= emacs-major-version 21)) (fboundp 'load-options-file)) (load-options-file "~/.xemacs-options"))) ;; ============================ ;; End of Options Menu Settings ; AUTOINSERTS (require 'autoinsert) (add-hook 'find-file-hooks 'auto-insert) ; C++ AUTOINSERT (setq auto-insert-alist (cons '(latex-mode ;; should try to offer completing read for these "options, RET: " "\\documentclass[" str & ?\] | -1 ?{ (read-string "class: ") "}\n" ("package, %s: " "\\usepackage[" (read-string "options, RET: ") & ?\] | -1 ?{ str "}\n") _ "\n\\begin{document}\n" _ "\n\\end{document}") auto-insert-alist)) (push '(("\\.cc\\'" . "C / C++ header") "\n\n\n" "#include \n" "#include \n\n" "using namespace std; \n\n\n" "int main(int argc, char** argv)\n" "{\n\n\n\n" " return 0;\n};") auto-insert-alist) (push '(("\\.c\\'" . "C / C++ header") "\n\n\n" "#include \n" "#include \n\n" "int main(int argc, char** argv)\n" "{\n\n\n\n" " return 0;\n};") auto-insert-alist) ; FAVOURITE FONT SETTING ;;bh-reinstall(add-spec-list-to-specifier (face-property 'default 'font) '((global (nil . "-*-Lucidatypewriter-Medium-R-*-*-*-140-75-75-*-*-ISO8859-1")))) ;;bh-reinstall(add-spec-list-to-specifier (face-property 'bold 'font) '((global (nil . "-*-Lucidatypewriter-Bold-R-*-*-*-140-75-75-*-*-ISO8859-1")))) ;;bh-reinstall(add-spec-list-to-specifier (face-property 'italic 'font) '((global (nil . "-*-courier-medium-i-*-*-*-140-75-75-*-*-iso8859-1")))) ;;bh-reinstall(add-spec-list-to-specifier (face-property 'bold-italic 'font) '((global (nil . "-*-courier-bold-i-*-*-*-140-75-75-*-*-iso8859-1")))) ; AUC-TeX ;;bh-reinstall(require 'tex-site) ; FILLING ;;bh-reinstall(require 'filladapt) ;;bh-reinstall(autoload 'turn-on-auto-fill "auto-fill" ;;bh-reinstall "Unconditionally turn on auto-fill mode") ;;bh-reinstall(add-hook 'text-mode-hook 'turn-on-filladapt-mode) ;;bh-reinstall(add-hook 'text-mode-hook 'turn-on-auto-fill) ;;bh-reinstall(add-hook 'message-mode-hook 'turn-on-filladapt-mode) ;;bh-reinstall(add-hook 'message-mode-hook 'turn-on-auto-fill) ;;bh-reinstall(add-hook 'mail-mode-hook 'turn-on-filladapt-mode) ;;bh-reinstall(add-hook 'mail-mode-hook 'turn-on-auto-fill) ;;bh-reinstall(add-hook 'LaTeX-mode-hook 'turn-on-filladapt-mode) ;;bh-reinstall(add-hook 'LaTeX-mode-hook 'turn-on-auto-fill) ; FONT-LOCK-MODE (require 'font-lock) (autoload 'turn-on-font-lock "font-lock" "Unconditionally turn on Font Lock mode.") (add-hook 'mail-mode-hook 'turn-on-font-lock) ; ;; INTERNET/MAIL ; ; W3 (setq w3-default-homepage "http://cyclone.oslo.dnmi.no:8001/") (setq url-keep-history t) ; VM (setq user-mail-address "Bruce.Hackett@met.no") (setq mail-archive-file-name "~/Mail/VM/archive/outbox") (setq query-user-mail-address nil) ; ;; KEYS ; (global-set-key [f1] 'find-file) (global-set-key [f2] 'undo) (global-set-key [f3] 'save-buffer) (global-set-key [f4] 'save-buffers-kill-emacs) (global-set-key [f5] 're-search-backward) (global-set-key [f6] 're-search-forward) (global-set-key [f8] 'query-replace-regexp) (global-set-key [f9] 'goto-line) (global-set-key [f10] 'replace-regexp) (global-set-key [f11] 'end-of-buffer) (global-set-key [f12] 'auto-fill-mode) (global-unset-key "\M-[") (global-unset-key "\C-h") (global-unset-key "\e\e") ; unbinds ESC ESC (global-set-key "\b" 'delete-backward-char) ; ;; CALENDAR & DIARY ; (setq calendar-latitude 60.0) (setq calendar-longitude 11.0) (setq calendar-location-name "Oslo") (setq calendar-time-zone +60) (setq calendar-standard-time-zone-name "CET") (setq calendar-daylight-time-zone-name "CET+1") (setq calendar-daylight-savings-starts '(calendar-nth-named-day 1 0 4 year)) (setq calendar-daylight-savings-ends '(calendar-nth-named-day -1 0 10 year)) (setq european-calendar-style t) (setq all-christian-calendar-holidays t) ; Fancy diary view (diary) (setq view-diary-entries-initially t mark-diary-entries-in-calendar t number-of-diary-entries 7) (add-hook 'diary-display-hook 'fancy-diary-display) (add-hook 'today-visible-calendar-hook 'calendar-mark-today) ; ;;; Commands added by calc-private-autoloads on Tue Jul 20 10:33:18 1999. ; (autoload 'calc-dispatch "calc" "Calculator Options" t) (autoload 'full-calc "calc" "Full-screen Calculator" t) (autoload 'full-calc-keypad "calc" "Full-screen X Calculator" t) (autoload 'calc-eval "calc" "Use Calculator from Lisp") (autoload 'defmath "calc" nil t t) (autoload 'calc "calc" "Calculator Mode" t) (autoload 'quick-calc "calc" "Quick Calculator" t) (autoload 'calc-keypad "calc" "X windows Calculator" t) (autoload 'calc-embedded "calc" "Use Calc inside any buffer" t) (autoload 'calc-embedded-activate "calc" "Activate =>'s in buffer" t) (autoload 'calc-grab-region "calc" "Grab region of Calc data" t) (autoload 'calc-grab-rectangle "calc" "Grab rectangle of data" t) ;; (setq load-path (nconc load-path (list "~/Tools/gnu/emacs/site-lisp/calc"))) (global-set-key "\e#" 'calc-dispatch) ;;; End of Calc autoloads. ;; BBDB ;;bh-reinstall(setq bbdb-north-american-phone-numbers-p nil) ;;bh-reinstall(require 'bbdb) ;;bh-reinstall(bbdb-initialize) ; ;; APPEARANCE ;; ===================== ; ; COMMENTS ( HAEBFIX ) ;;(add-spec-list-to-specifier ;; (face-property 'font-lock-comment-face 'font) ;; '((global ;; (nil . "-*-haebfix-*-*-*-*-*-*-*-*-*-*-*-*")))) ;;(add-spec-list-to-specifier ;; (face-property 'font-lock-comment-face 'foreground) ;; '((global ;; ((color). "red")))) ; ;; MISCELLANEOUS ;; ===================== ; (setq standard-display-european t) ; always display line and column numbers (setq line-number-mode t) (setq-default column-number-mode 1) ;; put clock in emacs bar (display-time) (setq display-time-24hr-format t) (setq fortran-continuation-string "&") (put 'narrow-to-region 'disabled nil) (setq delete-key-deletes-forward t) (setq sentence-end-double-space t) (setq scroll-step 1) (setq-default next-line-add-newlines t) (setq-default case-replace t) (setq-default case-fold-search t) (setq initial-scratch-message nil) (setq minibuffer-max-depth nil) ; Prepare filesets (filesets-init) ;;bh-reinstall(set-specifier modeline-shadow-thickness 2) ; ;; MODES ;; ===================== ; ; allout outlining minor mode (require 'allout) (setq outline-init t) ; use cperl-mode for perl and scripts (doesn't work) (add-to-list 'auto-mode-alist '("\\.pl\\'" . cperl-mode)) ; org-mode (a GTD organizer) (require 'org-install) (add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode)) (global-set-key "\C-cl" 'org-store-link) (global-set-key "\C-ca" 'org-agenda) (global-set-key "\C-cb" 'org-iswitchb) ;; (global-set-key "\M-S-left" 'org-promote-subtree) ;; (global-set-key "\M-S-right" 'org-demote-subtree) (add-hook 'org-mode-hook 'turn-on-font-lock) ; org-mode buffers only ;; (eval-after-load "org" ;; '(progn ;; (define-prefix-command 'org-todo-state-map) ;; (define-key org-mode-map "\C-cx" 'org-todo-state-map) ;; (define-key org-todo-state-map "x" ;; #'(lambda nil (interactive) (org-todo "CANCELLED"))) ;; (define-key org-todo-state-map "d" ;; #'(lambda nil (interactive) (org-todo "DONE"))) ;; (define-key org-todo-state-map "f" ;; #'(lambda nil (interactive) (org-todo "DEFERRED"))) ;; (define-key org-todo-state-map "l" ;; #'(lambda nil (interactive) (org-todo "DELEGATED"))) ;; (define-key org-todo-state-map "s" ;; #'(lambda nil (interactive) (org-todo "STARTED"))) ;; (define-key org-todo-state-map "w" ;; #'(lambda nil (interactive) (org-todo "WAITING"))) ;; (define-key org-agenda-mode-map "\C-n" 'next-line) ;; (define-key org-agenda-keymap "\C-n" 'next-line) ;; (define-key org-agenda-mode-map "\C-p" 'previous-line) ;; (define-key org-agenda-keymap "\C-p" 'previous-line))) (setq org-todo-keyword-faces '(("DEFERRED" . org-done) ("CANCELLED" . org-done))) (font-lock-add-keywords 'org-mode '(("^\\([ \t]*[-*+]\\|^\\*+\\)[ \t]+→.*" 0 font-lock-warning-face prepend))) ; include diary items in org agenda (setq org-agenda-include-diary t) ; make htmlize available for publishing (require 'htmlize) ; user contrib function regenerates html versions of org file at each save (defun wicked/org-publish-files-maybe () "Publish this file if it contains the #+PUBLISH: keyword" (save-excursion (save-restriction (widen) (goto-char (point-min)) (when (re-search-forward "^#?[ \t]*\\+\\(PUBLISH\\)" nil t) (org-export-as-html-batch) nil)))) (add-hook 'org-mode-hook (lambda () (add-hook (make-local-variable 'write-file-functions) 'wicked/org-publish-files-maybe))) ; remember (a good companion of org-mode) (require 'remember) (setq remember-annotation-functions '(org-remember-annotation)) (setq remember-handler-functions '(org-remember-handler)) (add-hook 'remember-mode-hook 'org-remember-apply-template) (define-key global-map "\C-cr" 'org-remember) ;; Matlab-mode functions ;; (autoload 'matlab-mode "matlab-mode" "Enter Matlab mode." t) ;; (setq auto-mode-alist (cons '("\\.m$" . matlab-mode) auto-mode-alist)) ;; (defun my-matlab-mode-hook () ;; (setq matlab-function-indent t) ; if you want function bodies indented ;; (setq fill-column 76) ; where auto-fill should wrap ;; (turn-on-auto-fill)) ;; (setq matlab-mode-hook 'my-matlab-mode-hook) ;; Matlab.el functions (newer version of same) (autoload 'matlab-mode "matlab" "Enter Matlab mode." t) (autoload 'matlab-shell "matlab" "Interactive Matlab mode." t) ;; ;; User Level customizations (You need not use them all): (setq matlab-indent-function t) ; if you want function bodies indented (setq auto-mode-alist (cons '("\\.m\\'" . matlab-mode) auto-mode-alist)) (setq matlab-verify-on-save-flag nil) ; turn off auto-verify on save (defun my-matlab-mode-hook () (setq fill-column 76)) ; where auto-fill should wrap (add-hook 'matlab-mode-hook 'my-matlab-mode-hook) (defun my-matlab-shell-mode-hook () '()) (add-hook 'matlab-shell-mode-hook 'my-matlab-shell-mode-hook) ;; Set the default major mode (setq default-major-mode 'text-mode) ;; Add file types to be recognized (setq auto-mode-alist (cons '("\\.oct\\'" . matlab-mode) auto-mode-alist)) (setq auto-mode-alist (cons '("\\.h\\'" . c++-mode) auto-mode-alist)) (setq auto-mode-alist (cons '("\\.\\(lex\\|y\\)\\'" . c++-mode) auto-mode-alist)) (setq auto-mode-alist (cons '("\\.sh\\'" . shell-script-mode) auto-mode-alist)) (setq auto-mode-alist (cons '("\\.make\\'" . makefile-mode) auto-mode-alist)) (setq auto-mode-alist (cons '("\\.eps\\'" . postscript-mode) auto-mode-alist)) (setq auto-mode-alist (cons '("\\.epsi\\'" . postscript-mode) auto-mode-alist)) ;; Start in abbrev mode ; (setq-default abbrev-mode t) ;; Abbreviation parameters (quietly-read-abbrev-file "~/.abbrev_defs") (setq fast-lock-cache-directories '("~/.emacs-flc")) ; crypt ;;tobeinstalled(setq crypt-encryption-type 'pgp ;;tobeinstalled crypt-confirm-password t ;;tobeinstalled crypt-never-ever-decrypt t) ;;tobeinstalled(require 'crypt) (custom-set-variables ;; custom-set-variables was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(Info-additional-directory-list (quote ("/home/bruceh/Tools/gnu/info"))) '(diary-file "~/diary") '(dired-listing-switches "-alrt") '(filesets-data (quote (("My Org" (:pattern "~/Admin/Org/" "^.+\\\\.org$") (:open filesets-find-file)) ("Configuration files" (:files "~/.bashrc" "~/.bash_profile" "~/.emacs" "~/.aliases"))))) '(inhibit-splash-screen t) '(inhibit-startup-buffer-menu t) '(inhibit-startup-screen t) '(list-directory-verbose-switches "-lrt") '(org-agenda-custom-commands (quote (("d" todo #("DELEGATED" 0 9 (face org-warning)) nil) ("c" todo #("DONE|DEFERRED|CANCELLED" 0 23 (face org-warning)) nil) ("w" todo #("WAITING" 0 7 (face org-warning)) nil) ("W" "3-week agenda" agenda "" ((org-agenda-ndays 21))) ("1" "Today's #A tasks" agenda "" ((org-agenda-skip-function (lambda nil (org-agenda-skip-entry-if (quote notregexp) "\\=.*\\[#A\\]"))) (org-agenda-ndays 1) (org-agenda-overriding-header "Today's Priority #A tasks: "))) ("u" "Unscheduled TODO entries" alltodo "" ((org-agenda-skip-function (lambda nil (org-agenda-skip-entry-if (quote scheduled) (quote deadline) (quote regexp) "<[^>]+>"))) (org-agenda-overriding-header "Unscheduled TODO entries: ")))))) '(org-agenda-dim-blocked-tasks t) '(org-agenda-files (quote ("~/Admin/Org/ToDo.org" "~/Admin/Org/Job.org" "~/Admin/Org/InterRisk.org" "~/Admin/Org/ECOOP.org" "~/Admin/Org/Mersea.IP.org" "~/Admin/Org/MyOcean.org" "~/Admin/Org/NOOS.org" "~/Admin/Org/EuroGOOS.org" "~/Admin/Org/SKS-LAT.org" "~/Admin/Org/Opera.org" "~/Admin/Org/OOMM.org" "~/Admin/Org/TransHav.org" "~/Admin/Org/SFT-Tareskog.org" "~/Admin/Org/CIENS.org" "~/Admin/Org/MONBASE.org" "~/Admin/Org/Forsvar.org" "~/Admin/Org/Private.org"))) '(org-agenda-skip-scheduled-if-done t) '(org-combined-agenda-icalendar-file "~/Admin/Org/org.ics") '(org-deadline-warning-days 14) '(org-default-notes-file "~/Admin/Org/notes.org") '(org-directory "~/Admin/Org") '(org-enforce-todo-checkbox-dependencies t) '(org-enforce-todo-dependencies t) '(org-icalendar-include-todo (quote all)) '(org-icalendar-store-UID t) '(org-log-done (quote note)) '(org-remember-store-without-prompt t) '(org-remember-templates (quote ((116 "* TODO %? %u" "~/Admin/Org/ToDo.org" "Tasks") (110 "* %u %?" "~/Admin/Org/notes.org" "Notes")))) '(org-stuck-projects (quote ("+LEVEL=2/-DONE" ("TODO" "NEXT" "NEXTACTION" "STARTED" "DELEGATED" "WAITING") nil))) '(org-tag-alist (quote ((#("@office" 0 7 (face nil)) . 111) (#("@home" 0 5 (face nil)) . 104) (#("@online" 0 7 (face nil)) . 119) (#("@computer" 0 9 (face nil)) . 99) (#("phone" 0 5 (face nil)) . 112) (#("email" 0 5 (face nil)) . 101) (#("errand" 0 6 (face nil)) . 114) (#("larspr" 0 6 (face nil)) . 76) (#("goranb" 0 6 (face nil)) . 71) (#("haralde" 0 7 (face nil)) . 72) (#("jonal" 0 5 (face nil)) . 74) (#("anac" 0 4 (face nil)) . 67) (#("yvonneg" 0 7 (face nil)) . 89) (#("annks" 0 5 (face nil)) . 75) (#("arnem" 0 5 (face nil)) . 77) (#("ingunnb" 0 7 (face nil)) . 73) (#("jensd" 0 5 (face nil)) . 68) (#("larsab" 0 6 (face nil)) . 66) (#("oyvinds" 0 7 (face nil)) . 79) (#("oyvindb" 0 7 (face nil)) . 2264) (#("antone" 0 6 (face nil)) . 49) (#("oysteinh" 0 8 (face nil)) . 50) (#("roars" 0 5 (face nil)) . 51) (#("jenss" 0 5 (face nil)) . 52) (#("IT" 0 2 (face nil)) . 105) (#("@Klover2" 0 8 (face nil)) . 107) (#("@MonaLisa" 0 9 (face nil)) . 109) (#("Anne" 0 4 (face nil)) . 65) (#("Stian" 0 5 (face nil)) . 83) (#("Eivind" 0 6 (face nil)) . 69) (#("Peg" 0 3 (face nil)) . 80)))) '(org-tags-column -79) '(org-todo-interpretation (quote type)) '(org-todo-keywords (quote ((sequence "TODO" "NEXTACTION" "STARTED" "LATER/MAYBE" "WAITING" "DELEGATED" "|" "DEFERRED" "CANCELLED" "DONE")))) '(pr-txt-printer-alist (quote ((default "lpr" nil "fou3p1d") (fou3 "lpr" nil "fou3p1d") (color "lpr" nil "fou3p3fd")))) '(remember-annotation-functions (quote (org-remember-annotation))) '(remember-data-file "~/Admin/Org/remember.notes") '(remember-handler-functions (quote (org-remember-handler))) '(scroll-bar-mode (quote right)) '(tool-bar-mode t) '(transient-mark-mode t) '(utf-translate-cjk-mode nil)) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(default ((t (:stipple nil :background "white" :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 147 :width normal :family "misc-fixed")))) '(cursor ((t (:background "darkred" :weight normal :width normal)))) '(fixed-pitch ((t (:family "fixed")))) '(font-lock-comment-face ((((class color) (min-colors 88) (background light)) (:foreground "cornflowerblue")))) '(italic ((((supports :underline t)) (:underline t)))) '(menu ((((type x-toolkit)) (:height 1.0)))) '(mouse ((t (:background "#000000")))) '(org-scheduled-today ((((class color) (min-colors 88) (background light)) (:foreground "DarkGreen")))))