I'm wondering why when editing an email message (using the Mail language) the scope is set to:
text.mail.markdown text.html.markdown
This results in html-style commands and snippets being executed (comments command inserts <! -- -- > style). It seems like Text should be the inherited scope, with modifications ( > set as the comment mark).
Which begs another question: how to import the Text language bundle into the Mail bundle. (So that I can have plain text scopes and thus syntax coloring).
Thanks!
Q
On 25. Oct 2006, at 09:12, Quinn Comendant wrote:
I'm wondering why when editing an email message (using the Mail language) the scope is set to:
text.mail.markdown text.html.markdown
Markdown is text.html.markdown. It allows to embed HTML so we decided to give it a scope to indicate that it was an HTML extension [1].
The Mail bundle includes Markdown, as we decided that Markdown was a pretty good match for the syntax used in emails, and there is some overlap between Markdown and emails (like increase/decrease quote level and reflow quoted text).
[1] Though today I would probably have made it just text.markdown, and made only the tags and stuff between, text.html.
This results in html-style commands and snippets being executed (comments command inserts <! -- -- > style). It seems like Text should be the inherited scope, with modifications ( > set as the comment mark).
But ‘>’ does not mark a comment, it marks quoted text (which can be multiple levels). There is a key equivalent for increasing and decreasing the quotation level (it mimicks the one used in Eudora and Mail).
Which begs another question: how to import the Text language bundle into the Mail bundle. (So that I can have plain text scopes and thus syntax coloring).
Since the scope starts with text, everything scoped to text already works.
Which kind of syntax highlight do you want? Markdown already highlights quoted text, _italic_, **bold**, http://macromates.com/ (URLs), > quoted text, * list items, and more.
On 10/25/06, Allan Odgaard throw-away-1@macromates.com wrote:
The Mail bundle includes Markdown, as we decided that Markdown was a pretty good match for the syntax used in emails, and there is some overlap between Markdown and emails (like increase/decrease quote level and reflow quoted text).
I think it's a great idea to include Markdown, the only problem I have with this is the need of two spaces for hard linebreak. It's not a problem for what I write, as I'm used to Markdown, but the quotes are messed when previewing...
On 25. Oct 2006, at 15:56, Fred B wrote:
On 10/25/06, Allan Odgaard throw-away-1@macromates.com wrote:
The Mail bundle includes Markdown, as we decided that Markdown was a pretty good match for the syntax used in emails, and there is some overlap between Markdown and emails (like increase/decrease quote level and reflow quoted text).
I think it's a great idea to include Markdown, the only problem I have with this is the need of two spaces for hard linebreak. It's not a problem for what I write, as I'm used to Markdown, but the quotes are messed when previewing...
IMO this is a flaw of Markdown and should be changed.
I have raised the issue a few times, but the Markdown “community” seems more obsessed with things like how to treat two dashes inside XML comments, than fixing the multitude of problems and inconsistencies with block level environments and embedding of same ;)
Two other things I dislike about using Markdown for email is that bold (⌘B) wraps the text in two asterisks (and visually *bla* is italic), and that URLs are not underlined (and thus not “clickable”) unless written like this: http://macromates.com/.
The latter though scope injection will be able to easily solve (solving it now would require to override a large portion of the Markdown grammar, because URLs are matched inside block level elements including paragraphs).
On 10/25/06, Allan Odgaard throw-away-1@macromates.com wrote:
On 25. Oct 2006, at 15:56, Fred B wrote:
I think it's a great idea to include Markdown, the only problem I have with this is the need of two spaces for hard linebreak. It's not a problem for what I write, as I'm used to Markdown, but the quotes are messed when previewing...
IMO this is a flaw of Markdown and should be changed.
I have raised the issue a few times, but the Markdown "community" seems more obsessed with things like how to treat two dashes inside XML comments, than fixing the multitude of problems and inconsistencies with block level environments and embedding of same ;)
Yes, I follow the Markdown mail list and see what you're talking about... ;) Markdown is the best text markup I know of, but when you use it all the time, inconsistencies with blocks, lists, etc. show up quite often. They should be easy to fix if only they settled on a way to fix it and do it.
Two other things I dislike about using Markdown for email is that bold (⌘B) wraps the text in two asterisks (and visually *bla* is italic), and that URLs are not underlined (and thus not "clickable") unless written like this: http://macromates.com/.
Totally agree.
The latter though scope injection will be able to easily solve (solving it now would require to override a large portion of the Markdown grammar, because URLs are matched inside block level elements including paragraphs).
I think you should fork Markdown and make TextDown. And don't tell me you don't have the time. Ok, I'm out. :D
On Oct 25, 2006, at 11:24 AM, Fred B wrote:
Two other things I dislike about using Markdown for email is that bold (⌘B) wraps the text in two asterisks (and visually *bla* is italic),
Totally agree.
Shouldn't Markdown for email be using **bla** for bold (since that translates to <strong> AFAIK)?
And I'd argue that *bla* is visually bold, whereas _bla_ is visually italic.
<semi-rant> I must confess to not being a fan of the fact that *bla* and _bla_ are synonymous in Markdown, because visually they are not synonymous (*bla* carries more visual weight than _bla_).
[additional blathering deleted]
But that's just me. </semi-rant>
On 25. Oct 2006, at 18:11, Jeremy Amos wrote:
On Oct 25, 2006, at 11:24 AM, Fred B wrote:
Two other things I dislike about using Markdown for email is that bold (⌘B) wraps the text in two asterisks (and visually *bla* is italic),
Totally agree.
Shouldn't Markdown for email be using **bla** for bold (since that translates to <strong> AFAIK)?
It does, I meant two asterisks on each side.
And I'd argue that *bla* is visually bold, whereas _bla_ is visually italic.
Yes, I was also surprised when I first read the Markdown syntax, because it says it was inspired by email de facto standards, where we have done *bold*, /italic/, and _underline_ for more than a decade, and then Markdown not only treats * and _ the same, it allows __bold__ and *italic*, that’s just weird.
On Oct 25, 2006, at 12:23 PM, Allan Odgaard wrote:
On 25. Oct 2006, at 18:11, Jeremy Amos wrote:
And I'd argue that *bla* is visually bold, whereas _bla_ is visually italic.
Yes, I was also surprised when I first read the Markdown syntax, because it says it was inspired by email de facto standards, where we have done *bold*, /italic/, and _underline_ for more than a decade, and then Markdown not only treats * and _ the same, it allows __bold__ and *italic*, that’s just weird.
Good to know I'm not the only one who thinks that. (though I've always used _italic_, since underlining AFAIK is used in manuscripts to indicate italics).
* Allan Odgaard throw-away-1@macromates.com [2006-10-25 10:23]:
Yes, I was also surprised when I first read the Markdown syntax, because it says it was inspired by email de facto standards, where we have done *bold*, /italic/, and _underline_ for more than a decade,
Those three styles can also be viewed as just three different ways of emphasizing a word. When I read _this_ in an email I don't think of it differently than *that*.
Markdown works for me because I tend to use *stars* in email but I'd much rather have italic than bold text in HTML.
Naive question: Why use stars when you can have italic and bold? I'd rather use TextMate, but would prefer not to give up my HTML mail. Is there some happy middle-ground I'm missing? (Or is Apple Mail the wrong tool for the job?)
thx
On Oct 25, 2006, at 10:46 AM, Grant Hollingworth wrote:
- Allan Odgaard throw-away-1@macromates.com [2006-10-25 10:23]:
Yes, I was also surprised when I first read the Markdown syntax, because it says it was inspired by email de facto standards, where we have done *bold*, /italic/, and _underline_ for more than a decade,
Those three styles can also be viewed as just three different ways of emphasizing a word. When I read _this_ in an email I don't think of it differently than *that*.
Markdown works for me because I tend to use *stars* in email but I'd much rather have italic than bold text in HTML. ______________________________________________________________________ For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On 10/26/06, s.ross cwdinfo@gmail.com wrote:
Naive question: Why use stars when you can have italic and bold? I'd rather use TextMate, but would prefer not to give up my HTML mail. Is there some happy middle-ground I'm missing? (Or is Apple Mail the wrong tool for the job?)
A few reasons:
- Not everybody use Mail.app (e.g. I use Gmail webmail) - Not everybody like html/rich text mails, some even have strong feelings against html in mails. Plus, it's considered inappropriate on a lot of newsgroup and mail lists. - Some prefer typing in TM than in Mail
On 26. Oct 2006, at 07:23, Fred B wrote:
[...]
- Not everybody like html/rich text mails, some even have strong
feelings against html in mails [...]
To emphasize, one of the reasons why it is disliked is that mailers generally send a giant style sheet with the message.
This means that the message appears unlike any other message in the inbox, which is bad when you have to quickly go through your new email, because having to read 30 messages in a row which are:
* formatted exactly the same * has the first character of the first paragraph at the same location * use the same font (which you chose for optimal reading efficiency) * use the same visual style to markup quoted sections * are without visual distractions (company banners, etc.)
Is much more convenient than reading 30 messages where this is not the case, and it is often not with HTML, especially when generated on Windows, which tends to specify the font size in points, and that comes out to a much smaller font on the Mac (because of how they define the unit differently).
In addition to reading the email comes the lost flexibility when replying to it, as the HTML is often just one big black box, or the mailer will treat it that way.
On 10/26/06, s.ross cwdinfo@gmail.com wrote:
Naive question: Why use stars when you can have italic and bold? I'd rather use TextMate, but would prefer not to give up my HTML mail. Is there some happy middle-ground I'm missing? (Or is Apple Mail the wrong tool for the job?)
E.g. the OS X Tex-Mailinglist will bounce every mail in HTML…and if I don't like you, so do I ;) (and some other ppl I know…)
Niels
On 10/26/06, Niels Kobschätzki n.kobschaetzki@googlemail.com wrote:
On 10/26/06, s.ross cwdinfo@gmail.com wrote:
Naive question: Why use stars when you can have italic and bold? I'd rather use TextMate, but would prefer not to give up my HTML mail. Is there some happy middle-ground I'm missing? (Or is Apple Mail the wrong tool for the job?)
E.g. the OS X Tex-Mailinglist will bounce every mail in HTML…and if I don't like you, so do I ;) (and some other ppl I know…)
and if I remember right html-mails get several points in spamassassin (which is reasonable because spam-mails are nearly always HTML-mails and they are the way to go for phishing-mails)
Niels
Allan Odgaard wrote:
On 25. Oct 2006, at 18:11, Jeremy Amos wrote:
On Oct 25, 2006, at 11:24 AM, Fred B wrote:
Two other things I dislike about using Markdown for email is that bold (⌘B) wraps the text in two asterisks (and visually *bla* is italic),
Totally agree.
Shouldn't Markdown for email be using **bla** for bold (since that translates to <strong> AFAIK)?
It does, I meant two asterisks on each side.
And I'd argue that *bla* is visually bold, whereas _bla_ is visually italic.
Yes, I was also surprised when I first read the Markdown syntax, because it says it was inspired by email de facto standards, where we have done *bold*, /italic/, and _underline_ for more than a decade, and then Markdown not only treats * and _ the same, it allows __bold__ and *italic*, that’s just weird.
Personally I feel that this is fine. *This text* is emphasized, and **This text** is strongly emphasized. That makes plenty of sense to me. People should think about the semantic uses rather than the visual result. In actual published materials, bold is unbelievably rare in prose, and italics are used all the time for emphaasis. Such should also be the case in html documents, where italics are *perfectly adequate* for conveying emphasis. IMO, asterisks do a much better job of conveying emphasis than either slashes or underscores, and so markdown syntax works just fine for me. I think John Gruber has come to regret allowing `_`'s to be used for the same purpose, as they would be nice to have for other things, and having two methods of marking something bold leads to ambiguity. For instance, it might be nice sometimes to allow ^ and _ for super/subscript.
But if you want to read a discussion about this at much greater length, skim back through the markdown mailing list archives. There are some quite spirited debates about this particular part of the syntax.
-Jacob Rus
On Oct 26, 2006, at 1:24 AM, Jacob Rus wrote:
Fred B wrote:
I think you should fork Markdown and make TextDown. And don't tell me you don't have the time. Ok, I'm out. :D
This is sort of the plan, but it's on hold for a while.
What's the hold up? Just curious if there is some way we could help...
James Edward Gray II
On 26. Oct 2006, at 15:11, James Edward Gray II wrote:
On Oct 26, 2006, at 1:24 AM, Jacob Rus wrote:
Fred B wrote:
I think you should fork Markdown and make TextDown. And don't tell me you don't have the time. Ok, I'm out. :D
This is sort of the plan, but it's on hold for a while.
What's the hold up? Just curious if there is some way we could help...
It’s just that I try to only focus on TM 2.0 development stuff prior to leaving for NZ, so I can hold a 10 weeks vacation with good conscious :)
Allan Odgaard wrote:
On 26. Oct 2006, at 15:11, James Edward Gray II wrote:
On Oct 26, 2006, at 1:24 AM, Jacob Rus wrote:
Fred B wrote:
I think you should fork Markdown and make TextDown. And don't tell me you don't have the time. Ok, I'm out. :D
This is sort of the plan, but it's on hold for a while.
What's the hold up? Just curious if there is some way we could help...
It’s just that I try to only focus on TM 2.0 development stuff prior to leaving for NZ, so I can hold a 10 weeks vacation with good conscious :)
JEG2: I'm going to try to spec a bunch of it out while allan is on vacation, so that we can refine/implement it when he gets back. At that point we can ask for some broader feedback. Though I'm still not clear on the best way to do definition lists, footnotes, and tables. I would bring these back up on the Markdown list, but it seems less useful recently than it once was, spending all of its time arguing at great length about things of (IMO) no import whatsoever, while avoiding major issues with hand-wavey explanation.
-Jacob