Float modeemacsStatus area
;; emacs configuration file (Download)
;; paths (add-to-list 'load-path "/home/mat/.emacs.el/") (add-to-list 'load-path "/home/mat/.emacs.el/remember/")
;; time clock (require 'timeclock)
(setq timeclock-use-elapsed t) (add-hook 'kill-emacs-query-functions 'timeclock-query-out) (setq timeclock-project-list '("SquareTraining" "Giftsfor" "Paramount" "Metaware" "Madinah" "MERCS"))
(defvar my-projects nil "A list of locations for projects.") (setq my-projects '(("Giftsfor" . "/docs/svn/www/Giftsfor") ("SquareTraining" . "/docs/svn/www/SquareTraining") ("Madinah" . "/docs/svn/www/Madinah") ("Metaware" . "/docs/svn/www/Metaware") ("Paramount" . "/docs/svn/www/Paramount") ("MERCS" . "/docs/svn/www/MERCS") ("Home" . "/docs/svn/www/Home") ("PWV3" . "/docs/www/htdocs/pwv3b")))

(require 'my-timeclock) (require 'my-miscellaneous) (require 'my-subversion)
;; ECMA script (require 'ecmascript-mode) (add-to-list 'auto-mode-alist '("\\.js\\'" . ecmascript-mode))
;; Turn on interactively-do-things mode (require 'ido) (ido-mode t)
;; Great subversion handling package available http://www.xsteve.at/prg/vc_svn/ ;; Set it to use interactively-do-things mode as well. (require 'psvn) (setq svn-status-use-ido-completion t)
(require 'bookmark)
;; An elegant way of refreshing and switching etags ;; http://groups.google.com/group/gnu.emacs.sources/msg/70da3fe59f1d1638?as_q=sure-tags.el (require 'sure-tags)
(require 'template)
;; Make erc open new buffers automatically when queried (setq erc-auto-query 'buffer)
;; Make the erc window as wide as the buffer ;; (setq erc-fill-column (- (window-width) 2)) ;; Set idle after 15 minutes (setq erc-autoaway-idle-seconds 900) (setq erc-auto-discard-away nil)
;; Identify myself to the bitlbee server (add-hook 'erc-after-connect '(lambda (im.bitlbee.org username) (erc-message "PRIVMSG" "NickServ identify password")))
;; The default log directory is ~/log/ (setq erc-log-channels-directory "~/.erc/logs/")
;; hideshow (setq hs-isearch-open 't)
;; w3m (load "w3m") (load "w3m") (load "w3m-cookie") (load "w3m-search") (setq w3m-use-tab t w3m-use-cookies t w3m-cookie-file "/home/mat/.w3m/cookie" w3m-cookie-accept-bad-cookies t w3m-cookie-accept-domains '("Preys-World.com" "forums.gentoo.org") w3m-home-page "about://bookmark/")
;; A wrapper for the w3m-view-this-url function. ;; Allows me to decide whether or not I want a link to open in new session in ;; the background without making everything open the background. (defun my-view-this-url (session) (interactive "P") (if session (progn (setq w3m-new-session-in-background t) (w3m-view-this-url-new-session) (setq w3m-new-session-in-background nil)) (w3m-view-this-url)))
;; Sets the buffer title e.g. *001. (Google)*. Messes with session ordering (defun my-w3m-rename-buffer (url) "Formats w3m buffer titles based on the current value of w3m-buffer-prefix and w3m-current-title (reducing its length if necessary)." (let ((name (buffer-name)) (regexp "^\*\\([0-9]+\\).+\*$")) (if (string-match regexp name) (setq prefix (string-to-number (match-string 1 name))) (setq prefix my-w3m-buffer-prefix))) (if (> (length w3m-current-title) 36) (setq title (substring w3m-current-title 0 36)) (setq title w3m-current-title)) (rename-buffer (format "*%03.0f. (%s)*" prefix (url-eat-trailing-space (or title "nil")))))
;; Increments the prefix (defun my-w3m-increment-buffer () (if (not w3m-work-buffer-list) (setq my-w3m-buffer-prefix 1) (setq my-w3m-buffer-prefix (+ my-w3m-buffer-prefix 1))))
;; (add-hook 'w3m-display-hook 'my-w3m-rename-buffer) ;; (add-hook 'w3m-mode-hook 'my-w3m-increment-buffer) ;; Clean and save the cookies at shutdown (add-hook 'kill-emacs-hook (lambda () (when (fboundp 'w3m-cookie-shutdown) (progn (w3m-cookie-clean) (w3m-cookie-shutdown)))))
;; Custom w3m search engines (eval-after-load "w3m-search" '(progn (add-to-list 'w3m-search-engine-alist '("google image" "http://images.google.co.uk/images?q=%s" nil)) (add-to-list 'w3m-search-engine-alist '("wikipedia" "http://en.wikipedia.org/wiki/Special:Search?search=%s" nil)) (add-to-list 'w3m-search-engine-alist '("portage" "http://packages.gentoo.org/search/?sstring=%s" nil)) (add-to-list 'w3m-uri-replace-alist '("\\`gi:" w3m-search-uri-replace "google image")) (add-to-list 'w3m-uri-replace-alist '("\\`g:" w3m-search-uri-replace "google")) (add-to-list 'w3m-uri-replace-alist '("\\`emacs:" w3m-search-uri-replace "emacswiki")) (add-to-list 'w3m-uri-replace-alist '("\\`wiki:" w3m-search-uri-replace "wikipedia")) (add-to-list 'w3m-uri-replace-alist '("\\`portage:" w3m-search-uri-replace "portage")))) ;; (setq browse-url-browser-function 'w3m-browse-url) (autoload 'w3m-browse-url "w3m" "Ask a WWW browser to show a URL." t) (defun dka-w3m-textarea-hook() (save-excursion (while (re-search-forward "\r\n" nil t) (replace-match "\n" nil nil)) (delete-other-windows))) (add-hook 'w3m-form-input-textarea-mode-hook 'dka-w3m-textarea-hook)
;; The python-mode that ships with GNU Emacs isn't as good as the "official" ;; mode that's shipped with python, load it in. (autoload 'python-mode "python-mode" "Python Mode." t) (add-to-list 'auto-mode-alist '("\\.py\\'" . python-mode)) (add-to-list 'interpreter-mode-alist '("python" . python-mode))
;; gentoo installed emacs stuff (load "site-gentoo") (autoload 'css-mode "css-mode" "Mode for editing CSS files" t)
;; asp ;; (require 'vbnet-mode) ;; Set up cperl mode to use GNU coding styles (mapc (lambda (pair) (if (eq (cdr pair) 'perl-mode) (setcdr pair 'cperl-mode))) (append auto-mode-alist interpreter-mode-alist)) (setq cperl-auto-newline t cperl-auto-newline-after-colon t cperl-invalid-face nil cperl-indent-level 2 cperl-brace-offset 0 cperl-continued-brace-offset 0 cperl-label-offset -2 cperl-extra-newline-before-brace t cperl-merge-trailing-else nil cperl-continued-statement-offset 2)
;; planner (require 'planner) (require 'remember-planner) (setq remember-handler-functions '(remember-planner-append) remember-annotation-functions planner-annotation-functions)
(require 'muse) (require 'muse-mode) (require 'muse-html) (require 'muse-latex) (require 'muse-texinfo) (require 'muse-docbook) (require 'muse-project) (setq planner-project "default" planner-day-page-template "* Tasks\n\n\n* Notes\n\n\n" planner-default-page "General" muse-project-alist '(("default" ("/home/mat/docs/planner" :major-mode planner-mode :visit-link planner-visit-link))))
;; dired (require 'dired) (require 'dired-x)
;; List directories first in dired (require 'ls-lisp)
;; possibly the only good colour theme available for this editor (require 'color-theme) (color-theme-initialize) (color-theme-charcoal-black)
;; scp and su (require 'tramp) (setq tramp-default-method "ssh")
;; it's getting old (setq inhibit-startup-message t)
;; I never use the menus anyway (menu-bar-mode 0)
;; week starts on a monday (setq calendar-week-start-day 1)
;; dd/mm/yyy (setq european-calendar-style 't)
;; simple window switching (windmove-default-keybindings)
;; mutt stuff (add-hook 'mail-mode-hook 'turn-on-auto-fill) (add-to-list 'auto-mode-alist '("/tmp/mutt" . mail-mode))
;; Gnus stuff (add-hook 'message-mode-hook 'turn-on-auto-fill) (setq gnus-directory "/home/mat/.mail/") (setq gnus-article-save-directory "/home/mat/.news/") (setq gnus-cache-directory "/home/mat/.news/cache/") (setq gnus-kill-files-directory "/home/mat/.news/") (setq message-directory "/home/mat/.mail/") (setq bbdb-north-american-phone-numbers-p nil)
;; change the colours of ansi-term! (setq ansi-term-color-vector [unspecified "#262626" "#7fffd4" "#98fb98" "#fbfaa2" "#87ceeb" "#afeeee" "#40e0d0" "#bebebe"])
;; global key bindings (global-unset-key "\C-z") (global-set-key [f1] '(lambda () (interactive) (ansi-term "/bin/zsh" "terminal"))) (global-set-key [(meta f1)] 'my-sql-mysql) (global-set-key [(shift f1)] '(lambda () (interactive) (ansi-term "lftp" "lftp"))) (global-set-key [(shift f13)] '(lambda () (interactive) (ansi-term "lftp" "lftp"))) (global-set-key [f2] 'calendar) (global-set-key [(meta f2)] 'diary) (global-set-key [f3] 'calc) (global-set-key [f4] '(lambda () (interactive) (erc :server "im.bitlbee.org" :nick "username"))) (global-set-key [(meta shift tab)] 'comint-dynamic-complete-filename) (global-set-key (kbd "C-x g") 'gnus) (global-set-key (kbd "C-x p p") 'plan) (global-set-key (kbd "C-x p r") 'remember) (global-set-key (kbd "C-x p g") 'planner-goto-plan-page) (global-set-key (kbd "C-x p t") 'planner-create-task) (global-set-key (kbd "C-x p M-t") 'planner-create-task-from-buffer) (global-set-key (kbd "C-x p n") 'planner-create-note) (global-set-key (kbd "C-x p M-n") 'planner-create-note-from-task) (global-set-key (kbd "C-x v s") 'my-htdocs-unison) (global-set-key (kbd "C-x v o") 'my-svn-commit-with-diff) (global-set-key (kbd "C-x v M-r") 'my-svn-release) (global-set-key (kbd "C-x v p") 'svn-status) (global-set-key (kbd "C-x v M-l") 'my-update-svn-changelog) (global-set-key (kbd "M-.") 'tags-search) (global-set-key (kbd "C-x C-k C-k") 'kill-some-buffers) (global-set-key (kbd "C-c h") 'hs-toggle-hiding) (global-set-key (kbd "C-x ti") 'timeclock-in) (global-set-key (kbd "C-x to") 'timeclock-out) (global-set-key (kbd "C-x tc") 'timeclock-change) (global-set-key (kbd "C-x tr") 'timeclock-reread-log) (global-set-key (kbd "C-x tu") 'timeclock-update-modeline) (global-set-key (kbd "C-x tw") 'timeclock-when-to-leave-string) (global-set-key (kbd "C-c j") 'my-timeclock-check) (global-set-key (kbd "C-c r") 'my-visit-as-root) (global-set-key (kbd "C-c +") 'my-increment-number-at-point) (global-set-key (kbd "C-c -") '(lambda () (interactive) (my-increment-number-at-point 4))) (global-set-key "\C-xm" 'w3m)
(require 'mingus) (global-set-key (kbd "C-x M-m") 'mingus)
;; Use hippie-expand by default (eval-after-load "dabbrev" '(defalias 'dabbrev-expand 'hippie-expand))
;; Gnuclient (require 'gnuserv-compat) (gnuserv-start) (setq gnuserv-frame (car (frame-list)) gnuserv-done-hook 'lower-frame gnuserv-init-hook 'raise-frame)
;; Having a diary file in ~/ is annoying (setq diary-file "/home/mat/docs/diary" 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 for dired (setq dired-guess-shell-alist-user '(("\\.jpe?g$" "feh -F" "wallpaper.pl") ("\\.png$" "feh -F" "wallpaper.pl") ("\\.gif$" "feh -F" "wallpaper.pl") ("\\.dvi$" "evince * &") ("\\.pdf$" "evince * &") ("\\.mp3$" "mplayer -vo xv * &" "mplayer * &" "mplayer") ("\\.mpg$" "mplayer -vo xv * &" "mplayer * &" "mplayer") ("\\.avi$" "mplayer -vo xv * &" "mplayer * &" "mplayer") ("\\.mkv$" "mplayer -vo xv * &" "mplayer * &" "mplayer") ("\\.wmv$" "mplayer -vo xv * &" "mplayer * &" "mplayer") ("\\.mov$" "mplayer -vo xv * &" "mplayer * &" "mplayer") ("\\.xcf$" "gimp-remote") ("\\.abw$" "abiword * &")))

;; Latex stuff ;; compile the .dvi into a .pdf and view it with evince (setq tex-dvi-view-command "/home/mat/.bin/latex-view '*'")
;; Ediff stuff ;; Split the window nicely on wide displays (setq ediff-split-window-function (lambda (&optional arg) (if (> (frame-width) 150) (split-window-horizontally arg) (split-window-vertically arg))))
;; Stick the control window in a horizontal buffer instead of a new frame (setq ediff-window-setup-function 'ediff-setup-windows-plain)

;; Enable font-lock mode, which colorizes things nicely (global-font-lock-mode t)
;; Default code styles (setq indent-tab-mode nil default-tab-width 2 c-default-style "gnu" c-basic-offset 2 sgml-basic-offset 2)
;; No flyspell-mode in change-log-mode (dolist (hook '(change-log-mode-hook log-edit-mode-hook)) (add-hook hook (lambda () (flyspell-mode -1))))
;; Changes // text to /* text */ (fset 'my-convert-php-comments [?\C-s ?/ ?/ ?\C-m ?\C-x ?q backspace ?* ?\C-e ? ?* ?/])
;; Indentation keys (defun my-indentation-keys () "Sets up the indentation keys for programming modes; RET - newline-and-indent C-tab - indent-relative." (interactive) (local-set-key (kbd "RET") 'newline-and-indent) (local-set-key (kbd "<C-tab>") 'indent-relative) (c-toggle-auto-hungry-state 1))
;; Add indentation keys to modes I use (add-hook 'php-mode-hook 'my-indentation-keys) (add-hook 'php-mode-hook 'hs-minor-mode) (add-hook 'python-mode-hook 'my-indentation-keys) (add-hook 'java-mode-hook 'my-indentation-keys) (add-hook 'ecmascript-mode-hook 'my-indentation-keys) (add-hook 'perl-mode-hook 'my-indentation-keys) (add-hook 'cperl-mode-hook 'my-indentation-keys) (add-hook 'html-mode-hook 'my-indentation-keys) (add-hook 'sgml-mode-hook 'my-indentation-keys) (add-hook 'css-mode-hook 'my-indentation-keys) (add-hook 'emacs-lisp-mode-hook 'my-indentation-keys) (add-hook 'lisp-mode-hook 'my-indentation-keys) (add-hook 'tex-mode-hook 'my-indentation-keys) (add-hook 'vbnet-mode-hook 'my-indentation-keys)
;; Use XHTML mode instead of HTML mode (setq sgml-xml-mode t)
;; Non-standard extensions (add-to-list 'auto-mode-alist '("\\.tpl$" . html-mode)) (add-to-list 'auto-mode-alist '("\\.ds$" . lisp-mode)) (add-to-list 'auto-mode-alist '("\\.inct$" . php-mode)) (add-to-list 'auto-mode-alist '("\\.phpt$" . php-mode)) (add-to-list 'auto-mode-alist '("\\.php5$" . php-mode))
;; Make backups of all files I edit (setq backup-by-copying t backup-directory-alist '(("." . "/home/mat/.emacs.d/backup")) delete-old-versions t kept-new-versions 6 kept-old-versions 2 version-control t)
;; I edit files as root a lot, it should be safe since backups retain the permissions of the original (setq tramp-backup-directory-alist backup-directory-alist auto-save-default nil)
;; Set the browser (if window-system (setq browse-url-browser-function 'browse-url-generic browse-url-generic-program "firefox"))
(defun my-browse (url &rest ignore) "Browse URL using elinks." (interactive "sURL: ") (shell-command (concat "elinks " url)) (pop-to-buffer "*Shell Command Output*") (setq truncate-lines t))
;; Correct URL for the PHP manual (setq php-manual-url "http://uk.php.net/manual/en/")
;; save a bunch of variables to the desktop file ;; for lists specify the len of the maximal saved data also (setq desktop-globals-to-save (append '((extended-command-history . 30) (file-name-history . 100) (grep-history . 30) (compile-history . 30) (minibuffer-history . 50) (query-replace-history . 60) (read-expression-history . 60) (regexp-history . 60) (regexp-search-ring . 20) (search-ring . 20) (shell-command-history . 50) tags-file-name register-alist)))
;; SQL stuff (add-to-list 'same-window-buffer-names "*SQL*")
(require 'my-mysql)
;; VC stuff (setq change-log-default-name "ChangeLog" user-full-name "Matthew Mawdsley" user-mail-address "infinityx@blueyonder.co.uk" vc-svn-header '("\$Id\$"))
(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. '(apropos-do-all t) '(auto-compression-mode t nil (jka-compr)) '(auto-image-file-mode t) '(blink-cursor-mode nil) '(blink-matching-paren-on-screen t) '(column-number-mode t) '(delete-selection-mode t) '(dired-dwim-target t) '(dired-omit-files "^\\.[^\\.]") '(dired-recursive-copies (quote always)) '(dired-recursive-deletes (quote top)) '(eldoc-minor-mode-string " E") '(eldoc-mode t t) '(erc-modules (quote (autoaway autojoin button fill irccontrols list log match netsplit noncommands completion readonly ring smiley stamp track))) '(flyspell-issue-welcome-flag nil) '(gnuserv-temp-file-regexp "^/tmp/mutt-.*$") '(icomplete-mode t) '(ido-max-directory-size 60000) '(indent-tabs-mode nil) '(ispell-local-dictionary "british") '(ispell-program-name "aspell") '(load-final-newline t) '(ls-lisp-dirs-first t) '(ls-lisp-ignore-case t) '(ls-lisp-use-insert-directory-program nil) '(mail-interactive t) '(max-lisp-eval-depth 1000) '(mouse-wheel-mode t nil (mwheel)) '(nuke-trailing-whitespace-never-major-modes nil) '(nuke-trailing-whitespace-p (quote nuke-trailing-whitespace-check-mode)) '(post-jump-header nil) '(recentf-mode nil) '(safe-local-variable-values (quote ((dired-omit-mode . t) (c-set-style . k&r)))) '(save-place t nil (saveplace)) '(save-place-limit 20) '(scroll-bar-mode (quote right)) '(sentence-end-double-space nil) '(server-window (quote switch-to-buffer-other-frame)) '(show-paren-mode t) '(show-paren-style (quote parenthesis)) '(sql-product (quote mysql)) '(text-mode-hook (quote (flyspell-mode text-mode-hook-identify))) '(tool-bar-mode nil) '(transient-mark-mode t) '(visible-bell t))
(put 'scroll-left 'disabled nil)
(put 'dired-find-alternate-file 'disabled 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. )
(require 'time) (require 'image) (setq display-time-day-and-date t) (display-time) (timeclock-modeline-display)
;; Only shodan runs gnus (if (string= system-name "shodan") (progn (setq display-time-mail-file "/var/spool/mail/mat") (setq display-time-use-mail-icon t) (setq display-time-mail-icon '(image :type xpm :file "/home/mat/pictures/mail.xpm" :ascent center)))) (put 'narrow-to-region 'disabled nil)



:-- .emacs All (6,0) (Emacs-Lisp/lah)

% Bookmark
_ ________



















:%* *Bookmark List* All (6,0) (Bookmark Menu)