public
Description: Phil Hagelberg's personal dotfiles collection: the product of years of accumulated obsessive minor tweaks. Mostly Emacs Lisp.
Homepage: http://technomancy.us
Clone URL: git://github.com/technomancy/dotfiles.git
color theme tweaks, whitespace cleanups, chat rearrangements
technomancy (author)
Tue Jul 15 15:33:38 -0700 2008
commit  b1483f8ac7258bbe55791545c93e84cce8166f27
tree    9a6392180c515754421b959dc01b56789847f60b
parent  89c93d5d54787cb15ad088400240a1818cd7d8a5
...
63
64
65
 
 
 
 
66
...
63
64
65
66
67
68
69
70
0
@@ -63,3 +63,7 @@ fi
0
 if [ -f /etc/bashrc ]; then
0
         . /etc/bashrc
0
 fi
0
+
0
+if [ -f $HOME/.java_profile ]; then
0
+ source $HOME/.java_profile
0
+fi
0
\ No newline at end of file
...
1
2
3
4
5
 
 
6
7
8
...
1
2
3
 
 
4
5
6
7
8
0
@@ -1,8 +1,8 @@
0
 (if (or (matches (window_name) "Firefox")
0
         (matches (window_name) "Gran Paradiso")
0
         (matches (application_name) "macs")
0
- (matches (application_name) "conkeror")
0
- (matches (application_name) "erminal")
0
+ (matches (application_name) "conkeror")
0
+ (matches (application_name) "erminal")
0
         (matches (window_name) "^screen$"))
0
     (begin
0
       (undecorate)
...
1626
1627
1628
 
 
 
1629
1630
1631
...
1715
1716
1717
1718
1719
1720
1721
 
 
 
 
 
 
 
1722
1723
1724
...
1626
1627
1628
1629
1630
1631
1632
1633
1634
...
1718
1719
1720
 
 
 
 
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
0
@@ -1626,6 +1626,9 @@ If you are missing standard faces in this theme, please notify the maintainer."
0
      (eshell-prompt-face ((t (:foreground "Red" :bold t))))
0
      (eshell-test-failed-face ((t (:foreground "OrangeRed" :bold t))))
0
      (eshell-test-ok-face ((t (:foreground "Green" :bold t))))
0
+ (minibuffer-prompt ((t (:foreground "Blue"))))
0
+ (ido-first-match ((t (:foreground "Black" :bold t))))
0
+ (ido-only-match ((t (:foreground "Black"))))
0
      (excerpt ((t (:italic t))))
0
      (fixed ((t (:bold t))))
0
      (flyspell-duplicate-face ((t (:foreground "Gold3" :bold t :underline t))))
0
@@ -1715,10 +1718,13 @@ If you are missing standard faces in this theme, please notify the maintainer."
0
      (message-header-to-face ((t (:foreground "MidnightBlue" :bold t))))
0
      (message-header-xheader-face ((t (:foreground "blue"))))
0
      (message-separator-face ((t (:foreground "brown"))))
0
- (modeline ((t (:foreground "white" :background "black"))))
0
- (modeline-buffer-id ((t (:foreground "white" :background "black"))))
0
- (modeline-mousable ((t (:foreground "white" :background "black"))))
0
- (modeline-mousable-minor-mode ((t (:foreground "white" :background "black"))))
0
+ (mode-line ((t (:foreground "Black" :background "#dddddd"
0
+ :box (:color "#888888" :line-width 1)))))
0
+ (mode-line-inactive ((t (:background "#aaaaaa" :foreground "Black"
0
+ :box (:color "#888888" :line-width 1)))))
0
+ (mode-line-buffer-id ((t (:foreground "Black"))))
0
+ (mode-line-mousable ((t (:foreground "white" :background "black"))))
0
+ (mode-line-mousable-minor-mode ((t (:foreground "white" :background "black"))))
0
      (region ((t (:background "gray"))))
0
      (secondary-selection ((t (:background "paleturquoise"))))
0
      (show-paren-match-face ((t (:background "turquoise"))))
...
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
 
 
 
 
 
 
 
 
 
 
 
 
101
102
103
104
105
106
 
 
107
108
109
...
113
114
115
116
117
118
119
120
 
 
 
 
 
121
122
123
...
86
87
88
 
 
 
 
 
 
 
 
 
 
 
 
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
 
 
105
106
107
108
109
...
113
114
115
 
 
 
 
 
116
117
118
119
120
121
122
123
0
@@ -86,24 +86,24 @@ Files with duplicate filenames are suffixed with the name of the
0
 directory they are found in so that they are unique."
0
   (let ((file-alist nil))
0
     (mapcar (lambda (file)
0
- (let ((file-cons (cons (file-name-nondirectory file)
0
- (expand-file-name file))))
0
- (when (assoc (car file-cons) file-alist)
0
- (ffip-uniqueify (assoc (car file-cons) file-alist))
0
- (ffip-uniqueify file-cons))
0
- (add-to-list 'file-alist file-cons)
0
- file-cons))
0
- (split-string (shell-command-to-string (concat "find " (or ffip-project-root
0
- (ffip-project-root))
0
- " -type f -regex \""
0
- ffip-regexp
0
- "\" " ffip-find-options))))))
0
+ (let ((file-cons (cons (file-name-nondirectory file)
0
+ (expand-file-name file))))
0
+ (when (assoc (car file-cons) file-alist)
0
+ (ffip-uniqueify (assoc (car file-cons) file-alist))
0
+ (ffip-uniqueify file-cons))
0
+ (add-to-list 'file-alist file-cons)
0
+ file-cons))
0
+ (split-string (shell-command-to-string (concat "find " (or ffip-project-root
0
+ (ffip-project-root))
0
+ " -type f -regex \""
0
+ ffip-regexp
0
+ "\" " ffip-find-options))))))
0
 
0
 (defun ffip-uniqueify (file-cons)
0
   "Set the car of the argument to include the directory name plus the file name."
0
   (setcar file-cons
0
- (concat (car file-cons) ": "
0
- (cadr (reverse (split-string (cdr file-cons) "/"))))))
0
+ (concat (car file-cons) ": "
0
+ (cadr (reverse (split-string (cdr file-cons) "/"))))))
0
 
0
 (defun find-file-in-project ()
0
   "Prompt with a completing list of all files in the project to find one.
0
@@ -113,11 +113,11 @@ an `.emacs-project' file. You can override this by locally
0
 setting the `ffip-project-root' variable."
0
   (interactive)
0
   (let* ((project-files (ffip-project-files))
0
- (file (if (functionp 'ido-completing-read)
0
- (ido-completing-read "Find file in project: "
0
- (mapcar 'car project-files))
0
- (completing-read "Find file in project: "
0
- (mapcar 'car project-files)))))
0
+ (file (if (functionp 'ido-completing-read)
0
+ (ido-completing-read "Find file in project: "
0
+ (mapcar 'car project-files))
0
+ (completing-read "Find file in project: "
0
+ (mapcar 'car project-files)))))
0
     (find-file (cdr (assoc file project-files)))))
0
 
0
 (defun ffip-project-root (&optional dir)
...
120
121
122
123
124
 
 
125
126
127
...
120
121
122
 
 
123
124
125
126
127
0
@@ -120,8 +120,8 @@
0
 
0
 (eval-after-load 'ruby-mode '(require 'my-ruby))
0
 (eval-after-load 'javascript-mode '(require 'my-js))
0
-(eval-after-load 'jabber-connect '(load "jabber-config"))
0
-(eval-after-load 'rcirc '(load "rcirc-config"))
0
+(eval-after-load 'jabber '(load "my-jabber"))
0
+(eval-after-load 'rcirc '(load "my-rcirc"))
0
 
0
 ;; Well, these autoloads have to get invoked somehow.
0
 (add-to-list 'auto-mode-alist '("\\.rb$" . ruby-mode))
...
13
14
15
 
 
 
16
17
18
...
34
35
36
 
 
37
38
39
...
65
66
67
 
68
69
70
...
13
14
15
16
17
18
19
20
21
...
37
38
39
40
41
42
43
44
...
70
71
72
73
74
75
76
0
@@ -13,6 +13,9 @@
0
 (global-set-key (kbd "C-c l") (lambda () (interactive) (insert "lambda")))
0
 (global-set-key (kbd "C-x \\") 'align-regexp)
0
 (global-set-key (kbd "M-/") 'hippie-expand)
0
+(global-set-key (kbd "C-c n") (lambda () (interactive)
0
+ (delete-trailing-whitespace)
0
+ (untabify-buffer)))
0
 
0
 ;;; Navigation
0
 
0
@@ -34,6 +37,8 @@
0
 (global-set-key "\C-c\C-t" 'toggle-buffer)
0
 (global-set-key (kbd "C-x C-M-f") 'find-file-in-project)
0
 (global-set-key (kbd "C-c f") 'recentf-ido-find-file)
0
+(global-set-key (kbd "C-x C-p") 'find-file-at-point)
0
+(global-set-key (kbd "C-c b") 'bury-buffer)
0
 
0
 ;;; Window management
0
 
0
@@ -65,6 +70,7 @@
0
 (global-set-key (kbd "C-x w") 'w3m)
0
 (global-set-key "\C-xh" 'view-url)
0
 (global-set-key "\C-cT" 'twittering-update-status-interactive)
0
+(global-set-key (kbd "C-c o") 'google-region)
0
 
0
 ;;; Utility
0
 
...
23
24
25
 
 
 
 
 
 
26
27
28
...
72
73
74
75
 
76
77
78
79
80
 
 
81
82
83
...
92
93
94
95
 
96
97
98
...
120
121
122
123
 
 
 
124
125
126
...
136
137
138
 
 
 
 
 
 
139
140
141
142
143
144
145
 
 
146
147
148
149
 
 
150
151
152
...
165
166
167
168
169
 
 
170
171
172
...
23
24
25
26
27
28
29
30
31
32
33
34
...
78
79
80
 
81
82
83
84
85
 
86
87
88
89
90
...
99
100
101
 
102
103
104
105
...
127
128
129
 
130
131
132
133
134
135
...
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
 
160
161
162
163
164
 
165
166
167
168
169
...
182
183
184
 
 
185
186
187
188
189
0
@@ -23,6 +23,12 @@
0
                                      (apropos-internal "-mode$"
0
                                                        'commandp))))))
0
 
0
+(defun google-region (&optional flags)
0
+ "Google the selected region."
0
+ (interactive)
0
+ (browse-url (concat "http://www.google.com/search?ie=utf-8&oe=utf-8&q="
0
+ (buffer-substring (region-beginning) (region-end)))))
0
+
0
 (defun map-coords (lat lng)
0
   "Show a Yahoo map marked with the point LAT by LNG."
0
   (interactive "BLatitude: \nBLongitude")
0
@@ -72,12 +78,13 @@
0
         (isearch-forward regexp-p no-recursive-edit)))))
0
 
0
 (defun current-window ()
0
- "Why get-buffer-window instead of buffer-window? Why isn't this defined already?"
0
+ "Why isn't this defined already?"
0
   (get-buffer-window (current-buffer)))
0
 
0
 (defun toggle-dedicated-window ()
0
   "Toggle the window-dedicated-p state of current window."
0
- (set-window-dedicated-p (current-window) (not (window-dedicated-p (current-window)))))
0
+ (set-window-dedicated-p (current-window)
0
+ (not (window-dedicated-p (current-window)))))
0
 
0
 (defun window-small-and-large ()
0
   (interactive)
0
@@ -92,7 +99,7 @@
0
   ;; (untabify-buffer)
0
   (whitespace-mode t)
0
   (make-local-variable 'column-number-mode)
0
- (column-number-mode)
0
+ (column-number-mode t)
0
   (if (window-system) (hl-line-mode))
0
   (idle-highlight))
0
 
0
@@ -120,7 +127,9 @@
0
                                     ,(make-char 'greek-iso8859-7 107))
0
                     nil))))))
0
 
0
-(defun terminus () (interactive) (set-default-font "-xos4-terminus-medium-r-normal--14-140-72-72-c-80-iso8859-1"))
0
+(defun terminus () (interactive)
0
+ (set-default-font
0
+ "-xos4-terminus-medium-r-normal--14-140-72-72-c-80-iso8859-1"))
0
 (defun inconsolata () (interactive) (set-default-font "Inconsolata-12"))
0
 (defun dvsm () (interactive) (set-default-font "DejaVu Sans Mono-10"))
0
 
0
@@ -136,17 +145,25 @@
0
 
0
 ;;; Random stuff
0
 
0
+(defadvice find-file-at-point (around goto-line compile activate)
0
+ (let ((line (and (looking-at ".*:\\([0-9]+\\)")
0
+ (string-to-number (match-string 1)))))
0
+ ad-do-it
0
+ (and line (goto-line line))))
0
+
0
 (defun my-recompile-init ()
0
   (interactive)
0
   (byte-recompile-directory (expand-file-name "~/.emacs.d") 0))
0
 
0
 (defun my-generate-elisp-tags ()
0
   (interactive)
0
- (shell-command "find ~/.emacs.d ~/src/emacs -name \\*el | xargs etags -o ~/.emacs.d/TAGS"))
0
+ (shell-command
0
+ "find ~/.emacs.d ~/src/emacs -name \\*el | xargs etags -o ~/.emacs.d/TAGS"))
0
 
0
 (defun my-generate-rails-tags ()
0
   (interactive)
0
- (shell-command (format "find %s | egrep \"rb$\" | xargs ctags-exuberant -a -e -f %s/TAGS --exclude=vendor --exclude=public --exclude=log --exclude=db"
0
+ (shell-command
0
+ (format "find %s | egrep \"rb$\" | xargs ctags-exuberant -a -e -f %s/TAGS --exclude=vendor --exclude=public --exclude=log --exclude=db"
0
                          (rails-root) (rails-root)))
0
   (visit-tags-table (concat (rails-root) "/TAGS")))
0
 
0
@@ -165,8 +182,8 @@
0
   "Insert a lorem ipsum."
0
   (interactive)
0
   (insert "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do "
0
- "eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad "
0
- "minim veniam, quis nostrud exercitation ullamco laboris nisi ut "
0
+ "eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim"
0
+ "ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut "
0
           "aliquip ex ea commodo consequat. Duis aute irure dolor in "
0
           "reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla "
0
           "pariatur. Excepteur sint occaecat cupidatat non proident, sunt in "
...
14
15
16
17
18
19
 
 
 
 
20
21
22
...
14
15
16
 
 
 
17
18
19
20
21
22
23
0
@@ -14,9 +14,10 @@
0
 
0
 (font-lock-add-keywords
0
  'javascript-mode `(("\\(function *\\)("
0
- (0 (progn (compose-region (match-beginning 1) (match-end 1)
0
- ,(make-char 'greek-iso8859-7 107))
0
- nil)))))
0
+ (0 (progn (compose-region (match-beginning 1) (match-end 1)
0
+ ,(make-char 'greek-iso8859-7
0
+ 107))
0
+ nil)))))
0
 
0
 (font-lock-add-keywords
0
  'ruby-mode
...
44
45
46
 
47
48
49
...
44
45
46
47
48
49
50
0
@@ -44,6 +44,7 @@
0
 (winner-mode t)
0
 (recentf-mode 1)
0
 (show-paren-mode 1)
0
+(mouse-avoidance-mode 'exile)
0
 
0
 (when (> emacs-major-version 21)
0
   (ido-mode t)
...
158
159
160
161
162
163
 
 
 
 
164
165
166
...
158
159
160
 
 
 
161
162
163
164
165
166
167
0
@@ -158,9 +158,10 @@
0
 
0
 (add-hook 'ruby-mode-hook
0
           (lambda ()
0
- (when (and buffer-file-name (file-writable-p buffer-file-name))
0
- (local-set-key "C-c d" 'flymake-display-err-menu-for-current-line)
0
- (flymake-mode t))))
0
+ (when (and buffer-file-name (file-writable-p buffer-file-name))
0
+ (local-set-key (kbd "C-c d")
0
+ 'flymake-display-err-menu-for-current-line)
0
+ (flymake-mode t))))
0
 
0
 (ignore-errors
0
   (add-to-list 'load-path "~/src/rinari")
...
1
2
3
4
 
 
5
...
1
2
 
3
4
5
6
0
@@ -1,3 +1,4 @@
0
 export PATH=$PATH:/sbin:/usr/sbin:~/bin:/bin:/usr/bin:/usr/local/bin:/usr/local/sbin:/home/phil/bin/jruby-1.1.2/bin:/var/lib/gems/1.8/bin
0
 export EDITOR="emacsclient"
0
-export JRUBY_HOME=/home/phil/bin/jruby-1.1.2
0
\ No newline at end of file
0
+export JRUBY_HOME=/home/phil/bin/jruby-1.1.2
0
+export JAVA_OPTS="-client"
0
\ No newline at end of file
...
68
69
70
 
71
72
73
...
68
69
70
71
72
73
74
0
@@ -68,6 +68,7 @@
0
 - rxvt-unicode
0
 - screen
0
 - service-discovery-applet
0
+- sloccount
0
 - snes9x-x
0
 - sqlite3
0
 - sshfs
...
9
10
11
12
13
 
 
14
15
16
...
23
24
25
26
 
27
28
29
...
9
10
11
 
 
12
13
14
15
16
...
23
24
25
 
26
27
28
29
0
@@ -9,8 +9,8 @@ require 'fileutils'
0
 begin
0
   FileUtils.cd(File.expand_path("~/.watcher"))
0
 rescue
0
- puts "You need ~/.watcher/config to contain a sender jabber ID, password, and recipient
0
-jabber ID on their own lines."
0
+ puts "You need ~/.watcher/config to contain a sender jabber ID, password, and
0
+recipient jabber ID on their own lines."
0
   exit 1
0
 end
0
 
0
@@ -23,7 +23,7 @@ unless File.exist?(hash)
0
   include Jabber
0
   jid, password, to = File.read('config').split("\n")
0
   message = "#{ARGV.first} changed to #{content[0 .. 200]} ..."
0
-
0
+
0
   jid = JID::new("#{jid}/#{`hostname`.chomp}-watcher")
0
   client = Client::new(jid)
0
   client.connect

Comments

    No one has commented yet.