chiark / gitweb /
Merge remote-tracking branch 'origin'
authorMark Wooding <mdw@distorted.org.uk>
Tue, 3 May 2016 16:27:17 +0000 (17:27 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Tue, 3 May 2016 16:27:17 +0000 (17:27 +0100)
* origin:
  dot/ipython_config.py: Let's just have one of these for everywhere.

dot/emacs
dot/gnus.el
el/dot-emacs.el

index f6290cc158791a164591bdf58caaa343acc37bee..f8bd2e785b1010943df382c8f74e8b05bee6015b 100644 (file)
--- a/dot/emacs
+++ b/dot/emacs
                   (member (md5 addr)
                           '("8815c5583970856799c85a3ee0eb6a9f" ;work wiki spam
                             "0b94ab4d25dacaa5ac07243a09c9e22e" ;work bug spam
+                            "35fb1633379a1e4d4be3b139cae20111" ;work crucible spam
                             ))
                   (and (string-match "^news\\([0-9]+\\)@\\(.*\\)$" addr)
                        (string= (md5 (match-string 2 addr))
              truncate-lines t)
 (setq default-indicate-empty-lines t)
 (setq view-read-only t)
-(setq whitespace-style
-      '(trailing space-before-tab space-after-tab empty indentation face))
+(setq whitespace-style '(trailing empty indentation face lines-tail
+                        space-before-tab space-after-tab)
+      whitespace-line-column 77)
 (setq woman-use-own-frame nil          ;Keep man pages somewhere sensible
       woman-fill-column 72)            ;Right margin position.
 (setq diff-switches "-u"               ;I like reading unified diffs
index a8779d9f3c49f820ad635175c99d03b319fb53b7..91d5d8162df12d2c62c0217f5f8ade9a833a9c7b 100644 (file)
@@ -61,6 +61,12 @@ (setq mm-verify-option 'known
       mm-sign-option 'guided
       mm-decrypt-option 'never)
 
+;; Tracking available groups.  These should work for sane servers, but maybe
+;; they'll need hacking in the local file.
+(setq gnus-save-killed-list nil
+      gnus-check-bogus-newsgroups nil
+      gnus-read-active-file 'ask-server)
+
 ;; Use one article buffer per group.
 (setq gnus-single-article-buffer nil)
 
index a2989fea4eb737f2093801e09fca2c14ba6b0802..d88366674e05cd264136fb5b4c8bab798740db35 100644 (file)
@@ -370,27 +370,45 @@ (defadvice org-agenda-list (around mdw-preserve-links activate)
   (let ((mdw-diary-for-org-mode-p t))
     ad-do-it))
 
-(defadvice diary-add-to-list (before mdw-trim-leading-space activate)
+(defadvice diary-add-to-list (before mdw-trim-leading-space compile activate)
   "Trim leading space from the diary entry string."
   (save-match-data
-    (let ((str (ad-get-arg 1)))
-      (ad-set-arg 1
-                 (cond ((null str) nil)
+    (let ((str (ad-get-arg 1))
+         (done nil) old)
+      (while (not done)
+       (setq old str)
+       (setq str (cond ((null str) nil)
+                       ((string-match "\\(^\\|\n\\)[ \t]+" str)
+                        (replace-match "\\1" nil nil str))
                        ((and mdw-diary-for-org-mode-p
                              (string-match (concat
-                                            "^[ \t]*"
+                                            "\\(^\\|\n\\)"
                                             "\\(" diary-time-regexp
                                             "\\(-" diary-time-regexp "\\)?"
-                                            "\\)[ \t]+")
+                                            "\\)"
+                                            "\\(\t[ \t]*\\| [ \t]+\\)")
                                            str))
-                        (replace-match "\\1 " nil nil str))
-                       ((string-match "^[ \t]+" str)
-                        (replace-match "" nil nil str))
+                        (replace-match "\\1\\2 " nil nil str))
                        ((and (not mdw-diary-for-org-mode-p)
                              (string-match "\\[\\[[^][]*]\\[\\([^][]*\\)]]"
                                            str))
                         (replace-match "\\1" nil nil str))
-                       (t str))))))
+                       (t str)))
+       (if (equal str old) (setq done t)))
+      (ad-set-arg 1 str))))
+
+(defadvice org-bbdb-anniversaries (after mdw-fixup-list compile activate)
+  "Return a string rather than a list."
+  (with-temp-buffer
+    (let ((anyp nil))
+      (dolist (e (let ((ee ad-return-value))
+                  (if (atom ee) (list ee) ee)))
+       (when e
+         (when anyp (insert ?\n))
+         (insert e)
+         (setq anyp t)))
+      (setq ad-return-value
+           (and anyp (buffer-string))))))
 
 ;; Fighting with Org-mode's evil key maps.
 
@@ -1219,6 +1237,9 @@ (mdw-define-face dired-perm-write
 (mdw-define-face trailing-whitespace
   (((class color)) :background "red")
   (t :inverse-video t))
+(mdw-define-face whitespace-line
+  (((class color)) :background "darkred")
+  (t :inverse-video :t))
 (mdw-define-face mdw-punct-face
   (((type tty)) :foreground "yellow") (t :foreground "burlywood2"))
 (mdw-define-face mdw-number-face
@@ -1335,6 +1356,12 @@ (mdw-define-face diff-context
 (mdw-define-face diff-refine-change
   (((class color) (type x)) :background "RoyalBlue4")
   (t :underline t))
+(mdw-define-face diff-refine-removed
+  (((class color) (type x)) :background "#500")
+  (t :underline t))
+(mdw-define-face diff-refine-added
+  (((class color) (type x)) :background "#050")
+  (t :underline t))
 
 (mdw-define-face dylan-header-background
   (((class color) (type x)) :background "NavyBlue")