[TxMt] ^Q and the Mail bundle

Allan Odgaard throw-away-1 at macromates.com
Sat Jul 8 11:42:21 UTC 2006


On 8/7/2006, at 10:02, Eric Peden wrote:

>> This is nice! However, for this to be added to the default I need  
>> the  match to be more strict. Both MultiMarkdown and the blogging   
>> templates also has a “header” on the first line.
> Yeah, my firstLineMatch was awfully broad. [...]

It also just ate diff file recognition for me ;)

>> So ideally it should match ‘(From|To): (?=.*«email»)|Subject: .*’  
>> or  similar. Is mutt consistent with which header it puts first  
>> for new  letters and replies?
> mutt appears to be consistent; I've yet to see it put anything other
> than the "From:" header first. However, when directly editing an
> existing message, the special "From " line, i.e. the one that isn't
> really a header and so doesn't include a colon, generally comes
> first. These *usually* look like this:
>
>  From ???@??? Sat Jul  9 13:15:50 2006
>
> but I have a couple of examples where the address doesn't contain  
> an '@'.

Coincidentally I recently stumbled upon this (via John Gruber):  
http://www.jwz.org/doc/content-length.html

> [...] I've found myself wanting access to some of the Markdown and  
> Textile bundles' features when I'm writing emails [...] Maybe  
> making a pattern in the Mail grammar that matches the entire  
> document and assigns a scope of 'text.html.markdown,' and then  
> including the existing patterns within that scope?

Have a look at the ‘Blog — Markdown’ grammar. It has a section for  
headers, and one for content, where the latter is scoped as  
text.html.markdown.

I think that would be the proper thing to do for mail, perhaps create  
a new language grammar called ‘Mail (Markdown)’ to indicate that this  
is the Markdown-flavor of email.

Or we could perhaps just assume that everyone is fine with having  
emails appear as being in markdown.




More information about the textmate mailing list