chiark / gitweb /
Merge branch 'master' of http://git.distorted.org.uk/~mdw/profile
authorMark Wooding <mwooding@good.com>
Thu, 25 Oct 2012 11:48:59 +0000 (12:48 +0100)
committerMark Wooding <mwooding@good.com>
Thu, 25 Oct 2012 11:48:59 +0000 (12:48 +0100)
* 'master' of http://git.distorted.org.uk/~mdw/profile:
  el/dot-emacs.el: Magit colouring.
  dot/emacs: Some imenu tweaking.
  dot/emacs: Have Message use the From header as the envelope sender.
  dot/bash_profile: Eliminate the already-run guard.
  dot/ercrc.el: New IRC command `/GREET' to greet robots.
  dot/ercrc.el: New definitions for distorted.org.uk IRC server.
  dot/mykermrc.in: Useful commands for dealing with server consoles.
  dot/ercrc.el: Add an extra entry for chiark via greenend VPN.

dot/bash_profile
dot/emacs
dot/ercrc.el
dot/mykermrc.in
el/dot-emacs.el

index 27eec0603afaf2a9b7b4d3b7571da1ff84c27a20..d61a7c38ce968e6d0ebdb1e1a3a36e07a0f4d572 100644 (file)
@@ -2,9 +2,8 @@
 ###
 ### Bash startup things
 
-## Only do any of this if we haven't done it before.  Otherwise we
-## can have loops and lots of wasted time.
-if [ -z "$__mdw_profile" ]; then
+## The `.bashrc' hook will run us if it thinks we haven't been run before.
+## We should therefore let it know.
 export __mdw_profile=done
 
 ###--------------------------------------------------------------------------
@@ -286,9 +285,6 @@ fi
 ## If there's a local hook then run it.
 [ -f "$HOME/.profile-local" ] && . "$HOME/.profile-local"
 
-## End of the `__mdw_profile' guard.
-fi
-
 ## If we haven't run the `.bashrc' yet, and this shell is interactive, then
 ## run it now.
 [ -z "$__mdw_bashrc" ] && [ -t 0 ] && \
index a29ff0be15af21bd2245400bcccbfbc175c00662..fe2f7be91cacb78d6ad0685155f7e98efc482688 100644 (file)
--- a/dot/emacs
+++ b/dot/emacs
       message-yank-prefix "> "
       message-yank-cited-prefix "> "
       message-send-mail-function 'message-send-mail-with-sendmail
+      message-sendmail-envelope-from 'header
       message-indent-citation-function '(message-indent-citation
                                         mdw-trim-spaces-after-citing))
 
      (define-key outline-mode-prefix-map [?\C-r] 'reveal-mode)
      (define-key outline-mode-prefix-map [?\C--] 'mdw-outline-collapse-all)))
 
+(setq imenu-auto-rescan t
+      imenu-auto-rescan-maxout (* 128 1024)
+      imenu-max-items 60)
+
 (setq cltl2-root-url (mdw-config 'cltl-url))
 (setq common-lisp-hyperspec-root (mdw-config 'hyperspec-url))
 
                  'mouse-drag-vertical-line)
   (global-set-key [vertical-scroll-bar C-mouse-1]
                  #'(lambda () (interactive)))
+  (global-set-key [M-S-mouse-3] 'imenu)
   (global-set-key [XF86WakeUp] "")
   (and (not mdw-fast-startup) (fboundp 'hippie-expand)
        (global-set-key [?\M-/] 'hippie-expand)))
index 1c3881f91e629c44060691a0d1927da88abe92bb..55f67fbab75955a9832fb8ea15ef5833baa778fd 100644 (file)
@@ -34,7 +34,8 @@ (setq erc-autojoin t
       '(("irc.ssdis.loc" "#devel" "#jukebox" "#nextgen")
        ("cam.irc.devel.ncipher.com"
         "#devel" "#jukebox" "#nextgen" "#sec-team")
-       ("chiark.greenend.org.uk" "#chiark")))
+       ("chiark.greenend.org.uk" "#chiark")
+       ("irc.distorted.org.uk" "#distorted" "#jukebox")))
 
 (defvar mdw-erc-auto-greet-bots-alist
   `(("irc.ssdis.loc" "fastness"
@@ -42,7 +43,11 @@ (defvar mdw-erc-auto-greet-bots-alist
     ("cam.irc.devel.ncipher.com" "fastness"
      ,(format "identpass mwooding %s" mdw-fastness-password))
     ("chiark.greenend.org.uk" "blight"
-     ,(format "identpass mdw %s" mdw-blight-password)))
+     ,(format "identpass mdw %s" mdw-blight-password))
+    ("tunnel.chiark.greenend.org.uk" "blight"
+     ,(format "identpass mdw %s" mdw-blight-password))
+    ("irc.distorted.org.uk" "blight"
+     ,(format "identpass mdw %s" mdw-distorted-password)))
   "*Alist of (SERVER-REGEXP BOT-NICK MESSAGE-FORM).
 Evaluate MESSAGE-FORM and sent to BOT-NICK when connected to a server which
 matches SERVER-REGEXP.")
@@ -55,3 +60,7 @@ (defun mdw-erc-auto-greet-bots (server nick)
            (message (caddr l)))
        (erc-server-send (concat "PRIVMSG " bot " :" message))))))
 (add-hook 'erc-after-connect 'mdw-erc-auto-greet-bots)
+
+(defun erc-cmd-GREET ()
+  "Send greeting messages, according to `mdw-erc-auto-greet-bots-alist'."
+  (mdw-erc-auto-greet-bots erc-session-server (erc-current-nick)))
index d750a668f54bfe6131297befa4ae20c12d0132a7..fab7427786464fd6e733b48e29f0896d9cd8378a 100644 (file)
@@ -103,6 +103,26 @@ def GUVNOR {
        set key 127 \8
        telnet guvnor.distorted.org.uk
 }
+def JUMPTS {
+       local pass
+       set host /network-type:pty ssh -enone -t \%1
+       while true {
+               input 15 \fpattern({{{password:,exit}}})
+               if fail end 1 failed to connect
+               if equal \v(inmatch) exit break
+               if equal \v(inmatch) password: {
+                       if ! def pass askq pass {password: }
+                       output \m(pass)\13
+               }
+       }
+}
+def FENDERCON {
+       set input echo off
+       jumpts mdw@ts-tfm8.jump.net.uk
+       output 1\13
+       set control prefixed 30
+       connect
+}
 
 ;; Local configuration.
 if exist \m(_dot)config take \m(_dot)config
index 4f47478bcf25d1622e4583330cdd78bd4e712dae..2902ac144d179fada3a687de64462b39d431f078 100644 (file)
@@ -972,6 +972,15 @@ (mdw-define-face diff-refine-change
   (((class color) (type x)) :background "RoyalBlue4")
   (t :underline t))
 
+(mdw-define-face magit-diff-add
+  (t :foreground "green"))
+(mdw-define-face magit-diff-del
+  (t :foreground "red"))
+(mdw-define-face magit-diff-file-header
+  (t :weight bold))
+(mdw-define-face magit-diff-hunk-header
+  (t :foreground "SkyBlue1"))
+
 (mdw-define-face erc-input-face
   (t :foreground "red"))