From ea93427777b2368a204215469f66a6a9afa7c06f Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 26 Mar 2015 15:22:21 -0400 Subject: clean up emacs init --- .config/emacs/init.el | 42 +++++++++++++++++++++++++----------------- 1 file changed, 25 insertions(+), 17 deletions(-) (limited to '.config') diff --git a/.config/emacs/init.el b/.config/emacs/init.el index 5f399a0..eddd0b7 100644 --- a/.config/emacs/init.el +++ b/.config/emacs/init.el @@ -1,4 +1,5 @@ ;; This config requires Emacs 24.4(+?) +;; Hey, Emacs: -*- Indent-tabs-mode: nil -*- ;; Without (advice-add) it should work in older versions of Emacs 24. ;;;; Use XDG-ish locations ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (setq xdg-cache-home (file-name-as-directory (or (getenv "XDG_CACHE_HOME") "~/.cache"))) @@ -88,12 +89,14 @@ (:name dtrt-indent :type elpa ;; Detect indent style for existing files :after (dtrt-indent-mode 1)) (:name page-break-lines :type elpa ;; Display form-feeds pretty - :before (advice-add 'page-break-lines-mode-maybe :override #'page-break-lines-mode) + :before (advice-add 'page-break-lines-mode-maybe + :override #'page-break-lines-mode) :after (global-page-break-lines-mode 1)) (:name smart-tabs-mode :type elpa ;; Indent with tabs, align with spaces :after (progn (smart-tabs-mode 1) - (apply 'smart-tabs-insinuate (mapcar 'car smart-tabs-insinuate-alist)))) + (apply 'smart-tabs-insinuate + (mapcar 'car smart-tabs-insinuate-alist)))) ;; Major modes (:name bison-mode :type elpa) (:name coffee-mode :type elpa @@ -112,23 +115,28 @@ )) ;; What packages el-get should install, both from above, and it's ;; internal list of sources. -(el-get 'sync '(el-get +(el-get 'sync (append + '(el-get) ;; Minor modes - dtrt-indent - page-break-lines - smart-tabs-mode + '(dtrt-indent + page-break-lines + smart-tabs-mode + ) ;; Major modes - ;;apel flim semi wanderlust ; wanderlust is huge, only use on emailing boxes - ;;nxhtml ; nxhtml is invasive, only enable if actively using - bison-mode - coffee-mode - graphviz-dot-mode - haml-mode - markdown-mode - nginx-mode - php-mode-improved - scss-mode - )) + (if (file-exists-p "~/Maildir") ; wanderlust is huge, only use on emailing boxes + '(apel flim semi wanderlust) + '()) + '( + ;;nxhtml ; nxhtml is invasive, only enable if actively using + bison-mode + coffee-mode + graphviz-dot-mode + haml-mode + markdown-mode + nginx-mode + php-mode-improved + scss-mode + ))) ;; Misc. crap -- cgit v1.2.3-2-g168b From 75f0cdaf8b4c0605d3b12bd2de4080c68915c6e1 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 26 Mar 2015 15:22:34 -0400 Subject: Yahoo's fingerprint change... again --- .config/offlineimaprc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.config') diff --git a/.config/offlineimaprc b/.config/offlineimaprc index 36b382c..4b3d4e3 100644 --- a/.config/offlineimaprc +++ b/.config/offlineimaprc @@ -17,7 +17,7 @@ folderfilter = lambda folder: folder in [ 'Inbox', 'Bulk Mail' ] [Repository Remote-SBCGlobal] type = IMAP ssl = yes -cert_fingerprint = 9751f610c2631b3d4e63afcd096e5eb94c1f6fc8 +cert_fingerprint = a920541d377a4249259bcc59846a1faf621b4287 remotehost = imap.mail.yahoo.com remoteuser = lukeshu@sbcglobal.net folderfilter = lambda folder: folder in [ 'Inbox', 'Bulk Mail' ] -- cgit v1.2.3-2-g168b From cbcae827a5a827ec741a0f28cb69fcc65cac7bd5 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 26 Mar 2015 15:23:24 -0400 Subject: tidy up mail filters --- .config/maildirproc/att.rc | 8 ++++++++ .config/maildirproc/purdue.rc | 11 +++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) (limited to '.config') diff --git a/.config/maildirproc/att.rc b/.config/maildirproc/att.rc index 6b31260..4bbd297 100644 --- a/.config/maildirproc/att.rc +++ b/.config/maildirproc/att.rc @@ -77,8 +77,10 @@ def handle_incoming_unknown(mail): or is_to_or_from(mail, "parabola.nu") or is_to_or_from(mail, "parabolagnulinux.org") or mail["From"] == "MAILER-DAEMON@yahoo.com" + or mail["From"] == "3174451635@mms.att.net" or mail["From"].contains("@facebookmail.com>") or mail["From"].contains("@gandi.net") + or mail["From"].contains("@github.com>") or mail["From"].contains("@goodwillindy.org>") or mail["From"].contains("@lpi.org>") or mail["From"].contains("@msdlt.k12.in.us>") @@ -86,6 +88,7 @@ def handle_incoming_unknown(mail): or mail["From"].contains("@post.oreilly.com>") or mail["From"].contains("@scouting.org>") or mail["From"].contains("@wolframalpha.com>") + or mail["From"].contains("margieshu@sbcglobal.net") or mail["From"].contains("parabolagnulinux.org") or mail["List-Id"].matches(".*\.(gnu|gnome|archlinux|parabolagnulinuxlibre)\.org") or mail["List-Id"].matches(".*\.parabola\.nu") @@ -287,6 +290,10 @@ def my_filters(mail): move_ham(mail,".School.Robotics") return + if mail["Subject"].contains("[Quizroom]"): + move_ham(mail,".School.CS408") + return + # Sort mail from software people for address in [ "@archlinux.org", @@ -301,6 +308,7 @@ def my_filters(mail): "@gnu.org", "@ietf.org", "@kde.org", + "@nongnu.org", "@sourceforge.com", "@thyrsus.com", "trustees@core3.amsl.com", diff --git a/.config/maildirproc/purdue.rc b/.config/maildirproc/purdue.rc index b1f64af..e74a071 100644 --- a/.config/maildirproc/purdue.rc +++ b/.config/maildirproc/purdue.rc @@ -104,6 +104,10 @@ def my_filters(mail): mail.move("INBOX.work.2013.Comcast") return + if is_to_or_from(mail,"@Cartus.com"): + mail.move("INBOX.work.2015.qualcomm") + return + if ( False or mail["Subject"].contains("[CS Opportunity Update]") @@ -265,10 +269,13 @@ def my_filters(mail): return # CS448 (Databases) if piazza_topic(mail, "CS 44800"): - mail.move("INBOX.classes.2015.1.CS448") + mail.move("INBOX.classes.2015-1.CS448") return # ME297 (FRC) - if mail["Subject"].contains("[ME297]"): + if (False + or mail["Subject"].contains("[ME297]") + or is_to_or_from(mail, "heller5@purdue.edu") + ): mail.move("INBOX.classes.2015-1.ME297") return # SOC324 (Criminology) -- cgit v1.2.3-2-g168b From 062265f08cbb511e3ffcd10c3ae55f732293ea26 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 26 Mar 2015 15:23:50 -0400 Subject: Log maildirproc into the journal instead of log files --- .config/maildirproc/att.rc | 1 - .config/maildirproc/purdue.rc | 1 - .config/systemd/user/maildirproc@.service | 2 +- 3 files changed, 1 insertion(+), 3 deletions(-) (limited to '.config') diff --git a/.config/maildirproc/att.rc b/.config/maildirproc/att.rc index 4bbd297..7ee5f42 100644 --- a/.config/maildirproc/att.rc +++ b/.config/maildirproc/att.rc @@ -7,7 +7,6 @@ import datetime processor.maildir_base = "~/Maildir" processor.auto_reload_rcfile = True -processor.logfile = os.getenv('XDG_CACHE_HOME', "~/.cache")+"/maildirproc/att.log" def is_to_or_from(mail,address): """ diff --git a/.config/maildirproc/purdue.rc b/.config/maildirproc/purdue.rc index e74a071..d1505f9 100644 --- a/.config/maildirproc/purdue.rc +++ b/.config/maildirproc/purdue.rc @@ -5,7 +5,6 @@ import subprocess processor.maildir_base = "~/Maildir.purdue" processor.auto_reload_rcfile = True -processor.logfile = os.getenv('XDG_CACHE_HOME', "~/.cache")+"/maildirproc/purdue.log" def is_to_or_from(mail,address): """ diff --git a/.config/systemd/user/maildirproc@.service b/.config/systemd/user/maildirproc@.service index bdca746..9c4181c 100644 --- a/.config/systemd/user/maildirproc@.service +++ b/.config/systemd/user/maildirproc@.service @@ -3,7 +3,7 @@ Description=maildirproc mail filter [Service] Type=simple -ExecStart=/usr/bin/maildirproc -r ${HOME}/.config/maildirproc/%I.rc +ExecStart=/usr/bin/maildirproc --rcfile=${HOME}/.config/maildirproc/%I.rc --logfile=- Restart=on-failure [Install] -- cgit v1.2.3-2-g168b