X-Git-Url: https://git.distorted.org.uk/~mdw/profile/blobdiff_plain/e8ea88ba22a0e762bf6dfc6cfe12b2379e408b8e..8244840ab180822fe9c37f73e4a1137997ef6566:/dot/emacs diff --git a/dot/emacs b/dot/emacs index 708ea7b..52a9a1c 100644 --- a/dot/emacs +++ b/dot/emacs @@ -185,11 +185,13 @@ (or mdw-fast-startup (trap (bbdb-initialize 'gnus 'sendmail 'message))) -(setq bbdb-file "~/etc/state/bbdb" +(setq bbdb-file "~/etc/brain/bbdb" bbdb-north-american-phone-numbers-p nil - bbdb/news-auto-create-p (lambda () - (string-match "^nnimap\\+" - gnus-newsgroup-name)) + bbdb/news-auto-create-p + (lambda () + (let ((group gnus-newsgroup-name)) + (and (string-match "^nnimap\\+" group) + (not (string-match ":\\(crap\\|spam\\)\\." group))))) bbdb-user-mail-names (concat "^" "\\(" "\\(mdw\\|markw\\|root\\|postmaster\\)" @@ -205,6 +207,12 @@ "@\\(nationwide-communications\\.co\\.uk\\)") addr) (concat "nationwide@" (match-string 1 addr))) + ((string-match (concat "^[0-9]+@bugs\\." + "\\(" "debian\\.org" + "\\|" "distorted\\.org\\.uk" + "\\)") + addr) + (concat "submit@bugs." (match-string 1 addr))) (t addr)))) ;; Customization. @@ -361,7 +369,12 @@ ;;;-------------------------------------------------------------------------- ;;; Calendar configuration. -(setq diary-file "~/etc/state/diary") +(setq diary-file + (let ((main-diary "~/etc/brain/diary") + (index "~/etc/index.diary")) + (if (file-exists-p index) + index + main-diary))) ;; Trivial stuff for the sunrise/sunset calculations. @@ -380,23 +393,30 @@ ;; Date format fiddling. (setq european-calendar-style t - calendar-date-style 'european) - -(setq diary-date-forms '((day "[-/]" month "[^-/0-9]") - (day " *" monthname "[ \t]*\\(\^M\\|\n\\)") - (backup day " *" monthname "\\W+\\<[^*0-9]") - (day "[-/]" month "[-/]" year "[^0-9]") - (day " *" monthname " *" year "[^0-9]") - (year "[-/]" month "[-/]" day "[^0-9]") - (dayname "\\W"))) + calendar-date-style 'european + calendar-time-display-form + '(24-hours ":" minutes + (if time-zone " (") time-zone (if time-zone ")"))) + +(setq diary-date-forms + '((day "[-/]" month "[^-/0-9]") + (day " *" monthname "[ \t]*\\(\^M\\|\n\\)") + (backup day " *" monthname "\\W+\\<\\([^*0-9]\\|[0-9]+[:aApP]\\)") + (day "[-/]" month "[-/]" year "[^0-9]") + (day " *" monthname " *" year "[^0-9]") + (year "[-/]" month "[-/]" day "[^0-9]") + (dayname "\\W"))) ;; Fancy diary handling. (add-hook 'diary-display-hook 'fancy-diary-display) (setq diary-list-include-blanks t) -(add-hook 'list-diary-entries-hook 'sort-diary-entries t) -(add-hook 'list-diary-entries-hook 'include-other-diary-files) -(add-hook 'mark-diary-entries-hook 'mark-included-diary-files) +(cond ((mdw-emacs-version-p 23 1) + (add-hook 'list-diary-entries-hook 'diary-include-other-diary-files) + (add-hook 'mark-diary-entries-hook 'diary-mark-included-diary-files)) + (t + (add-hook 'list-diary-entries-hook 'include-other-diary-files) + (add-hook 'mark-diary-entries-hook 'mark-included-diary-files))) ;; Appointment management. @@ -410,17 +430,23 @@ ;; Org-mode agenda. (setq org-agenda-include-diary t + org-directory "~/etc/brain.local/" + org-default-notes-file (concat org-directory "local.org") org-tags-column -77) ;; Cosmetic stuff. -(setq calendar-view-diary-initially-flag t - calendar-view-holidays-initially-flag t) +(setq calendar-view-diary-initially-flag nil + calendar-view-holidays-initially-flag nil + calendar-mark-diary-entries-flag t) (setq display-time-24hr-format t) (display-time) (column-number-mode 1) -(trap (if window-system (calendar))) +(trap + (if window-system + (let ((calendar-view-diary-initially-flag t)) + (calendar)))) ;;;-------------------------------------------------------------------------- ;;; MailCrypt.