<div class="markdown">
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<style type="text/css"> .hll { background-color: #ffffcc } .c { color: #93a1a1; font-style: italic } /* Comment */ .err { color: #dc322f } /* Error */ .g { color: #657b83 } /* Generic */ .k { color: #859900 } /* Keyword */ .l { color: #657b83 } /* Literal */ .n { color: #586e75 } /* Name */ .o { color: #657b83 } /* Operator */ .x { color: #657b83 } /* Other */ .p { color: #657b83 } /* Punctuation */ .cm { color: #93a1a1; font-style: italic } /* Comment.Multiline */ .cp { color: #93a1a1; font-style: italic } /* Comment.Preproc */ .c1 { color: #93a1a1; font-style: italic } /* Comment.Single */ .cs { color: #93a1a1; font-style: italic } /* Comment.Special */ .gd { color: #657b83 } /* Generic.Deleted */ .ge { color: #657b83 } /* Generic.Emph */ .gr { color: #657b83 } /* Generic.Error */ .gh { color: #657b83 } /* Generic.Heading */ .gi { color: #657b83 } /* Generic.Inserted */ .go { color: #657b83 } /* Generic.Output */ .gp { color: #657b83 } /* Generic.Prompt */ .gs { color: #657b83 } /* Generic.Strong */ .gu { color: #657b83 } /* Generic.Subheading */ .gt { color: #657b83 } /* Generic.Traceback */ .kc { color: #859900 } /* Keyword.Constant */ .kd { color: #859900 } /* Keyword.Declaration */ .kn { color: #cb4b16 } /* Keyword.Namespace */ .kp { color: #cb4b16 } /* Keyword.Pseudo */ .kr { color: #859900 } /* Keyword.Reserved */ .kt { color: #859900 } /* Keyword.Type */ .ld { color: #657b83 } /* Literal.Date */ .m { color: #2aa198 } /* Literal.Number */ .s { color: #2aa198 } /* Literal.String */ .na { color: #657b83 } /* Name.Attribute */ .nb { color: #268bd2 } /* Name.Builtin */ .nc { color: #268bd2 } /* Name.Class */ .no { color: #b58900 } /* Name.Constant */ .nd { color: #cb4b16 } /* Name.Decorator */ .ni { color: #cb4b16 } /* Name.Entity */ .ne { color: #cb4b16 } /* Name.Exception */ .nf { color: #268bd2 } /* Name.Function */ .nl { color: #657b83 } /* Name.Label */ .nn { color: #b58900 } /* Name.Namespace */ .nx { color: #657b83 } /* Name.Other */ .py { color: #268bd2 } /* Name.Property */ .nt { color: #859900 } /* Name.Tag */ .nv { color: #cb4b16 } /* Name.Variable */ .ow { color: #859900 } /* Operator.Word */ .w { color: #fdf6e3 } /* Text.Whitespace */ .mf { color: #2aa198 } /* Literal.Number.Float */ .mh { color: #2aa198 } /* Literal.Number.Hex */ .mi { color: #2aa198 } /* Literal.Number.Integer */ .mo { color: #2aa198 } /* Literal.Number.Oct */ .sb { color: #2aa198 } /* Literal.String.Backtick */ .sc { color: #2aa198 } /* Literal.String.Char */ .sd { color: #2aa198 } /* Literal.String.Doc */ .s2 { color: #2aa198 } /* Literal.String.Double */ .se { color: #cb4b16 } /* Literal.String.Escape */ .sh { color: #2aa198 } /* Literal.String.Heredoc */ .si { color: #cb4b16 } /* Literal.String.Interpol */ .sx { color: #2aa198 } /* Literal.String.Other */ .sr { color: #2aa198 } /* Literal.String.Regex */ .s1 { color: #2aa198 } /* Literal.String.Single */ .ss { color: #2aa198 } /* Literal.String.Symbol */ .bp { color: #268bd2; font-weight: bold } /* Name.Builtin.Pseudo */ .vc { color: #268bd2 } /* Name.Variable.Class */ .vg { color: #268bd2 } /* Name.Variable.Global */ .vi { color: #268bd2 } /* Name.Variable.Instance */ .il { color: #2aa198 } /* Literal.Number.Integer.Long */ @media print { .messagedivider { page-break-after: always; } } @media screen { .messagedivider { height: 0px; margin: 10px 0px; padding: 0px; border-bottom: 1px solid lightgray; } } /* Line wrapping */ div[markup="none"] { white-space: pre-wrap; } div[markup="markdown"] { white-space: normal; } /* General styling of quotation blocks (and colors for level 2 and upwards)*/ blockquote { margin: 0 0 5px; padding-left: 5px; border-left: 2px solid #136BCE; color: #136BCE; } /* Specific styling of level 1 quotation blocks */ blockquote blockquote { border-left: 2px solid #4B89CF; color: #4B89CF; } /* Discrete links in quoted text */ blockquote a:link { color: #136BCE; } blockquote a:active { color: red; } blockquote blockquote a:link { color: #4B89CF; } blockquote blockquote a:active { color: red; } pre { margin-left: 15px; margin-right: 15px; padding: 5px; background-color: #E4E4E4; border: thin solid gray; overflow: auto; } /* Show Raw Source */ pre.raw { margin-left: 5px; margin-right: 5px; white-space: pre-wrap; } /* Attached messages are indented and given a frame and background color */ div.bodypart[type=message][subtype=rfc822] { margin-left: 20px; padding: 5px; background-color: #FDF5E6; border: thin solid gray; } /* Make sure inlined images are never wider than the webview. Problem: Only works for body part images and not for HTML inlined images. Current solution: Using the user style sheet defaults to set max-width on all images. */ /*div.bodypart[disposition="inline"][type=image] img { max-width:100%; } div.bodypart[disposition="inline"][type=application][subtype=pdf] img { max-width:100%; } */ /* Doesn't work. div.bodypart[disposition="attachment"] + div.bodypart[disposition="attachment"] { margin-top: 10px; } */ /*div.bodypart[disposition="attachment"] div { float: left; border-left: thin solid #A4A4A4; border-top: thin solid #A4A4A4; border-bottom: thin solid #A4A4A4; background-color: #D5DCE4; height: 1.2em; min-height: 16px; vertical-align: middle; padding: 3px; margin-bottom:5px; } */ /* Markdown table */ div.markdown table { border-collapse: collapse; margin: 0 2em; /* width: 320px;*/ } div.markdown th { padding: 0.5em; } div.markdown td { border-top: 1px solid lightgray; border-bottom: 1px solid lightgray; padding: 0.5em; } div.markdown td+td { border-left: 1px solid lightgray; } /* Attachments table */ table.attachments { border-collapse: collapse; margin: 1em 0em; } table.attachments th { padding: 0.5em; } table.attachments td { border-top: 1px solid lightgray; border-bottom: 1px solid lightgray; padding: 0.5em 1em; /* FIXME: This needs to be improved. */ max-width: 400px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } table.attachments td.icon { -webkit-user-select: none; padding: 0em; } table.attachments td.icon img { min-width: 16px; width: 1.5em; height: auto; } table.attachments td.description { border-left: none; padding-left: 5px; } table.attachments td.description a:link { color: black; text-decoration: none; } table.attachments td.description a:active { color: gray; } table.attachments td.description a:hover { text-decoration:underline; } table.attachments td.description a:visited { color: gray; } table.attachments td.size { text-align: right; padding-right: 0; } table.attachments td.button { padding-right: 0; } table.attachments form { margin: 0; } /* The header related stuff is currently only used when displaying multiple messages */ /* Add a ':' after each header title */ span.header_name:after { content: ": " } span.header_name { color: blue; font-weight: bold; } span.header_body { font-weight: bold; } /* How to style a specific header */ span.header_name[type="from.name"] { color: red; font-weight: bold; } /* Various spacings between messages and message-elements. */ hr.messagedivider { clear: both; margin-top: 10px; margin-bottom: 10px; } span.header + div.body { margin-top: 10px } div.bodypart + div.bodypart { margin-top: 10px; } /* Styling the horizontal divider between messages. */ hr.messagedivider { border-top: thin solid gray; height: 2px; }/* */ div.highlight > pre, pre.sundowner { margin-left: 15px; margin-right: 15px; padding: 5px; background-color: #fdf6e3; border: thin solid gray; overflow: auto; margin-bottom: 15px; display: inline-block; font-family: "Menlo", "Courier New", "Courier", "Monospaced"; font-size: 10pt; } table.sundowner { line-spacing: 120%; font-family: "Menlo", "Courier New", "Courier", "Monospaced"; font-size: 10pt; } div.markdown > p { /* Override stupid Microsoft CSS */ margin-bottom: 1em; } div.markdown > * { font-family: Helvetica, Arial, sans-serif; font-size: 10pt; } /* */</style>
</head>
<body>
<p dir="auto">I have a bunch of key bindings for mass selection and deletion of mail messages. The deletion ones can be rather dangerous, so sometimes I just use the selection ones and then hit delete (or file, or whatever is appropriate). </p>
<p dir="auto">(I also have an action that sends me a Growl notification of the subjects and number of messages deleted if I delete more than a few, that’s useful for when I accidentally go overboard. I can upload that if people are interested.) </p>
<p dir="auto">The selection ones are particularly useful now that I’m using the recently shared modification that adds an extra pane showing the selected messages and (in my case) everything else with the same subject. It makes it far easier to see what I just selected. </p>
<p dir="auto">Of those, I probably use t, i, s, and f most often. ‘dt’ is great for nuking a conversation you are done with. ‘di’ is good for deleting just the conversation in your inbox, but not the items you’ve filed already (e.g. you filed that useful post to MailMate, but you want to delete all the replies). ‘ds’ is good for when threading isn’t capturing everything, or it’s a bunch of automated messages with the same subject. And ‘df’ is great for email notifications from online services (a dozen messages from a store about new products). </p>
<p dir="auto">In any case, here they are if anyone would like to try them. If you haven’t modified keybindings, they go in <code>~/MailMate/Resources/KeyBindings/Kee.plist</code> and then you’d set your Custom Key Bindings in preferences to ‘Kee’. </p>
<p dir="auto">Thanks to all the other MailMate users who made it possible to build these. And of course, our favorite developer! </p>
<div class="highlight"><pre><span class="p">{</span>
<span class="err">//</span> <span class="nt">"r"</span> <span class="err">=</span> <span class="err">(</span> <span class="s2">"replyAll:"</span><span class="p">,</span> <span class="nt">"selectAll:"</span><span class="p">,</span> <span class="nt">"decreaseQuoteLevel:"</span><span class="p">,</span> <span class="nt">"deselectAll:"</span><span class="p">,</span> <span class="nt">"moveToBeginningOfDocument:"</span><span class="p">,</span> <span class="nt">"insertNewline:"</span><span class="p">,</span> <span class="nt">"insertNewline:"</span><span class="p">,</span> <span class="nt">"moveToBeginningOfDocument:"</span> <span class="err">);</span>
<span class="s2">"r"</span> <span class="err">=</span> <span class="err">(</span> <span class="s2">"addTag:"</span><span class="p">,</span> <span class="nt">"HTMLReply"</span><span class="p">,</span> <span class="nt">"replyAll:"</span> <span class="err">);</span>
<span class="s2">"c"</span> <span class="err">=</span> <span class="s2">"collapseThread:"</span><span class="err">;</span>
<span class="s2">"e"</span> <span class="err">=</span> <span class="s2">"expandThread:"</span><span class="err">;</span>
<span class="s2">"j"</span> <span class="err">=</span> <span class="s2">"nextMessage:"</span><span class="err">;</span>
<span class="s2">"k"</span> <span class="err">=</span> <span class="s2">"previousThread:"</span><span class="err">;</span>
<span class="s2">"n"</span> <span class="err">=</span> <span class="s2">"nextUnreadMessage:"</span><span class="err">;</span>
<span class="s2">"p"</span> <span class="err">=</span> <span class="s2">"previousUnreadMessage:"</span><span class="err">;</span>
<span class="s2">"J"</span> <span class="err">=</span> <span class="err">(</span> <span class="s2">"markAsNotJunk:"</span><span class="p">,</span> <span class="nt">"removeTag:"</span><span class="p">,</span> <span class="nt">"\\Seen"</span><span class="p">,</span> <span class="nt">"moveToMailbox:"</span><span class="p">,</span><span class="err">'INBOX');</span>
<span class="err">//</span> <span class="err">delete</span> <span class="err">commands</span>
<span class="nt">"d"</span> <span class="err">=</span> <span class="p">{</span>
<span class="err">//</span> <span class="err">Delete</span> <span class="err">entire</span> <span class="err">thread</span>
<span class="nt">"t"</span> <span class="err">=</span> <span class="err">(</span> <span class="s2">"selectThread:"</span><span class="p">,</span> <span class="nt">"deleteMessage:"</span> <span class="err">);</span>
<span class="err">//</span> <span class="err">Delete</span> <span class="err">the</span> <span class="err">thread</span> <span class="err">in</span> <span class="err">the</span> <span class="err">inbox</span><span class="p">,</span> <span class="err">but</span> <span class="err">leave</span> <span class="err">filed</span> <span class="err">items</span> <span class="err">alone</span>
<span class="nt">"i"</span> <span class="err">=</span> <span class="err">(</span> <span class="s2">"selectWithFilter:"</span><span class="p">,</span> <span class="nt">"#thread-id = ${#thread-id} and #source.path = 'INBOX'"</span><span class="p">,</span> <span class="nt">"deleteMessage:"</span> <span class="err">);</span>
<span class="err">//</span> <span class="err">Delete</span> <span class="err">thread</span> <span class="err">except</span> <span class="err">mail</span> <span class="err">that</span> <span class="err">was</span> <span class="err">mine</span> <span class="err">(I</span> <span class="err">sent)</span>
<span class="s2">"m"</span> <span class="err">=</span> <span class="err">(</span> <span class="s2">"selectWithFilter:"</span><span class="p">,</span> <span class="nt">"#thread-id = ${#thread-id} and #source.path != 'Sent Messages' and #source.path != 'Sent Items'"</span><span class="p">,</span> <span class="nt">"deleteMessage:"</span> <span class="err">);</span>
<span class="err">//</span> <span class="err">Delete</span> <span class="err">thread</span> <span class="err">except</span> <span class="err">the</span> <span class="err">stuff</span> <span class="err">in</span> <span class="err">inbox</span> <span class="err">or</span> <span class="err">sent</span> <span class="err">(other)</span>
<span class="s2">"o"</span> <span class="err">=</span> <span class="err">(</span> <span class="s2">"selectWithFilter:"</span><span class="p">,</span> <span class="nt">"#thread-id = ${#thread-id} and #source.path != 'INBOX' and #source.path != 'Sent Messages' and #source.path != 'Sent Items'"</span><span class="p">,</span> <span class="nt">"deleteMessage:"</span> <span class="err">);</span>
<span class="err">//</span> <span class="err">Delete</span> <span class="err">the</span> <span class="err">subject</span>
<span class="s2">"s"</span> <span class="err">=</span> <span class="err">(</span> <span class="s2">"selectWithFilter:"</span><span class="p">,</span> <span class="nt">"subject = '${subject}'"</span><span class="p">,</span> <span class="nt">"moveToMailbox:"</span><span class="p">,</span> <span class="nt">"trash"</span> <span class="err">);</span>
<span class="err">//</span> <span class="err">Delete</span> <span class="err">by</span> <span class="err">from</span> <span class="err">address</span>
<span class="s2">"f"</span> <span class="err">=</span> <span class="err">(</span> <span class="s2">"selectWithFilter:"</span><span class="p">,</span> <span class="nt">"from.address = '${from.address}'"</span><span class="p">,</span> <span class="nt">"moveToMailbox:"</span><span class="p">,</span> <span class="nt">"trash"</span> <span class="err">);</span>
<span class="err">//</span> <span class="err">Delete</span> <span class="err">any</span> <span class="err">mail</span> <span class="err">to</span> <span class="err">this</span> <span class="err">recipient</span>
<span class="s2">"r"</span> <span class="err">=</span> <span class="err">(</span> <span class="s2">"selectWithFilter:"</span><span class="p">,</span> <span class="nt">"#recipient.address = '${#recipient.address}'"</span><span class="p">,</span> <span class="nt">"moveToMailbox:"</span><span class="p">,</span> <span class="nt">"trash"</span> <span class="err">);</span>
<span class="p">}</span><span class="err">;</span>
<span class="err">//</span> <span class="err">select</span> <span class="err">commands</span> <span class="err">(good</span> <span class="err">if</span> <span class="err">you</span> <span class="err">aren't</span> <span class="err">sure</span> <span class="err">what</span> <span class="err">the</span> <span class="err">delete</span> <span class="err">in</span> <span class="err">thread</span> <span class="err">action</span> <span class="err">is</span> <span class="err">going</span> <span class="err">to</span> <span class="err">do!)</span>
<span class="s2">"s"</span> <span class="err">=</span> <span class="p">{</span>
<span class="err">//</span> <span class="err">Select</span> <span class="err">an</span> <span class="err">entire</span> <span class="err">thread</span>
<span class="nt">"t"</span> <span class="err">=</span> <span class="s2">"selectThread:"</span><span class="err">;</span>
<span class="err">//</span> <span class="err">Select</span> <span class="err">just</span> <span class="err">the</span> <span class="err">items</span> <span class="err">in</span> <span class="err">the</span> <span class="err">thread</span> <span class="err">that</span> <span class="err">are</span> <span class="err">in</span> <span class="err">my</span> <span class="err">inbox</span><span class="p">,</span> <span class="err">leaving</span> <span class="err">filed</span> <span class="err">messages</span> <span class="err">alone</span>
<span class="nt">"i"</span> <span class="err">=</span> <span class="err">(</span> <span class="s2">"selectWithFilter:"</span><span class="p">,</span> <span class="nt">"#thread-id = ${#thread-id} and #source.path = 'INBOX'"</span> <span class="err">);</span>
<span class="err">//</span> <span class="err">Select</span> <span class="err">thread</span> <span class="err">except</span> <span class="err">mail</span> <span class="err">that</span> <span class="err">was</span> <span class="err">mine</span> <span class="err">(I</span> <span class="err">sent)</span>
<span class="s2">"m"</span> <span class="err">=</span> <span class="err">(</span> <span class="s2">"selectWithFilter:"</span><span class="p">,</span> <span class="nt">"#thread-id = ${#thread-id} and #source.path != 'Sent Messages' and #source.path != 'Sent Items'"</span> <span class="err">);</span>
<span class="err">//</span> <span class="err">Select</span> <span class="err">thread</span> <span class="err">except</span> <span class="err">the</span> <span class="err">stuff</span> <span class="err">in</span> <span class="err">inbox</span> <span class="err">or</span> <span class="err">sent</span> <span class="err">(other)</span>
<span class="s2">"o"</span> <span class="err">=</span> <span class="err">(</span> <span class="s2">"selectWithFilter:"</span><span class="p">,</span> <span class="nt">"#thread-id = ${#thread-id} and #source.path != 'INBOX' and #source.path != 'Sent Messages' and #source.path != 'Sent Items'"</span> <span class="err">);</span>
<span class="err">//</span> <span class="err">Select</span> <span class="err">the</span> <span class="err">subject</span>
<span class="s2">"s"</span> <span class="err">=</span> <span class="err">(</span> <span class="s2">"selectWithFilter:"</span><span class="p">,</span> <span class="nt">"subject = '${subject}'"</span> <span class="err">);</span>
<span class="err">//</span> <span class="err">Select</span> <span class="err">by</span> <span class="err">from</span> <span class="err">address</span>
<span class="s2">"f"</span> <span class="err">=</span> <span class="err">(</span> <span class="s2">"selectWithFilter:"</span><span class="p">,</span> <span class="nt">"from.address = '${from.address}'"</span> <span class="err">);</span>
<span class="err">//</span> <span class="err">Select</span> <span class="err">any</span> <span class="err">mail</span> <span class="err">to</span> <span class="err">this</span> <span class="err">recipient</span> <span class="err">(warning</span><span class="p">,</span> <span class="err">I've</span> <span class="err">had</span> <span class="err">this</span> <span class="err">crash</span> <span class="err">MailMate)</span>
<span class="nt">"r"</span> <span class="err">=</span> <span class="err">(</span> <span class="s2">"selectWithFilter:"</span><span class="p">,</span> <span class="nt">"#recipient.address = '${#recipient.address}'"</span> <span class="err">);</span>
<span class="err">//</span><span class="s2">"m"</span> <span class="err">=</span> <span class="err">(</span> <span class="s2">"selectWithFilter:"</span><span class="p">,</span> <span class="nt">"#thread-id = ${#thread-id} and #source.mailto !=[x] \\$SENT.source.mailto"</span> <span class="err">);</span>
<span class="err">//</span> <span class="s2">"m"</span> <span class="err">=</span> <span class="err">(</span> <span class="s2">"selectWithFilter:"</span><span class="p">,</span> <span class="nt">"#thread-id = ${#thread-id} and from.address !=[x] \\$SENT.from.address"</span> <span class="err">);</span>
<span class="p">}</span><span class="err">;</span>
<span class="err">//</span> <span class="err">FROM</span> <span class="err">SOMEONE</span> <span class="s2">"c"</span> <span class="err">=</span> <span class="err">(</span> <span class="s2">"showThread:"</span><span class="p">,</span> <span class="nt">"showCorrespondence"</span> <span class="err">);</span>
<span class="err">//</span> <span class="err">Editing</span> <span class="err">commands</span>
<span class="err">//</span> <span class="err">bold</span> <span class="err">selection</span>
<span class="s2">"@b"</span> <span class="err">=</span> <span class="err">(selectWord</span><span class="p">:,</span> <span class="err">setMark:,</span> <span class="err">swapWithMark:,</span> <span class="err">deleteToMark:,</span> <span class="err">insertText:,</span> <span class="nt">"**"</span><span class="p">,</span> <span class="err">yank:,</span> <span class="err">insertText:,</span> <span class="nt">" "</span><span class="p">,</span> <span class="err">moveLeft:,</span> <span class="err">insertText:,</span> <span class="nt">"**"</span><span class="p">,</span> <span class="err">moveRight:,</span> <span class="err">deleteBackward:);</span>
<span class="err">//</span> <span class="err">italicize</span> <span class="err">selection</span>
<span class="nt">"@i"</span> <span class="err">=</span> <span class="err">(selectWord</span><span class="p">:,</span> <span class="err">setMark:,</span> <span class="err">swapWithMark:,</span> <span class="err">deleteToMark:,</span> <span class="err">insertText:,</span> <span class="nt">"_"</span><span class="p">,</span> <span class="err">yank:,</span> <span class="err">insertText:,</span> <span class="nt">" "</span><span class="p">,</span> <span class="err">moveLeft:,</span> <span class="err">insertText:,</span> <span class="nt">"_"</span><span class="p">,</span> <span class="err">moveRight:,</span> <span class="err">deleteBackward:);</span>
<span class="err">//</span> <span class="err">typewriterize</span> <span class="err">selection</span>
<span class="nt">"@t"</span> <span class="err">=</span> <span class="err">(selectWord</span><span class="p">:,</span> <span class="err">setMark:,</span> <span class="err">swapWithMark:,</span> <span class="err">deleteToMark:,</span> <span class="err">insertText:,</span> <span class="nt">"`"</span><span class="p">,</span> <span class="err">yank:,</span> <span class="err">insertText:,</span> <span class="nt">" "</span><span class="p">,</span> <span class="err">moveLeft:,</span> <span class="err">insertText:,</span> <span class="nt">"`"</span><span class="p">,</span> <span class="err">moveRight:,</span> <span class="err">deleteBackward:);</span>
<span class="p">}</span>
</pre></div>
</body>
</html>
</div>