New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Email (eml) language #4201
Add Email (eml) language #4201
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the pull request!
I left a few comments below we'll need to address before merging.
lib/linguist/languages.yml
Outdated
- ".eml" | ||
- ".email" | ||
- ".mail" | ||
- ".mime" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I understand what this extension has to do with this...?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pchaigno Those were the extensions in the textmate grammar. I'll remove the last three
lib/linguist/languages.yml
Outdated
type: data | ||
extensions: | ||
- ".eml" | ||
- ".email" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a lot of the .email
files are not EML. There's few benefit to add support for data languages anyway, so I think it'd be better to remove that file extension from the pull request.
lib/linguist/languages.yml
Outdated
extensions: | ||
- ".eml" | ||
- ".email" | ||
- ".mail" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same for .mail
as for .email
: https://github.com/search?p=99&q=NOT+reply-to+extension%3Amail+NOT+from&type=Code
lib/linguist/languages.yml
Outdated
@@ -1244,6 +1244,16 @@ Emacs Lisp: | |||
codemirror_mode: commonlisp | |||
codemirror_mime_type: text/x-common-lisp | |||
language_id: 102 | |||
Email: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't EML be a better name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Email" is more human readable and won't be confused/conflict with other potential languages (https://github.com/NCEAS/eml, http://xml.coverpages.org/eml.html), but it may not matter.
Done. I actually tried changing the grammar to https://github.com/mariozaizar/language-eml, but it has the following error:
|
@wesinator Why did you need to change it? Did you remove the other one before? |
@pchaigno I don't need to change it, language-eml just looks more active and has other file extensions |
I see. Could you try following these instructions: https://github.com/github/linguist/blob/master/CONTRIBUTING.md#changing-the-source-of-a-syntax-highlighting-grammar? |
@pchaigno Yes, I did that and got the error in #4201 (comment) |
@wesinator It works for me on your pull request. Are you sure you used the right command ( |
Yes, the grammar has the same error Edit: interesting, it outputs |
Hm. Maybe I don't have the same error because I pulled the submodules. Could you either download the submodules ( |
It works when I run with submodules, but it also removes some unrelated grammars from grammars.yml and vendor/README.md, breaking the build. Why would it be messing with other grammars ? EDIT: manually removing and adding the new grammar without |
lib/linguist/languages.yml
Outdated
- ".eml" | ||
- ".mbox" | ||
- ".mbx" | ||
- ".msg" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a search query to your original post for each new extension. We need to check that they are popular enough as EML extensions on GitHub and that we won't risk miss-classifying other languages that use those extensions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pchaigno done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like .msg
and .mbx
have a lot of non-EML files that would be mis-classified:
- https://github.com/search?q=NOT+reply-to+extension%3Amsg
- https://github.com/search?q=NOT+from+extension%3Ambx
Where did you find these extensions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again they're defined in the grammar.
This pull request is on hold right now because of a serious-enough issue with the grammar (cf. mariozaizar/language-eml#15). @wesinator Do you know another grammar we could use? |
@pchaigno could revert back to https://github.com/mariozaizar/eml-tmLanguage (8c539e9), but that might have the same issue. |
@wesinator Did you test it with Lightshow? |
@pchaigno I just did - it does not have issue mariozaizar/language-eml#15, but it also does not have the HTML highlighting feature that language-eml does. |
You might want to post that information in mariozaizar/language-eml#15 to help others debug the issue. |
The issue with the See my response in @pchaigno's issue for details. |
@wesinator Could you update your branch with the latest version of the grammar? |
@lildude Do you know how to fix the following error?
|
@pchaigno I ran |
@wesinator Looks like you know more about Linguist than I do 😄 All good then! |
I had to look at https://github.com/github/licensed#usage It did seem to duplicate the license text |
Oh right, I missed that. |
I believe this is caused by running an old version of Licensed or Licensee. Running |
(you might need to merge master into your fork too) |
Description
Adds email header language support
Checklist:
https://github.com/search?q=reply-to+extension%3Aeml
https://github.com/search?q=reply-to+extension%3Amsg
https://github.com/search?q=reply-to+extension%3Ambox
https://github.com/search?q=from+extension%3Ambx