Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

various tweaks to mail setup among others

  • Loading branch information...
commit f829e1bca27761f615817f3202955b7435cccf32 1 parent ca6563a
@dlobraico authored
View
11 emacs.d/config/pygatea-mode-hooks.el
@@ -0,0 +1,11 @@
+(defun insert-grader-comment ()
+ "Insert a C-style grader comment"
+ (interactive)
+ (insert "/* grader: */")
+ (backward-char 3))
+
+(add-hook 'c-mode-hook
+ (lambda ()
+ (define-key (kbd "M-g") 'insert-grader-comment)))
+
+(provide 'pygatea-mode-hooks)
View
12 emacs.d/init.el
@@ -1,8 +1,11 @@
;; -*- coding: utf-8 -*-
-;; This is the toplevel file of my emacs configuration. Currently, this
-;; stuff is heavily based on bbatsov's lovely Emacs Prelude project
-;; (https://github.com/bbatsov/prelude/) but this will change as I get my bearings
-;; in Emacs.
+
+;; This is the toplevel file of my emacs configuration. Currently, this stuff
+;; is heavily based on bbatsov's lovely Emacs Prelude project
+;; (https://github.com/bbatsov/prelude/) but this will change as I get my
+;; bearings in Emacs.
+
+(server-start)
(defvar pygatea-dir (file-name-directory load-file-name)
"The root dir of my Emacs configuration.")
@@ -37,6 +40,7 @@ ELPA (or MELPA).")
(require 'pygatea-auctex)
(require 'pygatea-editor)
(require 'pygatea-autocomplete)
+(require 'pygatea-mode-hooks)
(require 'pygatea-global-keybindings)
(when (eq system-type 'darwin)
View
3  mutt/accounts/csd.muttrc
@@ -6,5 +6,8 @@ set mbox = "+csd/archive"
set postponed = "+csd/drafts"
unset trash
+unset record
+unset copy
+
# BCC Stephen on all sent messages.
send-hook '~f editor@chicagoshadydealer.com' "push <edit-bcc>srlurie@gmail.com<enter>"
View
4 mutt/accounts/personal.muttrc
@@ -4,4 +4,8 @@ set sendmail = "/usr/local/bin/msmtp -a d@lobraico.com"
set spoolfile = "+personal/INBOX"
set mbox = "+personal/archive"
set postponed = "+personal/drafts"
+
unset trash
+
+unset record
+unset copy
View
8 mutt/accounts/school.muttrc
@@ -2,6 +2,8 @@ set from = "dlobraico@uchicago.edu"
set realname = "Dominick LoBraico"
set sendmail = "/usr/local/bin/msmtp -f -a dlobraico@uchicago.edu"
set spoolfile = "+school/INBOX"
-set mbox = "+school/Archive"
-set postponed = "+school/Drafts"
-set trash = "+school/Deleted Items"
+set mbox = "+school/archive"
+set postponed = "+school/drafts"
+set trash = "+school/trash"
+set record = "+school/sent"
+set copy = yes
View
1  mutt/accounts/tds.muttrc
@@ -5,3 +5,4 @@ set spoolfile = "+tds/INBOX"
set mbox = "+tds/archive"
set postponed = "+tds/drafts"
unset trash
+unset copy
View
162 mutt/aliases
@@ -0,0 +1,162 @@
+alias lurie-stephen Stephen Lurie <slurie@uchicago.edu>
+alias piazza-cmsc CMSC 27200 on Piazza <no-reply@piazza.com>
+alias dealer-chicago Chicago Shady Dealer <editor@chicagoshadydealer.com>
+alias spiegel-sam Sam Spiegel <spiegel.sam@gmail.com>
+alias lobraico-dj DJ LoBraico <dj@lobraico.com>
+alias whittaker-marie Marie Whittaker <marieclaire.whittaker@uchicago.edu>
+alias zhang-bob bob zhang <bobzhang1988@gmail.com>
+alias lists-university University of Chicago Mailing Lists <sympa@lists.uchicago.edu>
+alias newsletter-threadless Threadless Newsletter <newsletter@email.threadless.com>
+alias lewis-dan Dan Lewis <dan.lewis@gmail.com>
+alias Twitter <n-qyboenvpb=hpuvpntb.rqh-3ce7b@postmaster.twitter.com>
+alias dochelp-request@mailman.cs.uchicago.edu dochelp-request@mailman.cs.uchicago.edu
+alias markbreiter-haley Haley Markbreiter <programming@docfilms.org>
+alias gordon-alex Alex Gordon <apgordon@uchicago.edu>
+alias baruk-esther Esther Baruk <esther.baruk@gmail.com>
+alias agarwal-ashish Ashish Agarwal <agarwal1975@gmail.com>
+alias mentre-david David MENTRE <dmentre@linux-france.org>
+alias chaudhry-amir Amir Chaudhry <amc79@cam.ac.uk>
+alias gazagnaire-thomas Thomas Gazagnaire <thomas.gazagnaire@gmail.com>
+alias gotovchits-ivan Ivan Gotovchits <ivg@ieee.org>
+alias hains-gaetan Gaetan Hains <gaetan.hains@gmail.com>
+alias berenger-francois Francois Berenger <francois.berenger.working@gmail.com>
+alias NYTimes.com <nytdirect@nytimes.com>
+alias lobraico-dominick Dominick LoBraico <d@lobraico.com>
+alias obama-barack Barack Obama <info@barackobama.com>
+alias sherman-bradley Bradley Sherman <bradley@shermannj.com>
+alias alert-nytimes.com NYTimes.com News Alert <nytdirect@nytimes.com>
+alias schultz-bart Bart Schultz <rschultz@uchicago.edu>
+alias Bart Schultz
+alias augustine-zachary Zachary Augustine <zga@uchicago.edu>
+alias minsky-yaron Yaron Minsky <yminsky@janestreet.com>
+alias whittaker-marie Marie Claire Whittaker <marieclaire.whittaker@gmail.com>
+alias lobraico-rebecca Rebecca LoBraico <rebecca@lobraico.com>
+alias updates-linkedin LinkedIn Updates <messages-noreply@linkedin.com>
+alias ProPublica <donotreply@lists.propublica.net>
+alias order@grubhub.com order@grubhub.com
+alias jmhanner@uchicago.edu jmhanner@uchicago.edu
+alias newsletter@rush.com newsletter@rush.com
+alias KAYAK <news@kayak.com>
+alias team-the The WitStream Team <no-reply@witstream.com>
+alias schmitt-alan Alan Schmitt <alan.schmitt@polytechnique.org>
+alias alert-hulu Hulu Queue Alert <queue-updates@hulu.com>
+alias jennings-ken Ken Jennings <tuesdaytrivia@ken-jennings.com>
+alias sotomayor-borja Borja Sotomayor <borja@cs.uchicago.edu>
+alias sotomayor-borja Borja Sotomayor <borja@cs.uchicago.edu>
+alias landstrom-jesse Jesse Landstrom <jlandstrom@uchicago.edu>
+alias lin-shuoyuan Shuoyuan Lin <edlin@uchicago.edu>
+alias brennan-dawn Dawn Joan Brennan [dbrennan@uchicago.edu]
+alias kindlmann-gordon Gordon L. Kindlmann <glk@uchicago.edu>
+alias junkmail-university University of Chicago Junkmail <support@uchicago.edu>
+alias lobraico-dominick Dominick LoBraico <dlobraico@uchicago.edu>
+alias gazagnaire-thomas Thomas Gazagnaire <thomas@ocamlpro.com>
+alias edwin-török Török Edwin <edwin+ml-ocaml@etorok.net>
+alias han-zhi Zhi Han <zhi.han@gmail.com>
+alias orders@YouBars.com orders@YouBars.com
+alias mottl-markus Markus Mottl <markus.mottl@gmail.com>
+alias J.Crew <jcrew@e.jcrew.com>
+alias Thrillist <themove@thrillist.com>
+alias cary-charles Charles Cary <cclego@gmail.com>
+alias vincent-alyssa Alyssa Vincent <avincent@uchicago.edu>
+alias price-lee Lee Price <lee@uchicago.edu>
+alias frisch-alain Alain Frisch <alain@frisch.fr>
+alias madhavapeddy-anil Anil Madhavapeddy <anil@recoil.org>
+alias bünzli-daniel Daniel Bünzli <daniel.buenzli@erratique.ch>
+alias fessant-fabrice Fabrice Le Fessant <fabrissimo@gmail.com>
+alias wang-angela Angela Wang <angelawang@uchicago.edu>
+alias helfand-nora Nora Helfand <norahelfand@gmail.com>
+alias jordan-brian Brian Jordan <brian@codingforinterviews.com>
+alias stoner-rebecca Rebecca Stoner <rstoner1023@gmail.com>
+alias mimram-samuel Samuel Mimram <smimram@gmail.com>
+alias store-itunes iTunes Store <do_not_reply@itunes.com>
+alias element14-newark Newark element14 <email@email.newark.com>
+alias tutunik-nicole Nicole Tutunik <nicole.tutunik@gmail.com>
+alias damascus-andy Andy Damascus <andy@damascusapparel.com>
+alias shaw-adam Adam Shaw <adamshaw@cs.uchicago.edu>
+alias software-ambrosia Ambrosia Software <support-lostcodes@ambrosiasw.com>
+alias stewart-richard Richard Stewart <rbstewart@uchicago.edu>
+alias kurzweg-brandon Brandon Kurzweg <bkurzweg@uchicago.edu>
+alias peeler-luke Luke Peeler <peeler.luke@gmail.com>
+alias whittaker-marie Marie Whittaker <marieclaire.whittaker@gmail.com>
+alias crew-the The Jetty Crew <info@jettylife.com>
+alias NextDraft <dave@davenetics.com>
+alias lobraico-d. D. LoBraico <d@lobraico.com>
+alias express-american American Express <AmericanExpress@welcome.aexp.com>
+alias zaphoyd@uchicago.edu zaphoyd@uchicago.edu
+alias clemmer-sean Sean Clemmer <sclemmer@uchicago.edu>
+alias LibraryNews-College@lib.uchicago.edu LibraryNews-College@lib.uchicago.edu
+alias Twitter <n-gvcf=qnvylfbcuvfg.pbz-414a5@postmaster.twitter.com>
+alias zhang-hongbo Hongbo Zhang <bobzhang1988@gmail.com>
+alias proust-raphael Raphael Proust <raphlalou@gmail.com>
+alias ponce-rachel Rachel Ponce <rponce@uchicago.edu>
+alias lim-vicky Vicky Lim [vickylim@uchicago.edu]
+alias lim-vicky Vicky Lim <vickylim@uchicago.edu<mailto:vickylim@uchicago.edu>>
+alias steiner-lina Lina Steiner <lsteiner@uchicago.edu<mailto:lsteiner@uchicago.edu>>
+alias yu-shengxiao Shengxiao Yu <shengxiao@uchicago.edu>
+alias tommy-parker Parker Tommy <tlparker@amazon.com>
+alias lim-vicky Vicky Lim <vickylim@uchicago.edu>
+alias steiner-lina Lina Steiner <lsteiner@uchicago.edu>
+alias registrar-office Office of the University Registrar <registrar@uchicago.edu>
+alias meyer-wojciech Wojciech Meyer <wojciech.meyer@gmail.com>
+alias stolpmann-gerd Gerd Stolpmann <info@gerd-stolpmann.de>
+alias kilbourn-michelle Michelle Kilbourn <mkilbourn@uchicago.edu>
+alias randal-picker Picker Randal <rpicker@uchicago.edu>
+alias lobraico-dominick Dominick LoBraico [mailto:dlobraico@uchicago.edu]
+alias team-prismatic Prismatic Team <digest@getprismatic.com>
+alias support@linode.com support@linode.com
+alias mullen-jake Jake Mullen <jakecmullen@gmail.com>
+alias Spotify <no-reply@news.spotifymail.com>
+alias support-domainsite.com Domainsite.com Support <noreply@domainsite.com>
+alias forums-codeweavers CodeWeavers Forums <noreply@crossover.codeweavers.com>
+alias thorson-peter Peter Thorson <zaphoyd@uchicago.edu>
+alias daugherty-eleanor Eleanor Daugherty <ebd1@uchicago.edu>
+alias berkowitz-peter Peter Berkowitz <pqberk@gmail.com>
+alias college-programming@uchicago.edu college-programming@uchicago.edu
+alias kang-esther Esther Kang <estherkang@uchicago.edu>
+alias Twitter <n-pnaavonyfnagn=puvpntbfunqlqrnyre.pbz-7a836@postmaster.twitter.com>
+alias gall-sylvain Sylvain Le Gall <sylvain+ocaml@le-gall.net>
+alias 沈胜宇 <syshen@nudt.edu.cn>
+alias matalka-malcolm Malcolm Matalka <mmatalka@gmail.com>
+alias veber-philippe Philippe Veber <philippe.veber@gmail.com>
+alias pessaux-françois François Pessaux <francois.pessaux@ensta-paristech.fr>
+alias vouillon-jérôme Jérôme Vouillon <vouillon@pps.univ-paris-diderot.fr>
+alias rixed@happyleptic.org rixed@happyleptic.org
+alias Kickstarter <no-reply@kickstarter.com>
+alias BustedDeals <no-reply@bustedtees.com>
+alias lobraico-victoria Victoria LoBraico <Vickybattista@aol.com>
+alias ayalon-ruth Ruth Ayalon <ruthayalon@gmail.com>
+alias varón-andrés Andrés Varón <avaron@gmail.com>
+alias carette-jacques Jacques Carette <carette@mcmaster.ca>
+alias horthy-dexter Dexter Horthy <horthy@uchicago.edu>
+alias Facebook <notification+kykgxw5r@facebookmail.com>
+alias system-mail Mail Delivery System <MAILER-DAEMON@authsmtp01.uchicago.edu>
+alias shadydealer-core-request@lists.uchicago.edu shadydealer-core-request@lists.uchicago.edu
+alias lobraico-d. D. LoBraico <dlobraico@uchicago.edu>
+alias Heroku <newsletter@heroku.com>
+alias bartlett-bob Bob Bartlett <rdb@cs.uchicago.edu>
+alias support-domainsite.com Domainsite.com Support <support@domainsite.com>
+alias Steph <yus@uchicago.edu>
+alias micinski-kristopher Kristopher Micinski <krismicinski@gmail.com>
+alias cooper-eric Eric Cooper <ecc@cmu.edu>
+alias tabony-sawyer Sawyer Tabony <sawyertabony@gmail.com>
+alias spiwack-arnaud Arnaud Spiwack <Arnaud.Spiwack@lix.polytechnique.fr>
+alias chicago-the The Harper Theater | Hyde Park Chicago <info@harpertheater.com>
+alias tess TESS <tess.experiments@gmail.com>
+alias johnson-sarah Sarah Johnson <sej@uchicago.edu>
+alias shintani-stacey Stacey Shintani <stacey@uchicago.edu>
+alias films-doc Doc Films <doc@docfilms.org>
+alias dunham-scott Scott Dunham <dunhamsc@gmail.com>
+alias harold-evan Evan Harold <publicity@docfilms.org>
+alias biden-joe Joe Biden <info@barackobama.com>
+alias Kahn <kmason@gmail.com>
+alias wood-tom Tom Wood <tomwood@uchicago.edu>
+alias scherer-gabriel Gabriel Scherer <gabriel.scherer@gmail.com>
+alias douglass-ralph Ralph Douglass <ralph@grayskies.net>
+alias barackobama.com-jim Jim Messina BarackObama.com <info@barackobama.com>
+alias Joe Biden
+alias volkswagen-shrewsbury Shrewsbury Volkswagen <newsletter@shrewsburymotors.com>
+alias Kelly <no-reply@thelistserve.com>
+alias randhava-ravi Ravi Randhava <rrandhava@uchicago.edu>
+alias team-piazza Piazza Team <no-reply@piazza.com>
+alias berkowitz-peter Peter Berkowitz <pberkowitz@uchicago.edu>
+alias troestler-christophe Christophe TROESTLER <Christophe.Troestler@umons.ac.be>
View
13 mutt/auto_alias.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+MESSAGE=$(cat)
+
+NEWALIAS=$(echo "${MESSAGE}" | grep ^"From: " | sed s/[\,\"\']//g | awk '{$1=""; if (NF == 3) {print "alias" $0;} else if (NF == 2) {print "alias" $0 $0;} else if (NF > 3) {print "alias", tolower($(NF-1))"-"tolower($2) $0;}}')
+
+if grep -Fxq "$NEWALIAS" $HOME/.mutt/aliases; then
+ :
+else
+ echo "$NEWALIAS" >> $HOME/.mutt/aliases
+fi
+
+echo "${MESSAGE}"
View
5 mutt/mailcap
@@ -1,5 +1,7 @@
# MS Word documents
application/msword; ~/.mutt/view_attachment.sh %s "-" '/Applications/TextEdit.app'
+application/vnd.openxmlformats-officedocument.wordprocessingml.document; ~/.mutt/view_attachment.sh %s docx
+
# Images
image/jpg; ~/.mutt/view_attachment.sh %s jpg
@@ -12,7 +14,8 @@ image/gif; ~/.mutt/view_attachment.sh %s gif
application/pdf; ~/.mutt/view_attachment.sh %s pdf
# HTML
-text/html; ~/.mutt/view_attachment.sh %s html
+#text/html; ~/.mutt/view_attachment.sh %s html
+text/html; pandoc -f html -t markdown; copiousoutput; compose=vim %s
text/plain; less %s
# Unidentified files
View
33 muttrc
@@ -12,13 +12,12 @@ set postponed = "+personal/drafts"
alternates dj@lobraico.com
# Paths and folders
-set alias_file = "~/.mutt/alias"
-set header_cache = "~/.mutt/cache/headers"
-set message_cachedir = "~/.mutt/cache/bodies"
-set certificate_file = "~/.mutt/.certificates"
-set mailcap_path = "~/.mutt/mailcap"
-set tmpdir = "~/.mutt/tmp"
-set signature = "~/.mutt/sig"
+set header_cache = "$HOME/.mutt/cache/headers"
+set message_cachedir = "$HOME/.mutt/cache/bodies"
+set certificate_file = "$HOME/.mutt/.certificates"
+set mailcap_path = "$HOME/.mutt/mailcap"
+set tmpdir = "$HOME/.mutt/tmp"
+set signature = "$HOME/.mutt/sig"
# Basic options
set wait_key = no
@@ -37,10 +36,13 @@ set thorough_search
bind compose p postpone-message
bind index p recall-message
-auto_view text/html
+auto_view text/html message/rfc822
# Editor
-set editor = "vim -c 'normal! }' -c 'redraw'"
+set text_flowed = yes
+set editor = "vim"
+#set editor = "vim -c 'normal! }' -c 'redraw'"
+
# Open in Vim
macro index,pager V "|vim -c 'setlocal ft=mail' -c 'setlocal buftype=nofile' -<enter>" "open in vim"
@@ -134,7 +136,8 @@ macro pager s "<pipe-message>cat > ~/" "save message as"
# Compose view options
set envelope_from # which from?
set sig_dashes # dashes before sig
-set edit_headers # show headers when composing
+# set edit_headers # show headers when composing
+unset edit_headers # DON'T show headers when composing
set fast_reply # skip to compose when replying
set askbcc # ask for BCC:
set askcc # ask for CC:
@@ -150,9 +153,13 @@ set forward_quote # include message in forwards
set text_flowed
# Address book!
-set query_command = "contacts -Sf '%eTOKEN%n' '%s' | sed -e 's/TOKEN/\t/g'"
-bind editor <Tab> complete-query
-bind editor ^T complete
+set query_command = "contacts -Sf '%e;%n' '%s' | awk -F ';' '$1' | sort -k 1 | sed 's/\;/\t/'"
+#bind editor <Tab> complete-query
+#bind editor ^T complete
+
+set alias_file = "$HOME/.mutt/aliases"
+source "$HOME/.mutt/aliases"
+set display_filter = "$HOME/.mutt/auto_alias.sh"
# Search
#bind index N search-opposite
View
14 offlineimaprc
@@ -29,7 +29,6 @@ type = Gmail
remotehost = imap.gmail.com
remoteuser = d@lobraico.com
remotepasseval = get_keychain_pass(account="d@lobraico.com", server="imap.gmail.com")
-postsynchook = "mu index --maildir='~/Mail'"
realdelete = no
ssl = yes
# FIXME use sslcacertfile instead
@@ -53,17 +52,26 @@ remoterepository = remote_school
type = Maildir
localfolders = ~/Mail/school
restoreatime = no
+nametrans = lambda folder: {'drafts': 'Drafts',
+ 'sent': 'Sent',
+ 'trash': 'Deleted Items',
+ 'archive': 'Archive',
+ }.get(folder, folder)
[Repository remote_school]
type = IMAP
remotehost = xmail.uchicago.edu
remoteuser = dlobraico
remotepasseval = get_keychain_pass(account="dlobraico", server="xmail.uchicago.edu")
-postsynchook = "mu index --maildir='~/Mail'"
realdelete = no
ssl = yes
cert_fingerprint = 939123234798c8219306e6fec5b2a684b4bfff52
maxconnections = 3
+nametrans = lambda folder: {'Drafts': 'drafts',
+ 'Sent': 'sent',
+ 'Deleted Items': 'trash',
+ 'Archive': 'archive',
+ }.get(folder, folder)
#### End - dlobraico@uchicago.edu
#### Chicago Shady Dealer Google Apps - editor@chicagoshadydealer.com
@@ -88,7 +96,6 @@ type = Gmail
remotehost = imap.gmail.com
remoteuser = editor@chicagoshadydealer.com
remotepasseval = get_keychain_pass(account="editor@chicagoshadydealer.com", server="imap.gmail.com")
-postsynchook = "mu index --maildir='~/Mail'"
realdelete = no
ssl = yes
# FIXME use sslcacertfile instead
@@ -125,7 +132,6 @@ type = Gmail
remotehost = imap.gmail.com
remoteuser = dj@dailysophist.com
remotepasseval = get_keychain_pass(account="dj@dailysophist.com", server="imap.gmail.com")
-postsynchook = "mu index --maildir='~/Mail'"
realdelete = no
ssl = yes
# FIXME use sslcacertfile instead
View
4 vimrc
@@ -351,3 +351,7 @@ let g:Tex_ViewRule_pdf = 'open'
" so editing crontab on OS X isn't broken
au BufEnter /private/tmp/crontab.* setl backupcopy=yes
+
+" So my emails don't have weird linebreaks
+autocmd FileType mail setlocal fo+=awn
+autocmd FileType mail set spell
View
1  zshrc
@@ -88,6 +88,7 @@ if [[ $platform = 'darwin' ]]; then
alias emacs="open -a /usr/local/Cellar/emacs/24.2/Emacs.app $1"
alias ec="/usr/local/Cellar/emacs/24.2/bin/emacsclient"
alias ed="/usr/local/Cellar/emacs/24.2/Emacs.app/Contents/MacOS/Emacs --daemon"
+ alias e="/usr/local/Cellar/emacs/24.2/bin/emacsclient -a '' -c"
export EDITOR=vim
Please sign in to comment.
Something went wrong with that request. Please try again.