From: Mark Wooding Date: Mon, 16 Mar 2009 15:53:46 +0000 (+0000) Subject: Merge commit 'crybaby/master'; commit 'ponder/master' X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/profile/commitdiff_plain/2d18398ae92f3da8ef49fe8e376ff5cdab53608a?ds=sidebyside;hp=-c Merge commit 'crybaby/master'; commit 'ponder/master' * commit 'crybaby/master': bash_profile: Extend the collection of INFOPATH directories. * commit 'ponder/master': zile: Yet another editor configuration. emacs: Give org-iswitchb a key binding, and include diary stuff in agenda. emacs, dot-emacs.el: Extend and semi-automate evil-keymap hacking. dot-emacs.el: Insert missing blank line before section header. --- 2d18398ae92f3da8ef49fe8e376ff5cdab53608a diff --combined bash_profile index 057f797,017ff4c,7523cfc..57475a8 --- a/bash_profile +++ b/bash_profile @@@@ -94,7 -94,7 -94,7 +94,7 @@@@ emacs_startup_args="--no-site-file --md for ed in \ "emacs22 $emacs_startup_args" \ "emacs21 $emacs_startup_args" \ -- mg \ ++ zile mg \ "emacs -nw" \ vi pico nano ae; do name=`echo $ed | sed 's/ .*$//'` @@@@ -129,7 -129,11 -129,7 +129,11 @@@@ __mdw_programp distcc && export CCACHE_ export TEXINPUTS=".:$HOME/lib/tex//:" - -__mdw_addto INFOPATH r $HOME/info /usr/info /usr/share/info /usr/local/info + +__mdw_addto INFOPATH r \ + + $HOME/info \ + + /usr/info /usr/share/info \ + + /usr/local/info /usr/local/share/info \ + + /usr/local/share/info/its __mdw_addto PERLLIB r $HOME/lib/perl __mdw_addto PYTHONPATH r $HOME/lib/python diff --combined dot-emacs.el index 14d06a6,14d06a6,b8d5381..5b9408f --- a/dot-emacs.el +++ b/dot-emacs.el @@@@ -188,6 -188,6 -188,43 +188,43 @@@@ symbols `sunday', `monday', etc. (or a (nth 2 when)))))))) (eq w d))) ++ ;; --- Fighting with Org-mode's evil key maps --- ++ ++ (defvar mdw-evil-keymap-keys ++ '(([S-up] . [?\C-c up]) ++ ([S-down] . [?\C-c down]) ++ ([S-left] . [?\C-c left]) ++ ([S-right] . [?\C-c right]) ++ (([M-up] [?\e up]) . [C-up]) ++ (([M-down] [?\e down]) . [C-down]) ++ (([M-left] [?\e left]) . [C-left]) ++ (([M-right] [?\e right]) . [C-right])) ++ "Defines evil keybindings to clobber in `mdw-clobber-evil-keymap'. ++ The value is an alist mapping evil keys (as a list, or singleton) ++ to good keys (in the same form).") ++ ++ (defun mdw-clobber-evil-keymap (keymap) ++ "Replace evil key bindings in the KEYMAP. ++ Evil key bindings are defined in `mdw-evil-keymap-keys'." ++ (dolist (entry mdw-evil-keymap-keys) ++ (let ((binding nil) ++ (keys (if (listp (car entry)) ++ (car entry) ++ (list (car entry)))) ++ (replacements (if (listp (cdr entry)) ++ (cdr entry) ++ (list (cdr entry))))) ++ (catch 'found ++ (dolist (key keys) ++ (setq binding (lookup-key keymap key)) ++ (when binding ++ (throw 'found nil)))) ++ (when binding ++ (dolist (key keys) ++ (define-key keymap key nil)) ++ (dolist (key replacements) ++ (define-key keymap key binding)))))) ++ ;;;----- Mail and news hacking ---------------------------------------------- (define-derived-mode mdwmail-mode mail-mode "[mdw] mail" @@@@ -395,6 -395,6 -432,7 +432,7 @@@@ get itself into a twist. (mdw-check-autorevert)) (defadvice write-file (after mdw-autorevert activate) (mdw-check-autorevert)) ++ ;;;----- Dired hacking ------------------------------------------------------ (defadvice dired-maybe-insert-subdir @@@@ -2052,7 -2052,7 -2090,7 +2090,7 @@@@ strip numbers instead. (make-variable-buffer-local 'lisp-indent-function) (setq lisp-indent-function 'common-lisp-indent-function)) -(setq lisp-simple-loop-indentation 1 +(setq lisp-simple-loop-indentation 2 lisp-loop-keyword-indentation 6 lisp-loop-forms-indentation 6) diff --combined emacs index 2d0aaff,dcb561d,ba6c442..4337d39 --- a/emacs +++ b/emacs @@@@ -121,18 -121,7 -121,6 +121,18 @@@@ (setq sendmail-program "~/bin/sendmail-hack") (setq mail-user-agent 'message-user-agent) - (setq message-signature-separator "^-- \\(\\|\\[mdw\\]\\)$") ++(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) @@@@ -301,6 -290,6 -289,10 +301,10 @@@@ (setq appt-display-interval 3) (setq appt-message-warning-time 10) ++ ;; --- Org-mode agenda --- ++ ++ (setq org-agenda-include-diary t) ++ ;; --- Cosmetic stuff --- (setq display-time-24hr-format t) @@@@ -387,6 -376,6 -379,7 +391,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) @@@@ -414,20 -403,20 -407,10 +419,10 @@@@ (and (not mdw-fast-startup) (fboundp 'hippie-expand) (global-set-key [?\M-/] 'hippie-expand)) -- (defun mdw-clobber-org-mode-map () -- (dolist (key '([S-up] [S-down] [S-left] [S-right] -- [?\e left] [?\e right] -- [M-left] [M-right])) -- (define-key org-mode-map key nil)) -- (define-key org-mode-map [?\C-c left] 'org-shiftleft) -- (define-key org-mode-map [?\C-c right] 'org-shiftright) -- (define-key org-mode-map [?\C-c up] 'org-shiftup) -- (define-key org-mode-map [?\C-c down] 'org-shiftdown) -- (define-key org-mode-map [C-left] 'org-metaleft) -- (define-key org-mode-map [C-right] 'org-metaright) -- (define-key org-mode-map [C-up] 'org-metaup) -- (define-key org-mode-map [C-down] 'org-metadown)) -- (add-hook 'org-mode-hook 'mdw-clobber-org-mode-map) ++ (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 ---