X-Git-Url: https://git.distorted.org.uk/~mdw/profile/blobdiff_plain/eac7b6224fc7804fcdd2409c6f8e0159e3379a03..91dba4e4faf4822fa6869df6bbd44ac033d7c355:/emacs diff --git a/emacs b/emacs index ba1c902..14d9b1e 100644 --- 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))) @@ -116,6 +118,30 @@ (setq rmail-display-summary t) (setq rmail-file-name "~/Mail/rmail") +(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 'message))) +(setq bbdb-north-american-phone-numbers-p nil) + ;; --- Customization --- (setq custom-file "~/.emacs-custom") @@ -144,9 +170,9 @@ (setq ps-paper-type 'a4 ps-print-color-p nil ps-landscape-mode t - ps-number-of-columns 3 + ps-number-of-columns 2 ps-font-family 'Courier - ps-font-size 4) + ps-font-size 6.5) ;; --- Splash screen stuff --- @@ -165,6 +191,7 @@ iswitchb-default-method 'samewindow) ;in other random frames (setq dired-deletion-confirmer ;Make deletion easier in dired (symbol-function 'y-or-n-p)) +(setq read-quoted-char-radix 16) ;C-q HEX-STUFF [RET] (setq dired-listing-switches "-alF") ;Do `ls -F' things in dired windows (setq wdired-allow-to-change-permissions t) (setq case-fold-file-names nil) ;Don't translate file names (grr...) @@ -180,6 +207,7 @@ (setq find-ls-option ;Build file lists efficiently '("-print0 | xargs -0r ls -ld" . "ld")) (setq bookmark-save-flag 0) ;Save bookmarks automatically +(setq x-gtk-file-dialog-help-text nil) (setq Info-fontify-maximum-menu-size 100000) (setq set-mark-command-repeat-pop t) (setq ispell-program-name "aspell" @@ -274,6 +302,11 @@ (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) @@ -360,6 +393,7 @@ (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) @@ -372,7 +406,6 @@ (global-set-key [?\C-x ?/] 'auto-fill-mode) (global-set-key [?\C-x ?w ?d] 'mdw-divvy-window) (global-set-key [insertchar] 'overwrite-mode) -(global-set-key [?\C-x ?m] 'vm-mail) (global-set-key [?\C-x ?\C-n] 'skel-create-file) (global-set-key [?\C-x ?4 ?n] 'skel-create-file-other-window) (global-set-key [?\C-x ?5 ?n] 'skel-create-file-other-frame) @@ -385,6 +418,14 @@ '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 ---