bash_profile: Don't call `vt-is-UTF8' on a pty.
[profile] / emacs
diff --git a/emacs b/emacs
index e803bdc..9f18596 100644 (file)
--- a/emacs
+++ b/emacs
@@ -60,6 +60,8 @@
 
 (trap (or mdw-fast-startup (require 'tex-site)))
 
+(trap (or mdw-fast-startup (semantic-load-enable-minimum-features)))
+
 ;; --- Skeleton stuff ---
 
 (trap (or mdw-fast-startup (require 'skel-init)))
 (setq sendmail-program "~/bin/sendmail-hack")
 
 (setq mail-user-agent 'message-user-agent)
+(setq message-signature-separator "^-- \\(\\|\\[mdw\\]\\)$"
+      message-yank-prefix "> "
+      message-yank-cited-prefix "> "
+      message-indent-citation-function '(message-indent-citation
+                                        mdw-trim-spaces-after-citing))
+
+(defun mdw-trim-spaces-after-citing ()
+  (save-excursion
+    (save-restriction
+      (narrow-to-region (point) (mark t))
+      (while (re-search-forward "^> +$" nil t)
+       (replace-match ">")))))
 
 (and (fboundp 'turn-on-gnus-dired-mode)
      (not mdw-fast-startup)
      (add-hook 'dired-mode-hook 'turn-on-gnus-dired-mode))
 
 (or mdw-fast-startup
-    (trap (bbdb-initialize 'gnus 'sendmail 'vm 'message)))
+    (trap (bbdb-initialize 'gnus 'sendmail 'message)))
 (setq bbdb-north-american-phone-numbers-p nil)
 
 ;; --- Customization ---
 (setq appt-display-interval 3)
 (setq appt-message-warning-time 10)
 
+;; --- Org-mode agenda ---
+
+(setq org-agenda-include-diary t
+      org-tags-column -77)
+
 ;; --- Cosmetic stuff ---
 
 (setq display-time-24hr-format t)
 (global-set-key [?\C-x ?w ?l] 'windmove-right)
 (global-set-key [?\C-x ?g ?l] 'org-store-link)
 (global-set-key [?\C-x ?g ?a] 'org-agenda)
+(global-set-key [?\C-x ?g ?b] 'org-iswitchb)
 (global-set-key [?\C-x ?t ?i] 'timeclock-in)
 (global-set-key [?\C-x ?t ?c] 'timeclock-change)
 (global-set-key [?\C-x ?t ?o] 'timeclock-out)
                'mouse-drag-vertical-line)
 (global-set-key [vertical-scroll-bar C-mouse-1]
                #'(lambda () (interactive)))
+(global-set-key [XF86WakeUp] "")
+(and (not mdw-fast-startup) (fboundp 'hippie-expand)
+     (global-set-key [?\M-/] 'hippie-expand))
+
+(add-hook 'org-mode-hook
+         #'(lambda () (mdw-clobber-evil-keymap org-mode-map)))
+(add-hook 'org-agenda-mode-hook
+         #'(lambda () (mdw-clobber-evil-keymap org-agenda-mode-map)))
 
 ;; --- Recognising types of files ---