Skip to content
Browse files

changes

  • Loading branch information...
1 parent 338b498 commit 0e4e31067d7f1f82daa0e5737f16cea497c447ed @jwiegley committed Feb 28, 2008
Showing with 30 additions and 227 deletions.
  1. +17 −10 .emacs.el
  2. +13 −0 org-devonthink.el
  3. +0 −217 packages/lisp.el
View
27 .emacs.el
@@ -10,6 +10,7 @@
(reverse
(list (expand-file-name "~/Library/Emacs")
(expand-file-name "~/Library/Emacs/site-lisp/circe")
+ (expand-file-name "~/Library/Emacs/site-lisp/distel/elisp")
(expand-file-name "~/Library/Emacs/site-lisp/emacs-w3m")
(expand-file-name "~/Library/Emacs/site-lisp/epg")
(expand-file-name "~/Library/Emacs/site-lisp/muse/lisp")
@@ -63,7 +64,6 @@
;; 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 ("~/Library/Info")))
'(abbrev-mode t)
'(after-save-hook (quote (executable-make-buffer-file-executable-if-script-p)))
'(align-c++-modes (quote (csharp-mode c++-mode c-mode java-mode groovy-mode)))
@@ -284,9 +284,7 @@
;;;_* packages
-(dolist (package-init-file
- (directory-files "~/Library/Emacs/packages" t "\\.el$" t))
- (load package-init-file))
+(mapc #'load (directory-files "~/Library/Emacs/lang" t "\\.el$" t))
;;;_ * abbrev
@@ -330,7 +328,7 @@
(setq circe-default-realname "http://www.newartisans.com/"
circe-server-coding-system '(utf-8 . undecided)
circe-server-auto-join-channels
- '(("^freenode$" "#ledger" "#emacs"))
+ '(("^freenode$" "#ledger"))
circe-nickserv-passwords '(("freenode" "xco8imer")))
(setq lui-max-buffer-size 30000
@@ -497,6 +495,13 @@ This is an appropriate function for `lui-pre-output-hook'."
(load "flyspell-ext" t)
+;;;_ * git
+
+(require 'git)
+(require 'vc-git)
+
+(add-to-list 'vc-handled-backends 'GIT)
+
;;;_ * groovy-mode
;(autoload 'groovy-mode "groovy-mode" "" t)
@@ -750,6 +755,7 @@ This can be 0 for immediate, or a floating point value.")
(time-to-seconds (org-time-string-to-time (match-string 0))))))
(defun org-my-sort-done-tasks ()
+ (interactive)
(goto-char (point-min))
(org-sort-entries-or-items nil ?F #'org-get-inactive-time)
(let (after-save-hook)
@@ -776,7 +782,7 @@ This can be 0 for immediate, or a floating point value.")
(call-interactively 'org-ctrl-c-ctrl-c)
(let ((org-remember-templates
'((110 "* NOTE %?\n %u" "~/Documents/Pending/todo.txt" "Tasks"))))
- (call-interactively 'org-remember))))
+ (call-interactively 'org-remember))))
(defun org-insert-new-element (txt)
"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"
;;;_ * svk
-(load "psvn" t)
-(load "psvn-svk" t)
-(load "psvn-svn" t)
+;;(load "psvn" t)
+;;(load "psvn-svk" t)
+;;(load "psvn-svn" t)
;;(load "vc-svk" t)
;;(load "svk-ediff" t)
@@ -1323,6 +1329,7 @@ instead of hostname:portnum."
;;;_ * ctl-x
+(define-key ctl-x-map [?d] 'delete-whitespace-rectangle)
(define-key ctl-x-map [?t] 'toggle-truncate-lines)
(defun unfill-paragraph (arg)
@@ -1459,7 +1466,7 @@ expand wildcards (if any) and visit multiple files."
(define-key mode-specific-map [?a] 'org-agenda)
(define-key mode-specific-map [?c] 'clone-region-set-mode)
-(define-key mode-specific-map [?d] 'delete-whitespace-rectangle)
+(define-key mode-specific-map [?d] 'org-insert-dtp-link)
(define-key mode-specific-map [?e ?a] 'byte-recompile-directory)
View
13 org-devonthink.el
@@ -16,6 +16,19 @@
open window for record (get record at \"%s\")
end tell" (replace-regexp-in-string "%20" " " record-location))))
+(defun org-insert-dtp-link ()
+ (interactive)
+ (let ((name (read (do-applescript (format "
+ tell application \"DEVONthink Pro\"
+ get name of content record
+ end tell"))))
+ (location (read (do-applescript (format "
+ tell application \"DEVONthink Pro\"
+ get location of content record
+ end tell")))))
+ (insert (org-make-link-string
+ (concat "dtp://" (concat location name)) name))))
+
(defun org-dtp-store-link ()
"Store a link to an dtp e-mail message by Message-ID."
(let ((link-name
View
217 packages/lisp.el
@@ -1,217 +0,0 @@
-;;;_ * cldoc
-
-(autoload 'turn-on-cldoc-mode "cldoc" nil t)
-
-(dolist (hook '(lisp-mode-hook
- slime-repl-mode-hook))
- (add-hook hook 'turn-on-cldoc-mode))
-
-;;;_ * ansicl
-
-(require 'info-look)
-
-(dolist (mode '(lisp-mode slime-mode slime-repl-mode
- inferior-slime-mode))
- (info-lookup-add-help :mode mode
- :regexp "[^][()'\" \t\n]+"
- :ignore-case t
- :doc-spec '(("(ansicl)Symbol Index" nil nil nil))))
-
-(eval-after-load "lisp-mode"
- '(progn
- (define-key lisp-mode-map [(control ?h) ?f] 'info-lookup-symbol)))
-
-(defadvice Info-exit (after remove-info-window activate)
- "When info mode is quit, remove the window."
- (if (> (length (window-list)) 1)
- (delete-window)))
-
-;;;_ * emacs-lisp
-
-(defun elisp-indent-or-complete (&optional arg)
- (interactive "p")
- (call-interactively 'lisp-indent-line)
- (unless (or (looking-back "^\\s-*")
- (bolp)
- (not (looking-back "[-A-Za-z0-9_*+/=<>!?]+")))
- (call-interactively 'lisp-complete-symbol)))
-
-(eval-after-load "lisp-mode"
- '(progn
- (define-key emacs-lisp-mode-map [tab] 'elisp-indent-or-complete)))
-
-;;;_ * lisp
-
-(add-hook 'lisp-mode-hook 'turn-on-auto-fill)
-
-(defun format-it ()
- (interactive)
- (let ((sym (thing-at-point 'symbol)))
- (delete-backward-char (length sym))
- (insert "(format t \"" sym " = ~S~%\" " sym ")")))
-
-(put 'iterate 'lisp-indent-function 1)
-(put 'mapping 'lisp-indent-function 1)
-(put 'producing 'lisp-indent-function 1)
-
-(eval-after-load "speedbar"
- '(progn
- (add-to-list 'speedbar-obj-alist '("\\.lisp$" . ".fasl"))
- (speedbar-add-supported-extension ".lisp")))
-
-(mapc (lambda (major-mode)
- (font-lock-add-keywords
- major-mode
- `(("(\\(lambda\\)\\>"
- (0 (ignore
- (compose-region (match-beginning 1)
- (match-end 1) ?λ)))))))
- '(emacs-lisp-mode inferior-emacs-lisp-mode lisp-mode slime-repl-mode
- inferior-lisp-mode scheme-mode scheme48-mode
- inferior-scheme-mode))
-
-(autoload 'column-marker-1 "column-marker")
-
-(add-hook 'lisp-mode-hook (lambda () (interactive) (column-marker-1 79)))
-
-;;;_ * paredit
-
-(autoload 'paredit-mode "paredit"
- "Minor mode for pseudo-structurally editing Lisp code." t)
-(autoload 'turn-on-paredit-mode "paredit"
- "Minor mode for pseudo-structurally editing Lisp code." t)
-
-(dolist (hook '(emacs-lisp-mode-hook
- lisp-mode-hook
- slime-repl-mode-hook))
- (add-hook hook 'turn-on-paredit-mode))
-
-;;;_ * redhank
-
-(autoload 'redshank-mode "redshank"
- "Minor mode for restructuring Lisp code (i.e., refactoring)." t)
-
-(dolist (hook '(emacs-lisp-mode-hook
- lisp-mode-hook
- slime-repl-mode-hook))
- (add-hook hook #'(lambda () (redshank-mode +1))))
-
-;;;_ * slime
-
-(add-to-list 'load-path "~/Library/Emacs/site-lisp/slime")
-(add-to-list 'load-path "~/Library/Emacs/site-lisp/slime/contrib")
-
-(require 'slime)
-
-(slime-setup
- '(inferior-slime
- slime-asdf
- slime-autodoc
- slime-banner
- slime-c-p-c
- slime-editing-commands
- slime-fancy-inspector
- slime-fancy
- slime-fuzzy
- slime-highlight-edits
- slime-parse
- slime-presentation-streams
- slime-presentations
- slime-references
- slime-scratch
- slime-tramp
- ;; slime-typeout-frame
- slime-xref-browser))
-
-;;(setq slime-net-coding-system 'utf-8-unix)
-
-(setq slime-lisp-implementations
- '((sbcl ("sbcl" "--core" "/Users/johnw/Library/Lisp/sbcl.core-with-slime-X86")
- :init (lambda (port-file _)
- (format "(swank:start-server %S :coding-system \"utf-8-unix\")\n"
- port-file))
- :coding-system utf-8-unix)
- (sbcl64 ("/usr/local/stow/sbcl-X86-64/bin/sbcl"
- "--core" "/Users/johnw/Library/Lisp/sbcl.core-with-slime-X86-64")
- :init (lambda (port-file _)
- (format "(swank:start-server %S :coding-system \"utf-8-unix\")\n"
- port-file))
- :coding-system utf-8-unix)
- (cmucl ("lisp" "-load" "/Users/johnw/Library/Lisp/lwinit.lisp"))
- (ecl ("ecl" "-load" "/Users/johnw/Library/Lisp/lwinit.lisp"))
- (allegro ("/Users/johnw/Applications/AllegroCL/alisp"
- "-s" "/Users/johnw/Library/Lisp/lwinit.lisp"))
- (clisp ("clisp" "-i" "/Users/johnw/Library/Lisp/lwinit.lisp")
- :coding-system utf-8-unix)
- (abcl ("java" "-jar" "/Users/johnw/src/abcl/abcl.jar")
- :init (lambda (port-file _)
- (format
- "(cl:progn
- (cl:load \"/Users/johnw/Library/Lisp/lwinit.lisp\")
- (funcall (symbol-function
- (find-symbol \"START-SERVER\"
- (find-package \"SWANK\"))) %S))\n"
- port-file)))
- (openmcl ("/usr/local/stow/openmcl-darwinx8664-snapshot-070722/dx86cl64"
- "-l" "/Users/johnw/Library/Lisp/lwinit.lisp"))))
-
-(setq slime-default-lisp 'sbcl)
-(setq slime-complete-symbol*-fancy t)
-(setq slime-complete-symbol-function 'slime-fuzzy-complete-symbol)
-
-(defun sbcl (&optional arg)
- (interactive "P")
- (let ((slime-default-lisp (if arg 'sbcl64 'sbcl))
- (current-prefix-arg nil))
- (slime)))
-(defun clisp () (interactive) (let ((slime-default-lisp 'clisp)) (slime)))
-(defun cmucl () (interactive) (let ((slime-default-lisp 'cmucl)) (slime)))
-(defun ecl () (interactive) (let ((slime-default-lisp 'ecl)) (slime)))
-(defun abcl () (interactive) (let ((slime-default-lisp 'abcl)) (slime)))
-(defun allegro () (interactive) (let ((slime-default-lisp 'allegro)) (slime)))
-(defun openmcl () (interactive) (let ((slime-default-lisp 'openmcl)) (slime)))
-
-;; LispWorks is run externally
-
-;; ClozureCL fails to load Swank
-;; GCL fails to build on Mac OS X 10.5.1
-;; (defun gcl () (interactive) (let ((slime-default-lisp 'gcl)) (slime)))
-
-(defun start-slime ()
- (interactive)
- (unless (slime-connected-p)
- (save-excursion (slime))))
-
-(add-hook 'slime-mode-hook 'start-slime)
-(add-hook 'slime-load-hook #'(lambda () (require 'slime-fancy)))
-(add-hook 'inferior-lisp-mode-hook #'(lambda () (inferior-slime-mode t)))
-
-(eval-after-load "hyperspec"
- '(progn
- (setq common-lisp-hyperspec-root
- "/Users/johnw/Reference/Computing/Languages/Common Lisp/HyperSpec/")))
-
-(defun indent-or-complete (&optional arg)
- (interactive "p")
- (if (or (looking-back "^\\s-*") (bolp))
- (call-interactively 'lisp-indent-line)
- (call-interactively 'slime-indent-and-complete-symbol)))
-
-(eval-after-load "lisp-mode"
- '(progn
- (define-key lisp-mode-map [tab] 'indent-or-complete)
- (define-key lisp-mode-map [(meta ?q)] 'slime-reindent-defun)
- (define-key lisp-mode-map [(meta ?l)] 'slime-selector)))
-
-(eval-after-load "slime"
- '(progn
- (define-key slime-mode-map [return] 'paredit-newline)
- (define-key slime-repl-mode-map [tab] 'indent-or-complete)
- (define-key slime-repl-mode-map [(control return)] 'other-window)
-
- (define-key inferior-slime-mode-map [(control ?c) (control ?p)]
- 'slime-repl-previous-prompt)
-
- (define-key slime-mode-map [(control ?h) ?f] 'info-lookup-symbol)
- (define-key slime-repl-mode-map [(control ?h) ?f] 'info-lookup-symbol)
- (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.