From 1b4246990fa8c1b2475ede9fe52a34383c70ccf7 Mon Sep 17 00:00:00 2001 From: Mitch Tishmack Date: Sat, 28 May 2016 21:45:19 -0500 Subject: [PATCH] Add a ~/.emacs.d/local.el derivation --- cray.org | 83 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) diff --git a/cray.org b/cray.org index d6c5598..b70951e 100644 --- a/cray.org +++ b/cray.org @@ -6,6 +6,89 @@ #+PROPERTY: header-args :cache yes :padline no :mkdirp yes :comments no * Cray specific +** ~/.emacs.d/local.el + +#+BEGIN_SRC emacs-lisp :tangle (when (eq cray-p t) "tmp/.emacs.d/local.el") :mkdirp yes +(defun cray/get-bugs () + (with-current-buffer (current-buffer) + (setq input (save-restriction (widen) + (buffer-substring-no-properties + (point-min) (point-max)))) + (setq bugline "Bugs Affected[:] .*") + (if (s-match bugline input) + (mapcar 'car (s-match-strings-all + "[7-9][[:digit:]]\\{5\\}" (car (mapcar 'car (s-match-strings-all bugline input))))) + '("NO BUGS?") + ) + ) + ) +(defun cray/get-bugzilla-cmds () + (loop for bug in (cray/get-bugs) + collect (concat + "env PYTHONWARNINGS='ignore:Unverified HTTPS request' bugzilla --nosslverify --bugzilla=https://bugzilla.us.cray.com/xmlrpc.cgi query --outputformat='%{summary}' --bug_id " bug) + ) + ) +(defun cray/get-descriptions () + (loop for out in (cray/get-bugzilla-cmds) + collect (shell-command-to-string out)) + ) +#+END_SRC +** ~/.gnus + +Use gnus in emacs for email. Outside of normal emacs since its easier. + +#+BEGIN_SRC emacs-lisp :tangle (when (eq cray-p t) "tmp/.gnus") :mkdirp yes :tangle-mode (identity #o600) + (use-package gnus + :ensure t + :config + (progn + (setq user-full-name "Mitch Tishmack" + user-mail-address "mtishmack@cray.com") + (setq gnus-select-method '(nnnil "")) + (setq gnus-secondary-select-methods '((nnml ""))) + (add-hook 'gnus-group-mode-hook 'gnus-topic-mode) + (setq gnus-mime-display-multipart-related-as-mixed t) + (setq gnus-auto-select-first nil) + (setq gnus-summary-display-arrow nil) + (setq nnmail-split-methods 'nnmail-split-fancy) + (setq gnus-nntp-server nil + gnus-read-active-file nil + gnus-save-newsrc-file nil + gnus-read-newsrc-file nil + gnus-check-new-newsgroups nil) + (setq nnml-directory "~/.emacs.d/mail") + (setq message-directory "~/.emacs.d/mail") + + (setq gnus-select-method + '(nnimap "outlook" + (nnimap-address "outlook.office365.com") + (nnimap-server-port 993))) + + (setq-default + gnus-summary-line-format "[%U%R%z] %(%&user-date; %-15,15f %B%s%)\n" + gnus-user-date-format-alist '((t . "%Y-%m-%d")) + gnus-summary-thread-gathering-function 'gnus-gather-threads-by-references + gnus-sum-thread-tree-root "" + gnus-sum-thread-tree-false-root "" + gnus-sum-thread-tree-indent " " + gnus-sum-thread-tree-single-indent "" + gnus-sum-thread-tree-single-leaf "└─>" + gnus-sum-thread-tree-vertical "│" + gnus-sum-thread-tree-leaf-with-other "├─>") + (setq gnus-thread-sort-functions + '((not gnus-thread-sort-by-date) + (not gnus-thread-sort-by-number))) + (setq gnus-use-cache t) + (setq gnus-use-adaptive-scoring t) + (setq gnus-save-score t) + (setq nnmail-split-fancy + '(| + ("From" "\\(root\\|cron\\)@localhost" "system") + "normal")) + ) + ) +#+END_SRC + ** ~/bin/essh Expect ssh, to aide login to smw's etc..