chiark / gitweb /
Merge commit 'crybaby/master'; commit 'ponder/master'
authorMark Wooding <mdw@distorted.org.uk>
Mon, 16 Mar 2009 15:53:46 +0000 (15:53 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Mon, 16 Mar 2009 15:53:46 +0000 (15:53 +0000)
* 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.

1  2  3 
bash_profile
dot-emacs.el
emacs

diff --combined bash_profile
index 057f797dc0d57af64865dc67e5b724ba633cd4d3,017ff4cffb8ddd39cb9132be071b3645e31eeab0,7523cfc28358e9cd89dfd1b09e36cf7da9822a8e..57475a83ea7d7449ea8514a8f5d4e96ee5e79b79
@@@@ -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 14d06a69316a752bf3b2c99cc254f76044e5579a,14d06a69316a752bf3b2c99cc254f76044e5579a,b8d53818c93813f8f597b5a0bb5140947b5b594b..5b9408fd7a7018f2951b7b1d3cfd29a7e83cf2be
@@@@ -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 2d0aaff63b09693cdf83cbdb6c66796d2b7c47a2,dcb561d4c6fcaa2676b8ef5dc5334a0da476972a,ba6c4421405c366b52a0043b74c8ccc3d2ba613d..4337d391d09d8b9b4893afd30f2ffcd4c6279717
--- 1/emacs
--- 2/emacs
--- 3/emacs
+++ b/emacs
   (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)
   (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)
   (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)
   (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 ---