Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add OCaml Tuareg mode to exceptions #12

Closed
wants to merge 1 commit into from
Closed

Add OCaml Tuareg mode to exceptions #12

wants to merge 1 commit into from

Conversation

leafac
Copy link

@leafac leafac commented Dec 14, 2015

OCaml comments read as (* Some comment *). But the *)
translates to 馃槈, which is not intended.

OCaml comments read as `(* Some comment *)`. But the `*)`
translates to 馃槈, which is not intended.
@ryanprior
Copy link

This patch is a good use case for enabling or disabling emojification per mode and emoji type. Am I right to assume that OCaml Tuareg mode would be fine rendering fenced and Unicode emojis?

@leafac
Copy link
Author

leafac commented Dec 14, 2015

@ryanprior First, thanks for the incredibly quick feedback.

I guess you're right. I see no reason why Tuareg mode would not be fine rendering fenced and Unicode emojis. So I'm going to change this PR to disable emojification only for Tuareg mode and the *) type emoji.

@leafac
Copy link
Author

leafac commented Dec 14, 2015

@ryanprior I couldn't immediately find an obvious way of achieving that. I'm going to be busy for the rest of the day, so this is going to have to wait until tomorrow.

@iqbalansari
Copy link
Owner

@leafac First of all, sorry for any inconvenience caused by this and thanks for the patch.

Actually emojify by default displays emojis only in comments and strings in programming modes, so this should have not happened. The issues is that to check if the current major-mode is a programming mode, emojify uses (derived-mode-p 'prog-mode). The expression returns nil for tuareg since it is in fact derived from tuareg--prog-mode.

So a better fix would be to teach emojify about tuareg--prog-mode. I have pushed a (temporary) fix to develop, will merge with master once the tests pass. I call the fix temporary since although this fixes the issue at hand, I think emojify needs a better check for programming modes.

@ryanprior

This patch is a good use case for enabling or disabling emojification per mode and emoji type

I think you have a point (although it would not have helped in present issue). I have opened #13 to track this.

@leafac
Copy link
Author

leafac commented Dec 14, 2015

@iqbalansari Thanks for the lighting fast fix! And thanks for teaching me about the internals of emojify. I'm going to go ahead and close this PR.

@leafac leafac closed this Dec 14, 2015
@leafac leafac deleted the patch-1 branch December 14, 2015 19:20
@leafac
Copy link
Author

leafac commented Dec 15, 2015

I updated to the latest version of emojify, including 3b9a4bc, and can confirm the issue has been fixed.

Thanks!

@iqbalansari
Copy link
Owner

Great! Thanks for confirming 馃槃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants