Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

changes

  • Loading branch information...
commit 0e4e31067d7f1f82daa0e5737f16cea497c447ed 1 parent 338b498
John Wiegley authored

Showing 3 changed files with 30 additions and 227 deletions. Show diff stats Hide diff stats

  1. +17 10 .emacs.el
  2. +13 0 org-devonthink.el
  3. +0 217 packages/lisp.el
27 .emacs.el
@@ -10,6 +10,7 @@
10 10 (reverse
11 11 (list (expand-file-name "~/Library/Emacs")
12 12 (expand-file-name "~/Library/Emacs/site-lisp/circe")
  13 + (expand-file-name "~/Library/Emacs/site-lisp/distel/elisp")
13 14 (expand-file-name "~/Library/Emacs/site-lisp/emacs-w3m")
14 15 (expand-file-name "~/Library/Emacs/site-lisp/epg")
15 16 (expand-file-name "~/Library/Emacs/site-lisp/muse/lisp")
@@ -63,7 +64,6 @@
63 64 ;; If you edit it by hand, you could mess it up, so be careful.
64 65 ;; Your init file should contain only one such instance.
65 66 ;; If there is more than one, they won't work right.
66   - '(Info-additional-directory-list (quote ("~/Library/Info")))
67 67 '(abbrev-mode t)
68 68 '(after-save-hook (quote (executable-make-buffer-file-executable-if-script-p)))
69 69 '(align-c++-modes (quote (csharp-mode c++-mode c-mode java-mode groovy-mode)))
@@ -284,9 +284,7 @@
284 284
285 285 ;;;_* packages
286 286
287   -(dolist (package-init-file
288   - (directory-files "~/Library/Emacs/packages" t "\\.el$" t))
289   - (load package-init-file))
  287 +(mapc #'load (directory-files "~/Library/Emacs/lang" t "\\.el$" t))
290 288
291 289 ;;;_ * abbrev
292 290
@@ -330,7 +328,7 @@
330 328 (setq circe-default-realname "http://www.newartisans.com/"
331 329 circe-server-coding-system '(utf-8 . undecided)
332 330 circe-server-auto-join-channels
333   - '(("^freenode$" "#ledger" "#emacs"))
  331 + '(("^freenode$" "#ledger"))
334 332 circe-nickserv-passwords '(("freenode" "xco8imer")))
335 333
336 334 (setq lui-max-buffer-size 30000
@@ -497,6 +495,13 @@ This is an appropriate function for `lui-pre-output-hook'."
497 495
498 496 (load "flyspell-ext" t)
499 497
  498 +;;;_ * git
  499 +
  500 +(require 'git)
  501 +(require 'vc-git)
  502 +
  503 +(add-to-list 'vc-handled-backends 'GIT)
  504 +
500 505 ;;;_ * groovy-mode
501 506
502 507 ;(autoload 'groovy-mode "groovy-mode" "" t)
@@ -750,6 +755,7 @@ This can be 0 for immediate, or a floating point value.")
750 755 (time-to-seconds (org-time-string-to-time (match-string 0))))))
751 756
752 757 (defun org-my-sort-done-tasks ()
  758 + (interactive)
753 759 (goto-char (point-min))
754 760 (org-sort-entries-or-items nil ?F #'org-get-inactive-time)
755 761 (let (after-save-hook)
@@ -776,7 +782,7 @@ This can be 0 for immediate, or a floating point value.")
776 782 (call-interactively 'org-ctrl-c-ctrl-c)
777 783 (let ((org-remember-templates
778 784 '((110 "* NOTE %?\n %u" "~/Documents/Pending/todo.txt" "Tasks"))))
779   - (call-interactively 'org-remember))))
  785 + (call-interactively 'org-remember))))
780 786
781 787 (defun org-insert-new-element (txt)
782 788 "Given a task subtree as TXT, insert it into the current org-mode buffer."
@@ -969,9 +975,9 @@ end tell" (format-time-string "%B %e, %Y %l:%M:%S %p"
969 975
970 976 ;;;_ * svk
971 977
972   -(load "psvn" t)
973   -(load "psvn-svk" t)
974   -(load "psvn-svn" t)
  978 +;;(load "psvn" t)
  979 +;;(load "psvn-svk" t)
  980 +;;(load "psvn-svn" t)
975 981 ;;(load "vc-svk" t)
976 982 ;;(load "svk-ediff" t)
977 983
@@ -1323,6 +1329,7 @@ instead of hostname:portnum."
1323 1329
1324 1330 ;;;_ * ctl-x
1325 1331
  1332 +(define-key ctl-x-map [?d] 'delete-whitespace-rectangle)
1326 1333 (define-key ctl-x-map [?t] 'toggle-truncate-lines)
1327 1334
1328 1335 (defun unfill-paragraph (arg)
@@ -1459,7 +1466,7 @@ expand wildcards (if any) and visit multiple files."
1459 1466
1460 1467 (define-key mode-specific-map [?a] 'org-agenda)
1461 1468 (define-key mode-specific-map [?c] 'clone-region-set-mode)
1462   -(define-key mode-specific-map [?d] 'delete-whitespace-rectangle)
  1469 +(define-key mode-specific-map [?d] 'org-insert-dtp-link)
1463 1470
1464 1471 (define-key mode-specific-map [?e ?a] 'byte-recompile-directory)
1465 1472
13 org-devonthink.el
@@ -16,6 +16,19 @@
16 16 open window for record (get record at \"%s\")
17 17 end tell" (replace-regexp-in-string "%20" " " record-location))))
18 18
  19 +(defun org-insert-dtp-link ()
  20 + (interactive)
  21 + (let ((name (read (do-applescript (format "
  22 + tell application \"DEVONthink Pro\"
  23 + get name of content record
  24 + end tell"))))
  25 + (location (read (do-applescript (format "
  26 + tell application \"DEVONthink Pro\"
  27 + get location of content record
  28 + end tell")))))
  29 + (insert (org-make-link-string
  30 + (concat "dtp://" (concat location name)) name))))
  31 +
19 32 (defun org-dtp-store-link ()
20 33 "Store a link to an dtp e-mail message by Message-ID."
21 34 (let ((link-name
217 packages/lisp.el
... ... @@ -1,217 +0,0 @@
1   -;;;_ * cldoc
2   -
3   -(autoload 'turn-on-cldoc-mode "cldoc" nil t)
4   -
5   -(dolist (hook '(lisp-mode-hook
6   - slime-repl-mode-hook))
7   - (add-hook hook 'turn-on-cldoc-mode))
8   -
9   -;;;_ * ansicl
10   -
11   -(require 'info-look)
12   -
13   -(dolist (mode '(lisp-mode slime-mode slime-repl-mode
14   - inferior-slime-mode))
15   - (info-lookup-add-help :mode mode
16   - :regexp "[^][()'\" \t\n]+"
17   - :ignore-case t
18   - :doc-spec '(("(ansicl)Symbol Index" nil nil nil))))
19   -
20   -(eval-after-load "lisp-mode"
21   - '(progn
22   - (define-key lisp-mode-map [(control ?h) ?f] 'info-lookup-symbol)))
23   -
24   -(defadvice Info-exit (after remove-info-window activate)
25   - "When info mode is quit, remove the window."
26   - (if (> (length (window-list)) 1)
27   - (delete-window)))
28   -
29   -;;;_ * emacs-lisp
30   -
31   -(defun elisp-indent-or-complete (&optional arg)
32   - (interactive "p")
33   - (call-interactively 'lisp-indent-line)
34   - (unless (or (looking-back "^\\s-*")
35   - (bolp)
36   - (not (looking-back "[-A-Za-z0-9_*+/=<>!?]+")))
37   - (call-interactively 'lisp-complete-symbol)))
38   -
39   -(eval-after-load "lisp-mode"
40   - '(progn
41   - (define-key emacs-lisp-mode-map [tab] 'elisp-indent-or-complete)))
42   -
43   -;;;_ * lisp
44   -
45   -(add-hook 'lisp-mode-hook 'turn-on-auto-fill)
46   -
47   -(defun format-it ()
48   - (interactive)
49   - (let ((sym (thing-at-point 'symbol)))
50   - (delete-backward-char (length sym))
51   - (insert "(format t \"" sym " = ~S~%\" " sym ")")))
52   -
53   -(put 'iterate 'lisp-indent-function 1)
54   -(put 'mapping 'lisp-indent-function 1)
55   -(put 'producing 'lisp-indent-function 1)
56   -
57   -(eval-after-load "speedbar"
58   - '(progn
59   - (add-to-list 'speedbar-obj-alist '("\\.lisp$" . ".fasl"))
60   - (speedbar-add-supported-extension ".lisp")))
61   -
62   -(mapc (lambda (major-mode)
63   - (font-lock-add-keywords
64   - major-mode
65   - `(("(\\(lambda\\)\\>"
66   - (0 (ignore
67   - (compose-region (match-beginning 1)
68   - (match-end 1) ?λ)))))))
69   - '(emacs-lisp-mode inferior-emacs-lisp-mode lisp-mode slime-repl-mode
70   - inferior-lisp-mode scheme-mode scheme48-mode
71   - inferior-scheme-mode))
72   -
73   -(autoload 'column-marker-1 "column-marker")
74   -
75   -(add-hook 'lisp-mode-hook (lambda () (interactive) (column-marker-1 79)))
76   -
77   -;;;_ * paredit
78   -
79   -(autoload 'paredit-mode "paredit"
80   - "Minor mode for pseudo-structurally editing Lisp code." t)
81   -(autoload 'turn-on-paredit-mode "paredit"
82   - "Minor mode for pseudo-structurally editing Lisp code." t)
83   -
84   -(dolist (hook '(emacs-lisp-mode-hook
85   - lisp-mode-hook
86   - slime-repl-mode-hook))
87   - (add-hook hook 'turn-on-paredit-mode))
88   -
89   -;;;_ * redhank
90   -
91   -(autoload 'redshank-mode "redshank"
92   - "Minor mode for restructuring Lisp code (i.e., refactoring)." t)
93   -
94   -(dolist (hook '(emacs-lisp-mode-hook
95   - lisp-mode-hook
96   - slime-repl-mode-hook))
97   - (add-hook hook #'(lambda () (redshank-mode +1))))
98   -
99   -;;;_ * slime
100   -
101   -(add-to-list 'load-path "~/Library/Emacs/site-lisp/slime")
102   -(add-to-list 'load-path "~/Library/Emacs/site-lisp/slime/contrib")
103   -
104   -(require 'slime)
105   -
106   -(slime-setup
107   - '(inferior-slime
108   - slime-asdf
109   - slime-autodoc
110   - slime-banner
111   - slime-c-p-c
112   - slime-editing-commands
113   - slime-fancy-inspector
114   - slime-fancy
115   - slime-fuzzy
116   - slime-highlight-edits
117   - slime-parse
118   - slime-presentation-streams
119   - slime-presentations
120   - slime-references
121   - slime-scratch
122   - slime-tramp
123   - ;; slime-typeout-frame
124   - slime-xref-browser))
125   -
126   -;;(setq slime-net-coding-system 'utf-8-unix)
127   -
128   -(setq slime-lisp-implementations
129   - '((sbcl ("sbcl" "--core" "/Users/johnw/Library/Lisp/sbcl.core-with-slime-X86")
130   - :init (lambda (port-file _)
131   - (format "(swank:start-server %S :coding-system \"utf-8-unix\")\n"
132   - port-file))
133   - :coding-system utf-8-unix)
134   - (sbcl64 ("/usr/local/stow/sbcl-X86-64/bin/sbcl"
135   - "--core" "/Users/johnw/Library/Lisp/sbcl.core-with-slime-X86-64")
136   - :init (lambda (port-file _)
137   - (format "(swank:start-server %S :coding-system \"utf-8-unix\")\n"
138   - port-file))
139   - :coding-system utf-8-unix)
140   - (cmucl ("lisp" "-load" "/Users/johnw/Library/Lisp/lwinit.lisp"))
141   - (ecl ("ecl" "-load" "/Users/johnw/Library/Lisp/lwinit.lisp"))
142   - (allegro ("/Users/johnw/Applications/AllegroCL/alisp"
143   - "-s" "/Users/johnw/Library/Lisp/lwinit.lisp"))
144   - (clisp ("clisp" "-i" "/Users/johnw/Library/Lisp/lwinit.lisp")
145   - :coding-system utf-8-unix)
146   - (abcl ("java" "-jar" "/Users/johnw/src/abcl/abcl.jar")
147   - :init (lambda (port-file _)
148   - (format
149   - "(cl:progn
150   - (cl:load \"/Users/johnw/Library/Lisp/lwinit.lisp\")
151   - (funcall (symbol-function
152   - (find-symbol \"START-SERVER\"
153   - (find-package \"SWANK\"))) %S))\n"
154   - port-file)))
155   - (openmcl ("/usr/local/stow/openmcl-darwinx8664-snapshot-070722/dx86cl64"
156   - "-l" "/Users/johnw/Library/Lisp/lwinit.lisp"))))
157   -
158   -(setq slime-default-lisp 'sbcl)
159   -(setq slime-complete-symbol*-fancy t)
160   -(setq slime-complete-symbol-function 'slime-fuzzy-complete-symbol)
161   -
162   -(defun sbcl (&optional arg)
163   - (interactive "P")
164   - (let ((slime-default-lisp (if arg 'sbcl64 'sbcl))
165   - (current-prefix-arg nil))
166   - (slime)))
167   -(defun clisp () (interactive) (let ((slime-default-lisp 'clisp)) (slime)))
168   -(defun cmucl () (interactive) (let ((slime-default-lisp 'cmucl)) (slime)))
169   -(defun ecl () (interactive) (let ((slime-default-lisp 'ecl)) (slime)))
170   -(defun abcl () (interactive) (let ((slime-default-lisp 'abcl)) (slime)))
171   -(defun allegro () (interactive) (let ((slime-default-lisp 'allegro)) (slime)))
172   -(defun openmcl () (interactive) (let ((slime-default-lisp 'openmcl)) (slime)))
173   -
174   -;; LispWorks is run externally
175   -
176   -;; ClozureCL fails to load Swank
177   -;; GCL fails to build on Mac OS X 10.5.1
178   -;; (defun gcl () (interactive) (let ((slime-default-lisp 'gcl)) (slime)))
179   -
180   -(defun start-slime ()
181   - (interactive)
182   - (unless (slime-connected-p)
183   - (save-excursion (slime))))
184   -
185   -(add-hook 'slime-mode-hook 'start-slime)
186   -(add-hook 'slime-load-hook #'(lambda () (require 'slime-fancy)))
187   -(add-hook 'inferior-lisp-mode-hook #'(lambda () (inferior-slime-mode t)))
188   -
189   -(eval-after-load "hyperspec"
190   - '(progn
191   - (setq common-lisp-hyperspec-root
192   - "/Users/johnw/Reference/Computing/Languages/Common Lisp/HyperSpec/")))
193   -
194   -(defun indent-or-complete (&optional arg)
195   - (interactive "p")
196   - (if (or (looking-back "^\\s-*") (bolp))
197   - (call-interactively 'lisp-indent-line)
198   - (call-interactively 'slime-indent-and-complete-symbol)))
199   -
200   -(eval-after-load "lisp-mode"
201   - '(progn
202   - (define-key lisp-mode-map [tab] 'indent-or-complete)
203   - (define-key lisp-mode-map [(meta ?q)] 'slime-reindent-defun)
204   - (define-key lisp-mode-map [(meta ?l)] 'slime-selector)))
205   -
206   -(eval-after-load "slime"
207   - '(progn
208   - (define-key slime-mode-map [return] 'paredit-newline)
209   - (define-key slime-repl-mode-map [tab] 'indent-or-complete)
210   - (define-key slime-repl-mode-map [(control return)] 'other-window)
211   -
212   - (define-key inferior-slime-mode-map [(control ?c) (control ?p)]
213   - 'slime-repl-previous-prompt)
214   -
215   - (define-key slime-mode-map [(control ?h) ?f] 'info-lookup-symbol)
216   - (define-key slime-repl-mode-map [(control ?h) ?f] 'info-lookup-symbol)
217   - (define-key inferior-slime-mode-map [(control ?h) ?f] 'info-lookup-symbol)))

0 comments on commit 0e4e310

Please sign in to comment.
Something went wrong with that request. Please try again.