.emacs 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. ; $Id: .emacs,v 1.5 2008/09/30 08:36:53 george Exp george $
  2. ;
  3. ; George Jones <gmj@pobox.com> .emacs
  4. ;
  5. ; $Log: .emacs,v $
  6. ; Revision 1.5 2008/09/30 08:36:53 george
  7. ; Added acient things
  8. ;
  9. ; Revision 1.4 2008/09/30 08:20:46 george
  10. ; test3
  11. ;
  12. ;
  13. ; My (gmj) stuff from ages past...
  14. ;
  15. ;
  16. ; define useful functions
  17. ;
  18. (defun insert-date ()
  19. "Insert current date and time in buffer"
  20. (interactive)
  21. (insert-string (current-time-string))
  22. )
  23. (setq display-time-day-and-date t
  24. display-time-24hr-format t)
  25. (display-time)
  26. ;
  27. ; Global key bindings
  28. ;
  29. (global-set-key "\C-Xd" 'insert-date)
  30. (global-set-key "\C-\\" 'compile)
  31. (global-set-key "\C-XP" 'plan)
  32. (global-set-key "\C-XR" 'gnus)
  33. (global-set-key "\C-XW" 'w3m)
  34. (global-set-key "\C-]" 'call-last-kbd-macro)
  35. (global-set-key "\eq" 'query-replace)
  36. (global-set-key "\er" 'replace-string)
  37. (global-set-key "\em" 'set-mark-command)
  38. (global-set-key "\e " 'set-mark-command)
  39. (global-set-key "\e#" 'what-line)
  40. (global-set-key "\eg" 'goto-line)
  41. (global-set-key "\ei" 'ispell-buffer)
  42. (global-set-key "\C-X\C-K" 'bury-buffer)
  43. (global-set-key "\C-he" 'emacs-version)
  44. (global-set-key "\C-Xp" 'fill-paragraph)
  45. (global-set-key "\C-Xc" 'copy-region-as-kill)
  46. (global-set-key "\C-X!" 'compile)
  47. (global-unset-key "\C-X\C-l")
  48. ; General font stuff
  49. (set-default-font "12x24")
  50. ;(set-background-color "AntiqueWhite")
  51. ;(set-foreground-color "Black")
  52. ;;; Add some components to emacs' path
  53. (setq load-path (append (list (concat (getenv "HOME") "/.lisp"))
  54. load-path))
  55. ;
  56. ; Package setup - planner
  57. ;
  58. (setq planner-project "WikiPlanner")
  59. (setq muse-project-alist
  60. '(("WikiPlanner"
  61. ("~/Plans" ;; where your Planner pages are located
  62. :default "TaskPool" ;; use value of `planner-default-page'
  63. :major-mode planner-mode
  64. :visit-link planner-visit-link)
  65. ;; This next part is for specifying where Planner pages
  66. ;; should be published and what Muse publishing style to
  67. ;; use. In this example, we will use the XHTML publishing
  68. ;; style.
  69. (:base "planner-xhtml"
  70. ;; where files are published to
  71. ;; (the value of `planner-publishing-directory', if
  72. ;; you have a configuration for an older version
  73. ;; of Planner)
  74. :path "~/public_html/Plans"))))
  75. '
  76. ; (add-to-list 'load-path "/usr/share/emacs22/site-lisp/muse-el/")
  77. ; (add-to-list 'load-path "/path/to/planner")
  78. ; (add-to-list 'load-path "/path/to/remember")
  79. (require 'planner)
  80. ; mail setings
  81. ;(setq user-full-name "George M Jones")
  82. ;(setq user-mail-address "eludom@gmail.com")
  83. ;(setq user-mail-replyto-address "gmj@port111.com")
  84. ;(setq mail-default-reply-to "gmj@PObox.com")
  85. ;
  86. ;
  87. ; Acient things from UUNET (and before ???)
  88. ;
  89. ;
  90. ;;
  91. ;; HTML Editing setup
  92. ;;
  93. ;
  94. ;;(setq auto-mode-alist (cons '("\\.html$" . html-helper-mode) auto-mode-alist))
  95. ;;(setq html-helper-do-write-file-hooks t)
  96. ;;(setq html-helper-build-new-buffer t)
  97. ;;(autoload 'html-helper-mode "html-helper-mode" "Yay HTML" t)
  98. ;
  99. ;;(set-background-color "black")
  100. ;
  101. ;
  102. ;;
  103. ;; Stuff from lamour@uu.net...
  104. ;;
  105. ;
  106. ;;(setq debug-on-error t)
  107. ;
  108. ;;; Enable the commands `narrow-to-region' ("C-x n n") and
  109. ;;; `eval-expression' ("M-ESC", or "ESC ESC"). Both are useful
  110. ;;; commands, but they can be confusing for a new user, so they're
  111. ;;; disabled by default.
  112. ;(put 'narrow-to-region 'disabled nil)
  113. ;(put 'eval-expression 'disabled nil)
  114. ;(put 'downcase-region 'disabled nil)
  115. ;
  116. ;;; Set some sensible defaults
  117. ;(setq inhibit-startup-message t
  118. ; require-final-newline t
  119. ; default-major-mode 'text-mode
  120. ; text-mode-hook 'turn-on-auto-fill
  121. ; describe-function-show-arglist t)
  122. ;
  123. ;;; Make all modifiers behave like ESC does
  124. ;;(setq modifier-keys-are-sticky t)
  125. ;
  126. ;;; Set some external commands
  127. ;;(setq explicit-shell-file-name "/usr/local/bin/zsh"
  128. ;; grep-command "egrep")
  129. ;
  130. ;;;; Add some components to emacs' path
  131. ;;(setq load-path (append (list (concat (getenv "HOME") "/emacs/lisp"))
  132. ;; load-path))
  133. ;(setq load-path (append (list (concat (getenv "HOME") "/lisp"))
  134. ; load-path))
  135. ;(setq load-path (append (list (concat (getenv "HOME") "/lisp/sc"))
  136. ; load-path))
  137. ;;(setq load-path (append (list (concat (getenv "HOME") "/lisp/gnus"))
  138. ;; load-path))
  139. ;;(setq load-path (append (list (concat (getenv "HOME") "/lisp/custom"))
  140. ;; load-path))
  141. ;
  142. ;;
  143. ;; Mail stuff
  144. ;;
  145. ;
  146. ;;;; ********************
  147. ;;;; (ding) gnus stuff moved to ~/.gnus
  148. ;;; mail settings
  149. ;(setq message-directory "~/mail/"
  150. ; gnus-directory "~/news/"
  151. ; message-autosave-directory "~/mail/"
  152. ;; mail-host-address "opal.he.net"
  153. ;; message-default-headers (concat "Reply-To: " (user-login-name) "@uu.net\n"))
  154. ; message-default-headers (concat "Reply-To: " "gmj" "@pobox.com\n"))
  155. ;
  156. ;
  157. ;;; Supercite
  158. ;(autoload 'sc-cite-original "supercite" "Supercite 3.1" t)
  159. ;(autoload 'sc-cite "supercite" "Supercite 3.1" t)
  160. ;(setq mail-yank-hooks 'sc-cite-original)
  161. ;(setq sc-downcase-p t)
  162. ;(setq sc-preferred-attribution-list
  163. ; '("sc-lastchoice" "x-attribution" "sc-consult"
  164. ; "initials" "firstname" "lastname"))
  165. ;
  166. ;; Found this config here:
  167. ;; http://www.emacswiki.org/cgi-bin/wiki/JorgenSchaefersEmacsConfig
  168. (defun fc-choose-browser (url &rest args)
  169. (interactive "sURL: ")
  170. (if (y-or-n-p "Use external browser? ")
  171. (browse-url-generic url)
  172. (w3m-browse-url url)))
  173. (setq browse-url-browser-function 'fc-choose-browser)
  174. (global-set-key "\C-xm" 'browse-url-at-point)