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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

julia-mode.el: Use the tex input mode #8947

Closed
Wilfred opened this issue Nov 8, 2014 · 3 comments
Closed

julia-mode.el: Use the tex input mode #8947

Wilfred opened this issue Nov 8, 2014 · 3 comments
Labels
domain:unicode Related to unicode characters and encodings

Comments

@Wilfred
Copy link
Contributor

Wilfred commented Nov 8, 2014

A couple of kind elisp hackers were reviewing julia-mode.el, and pointed out that we could simply reuse TeX's input mode in elisp. This would save us needing to copy everything from the REPL's definitions.

(Sorry for opening all these tickets, I have fixes in the works for them!)

@JeffBezanson
Copy link
Sponsor Member

That would be great; don't worry, we appreciate it!

@stevengj
Copy link
Member

stevengj commented Nov 9, 2014

We already discussed this on the mailing list at some point.

Drawbacks of tex input mode:

  • The tex input mode does not use the same Unicode codepoints as the REPL (e.g. for \hbar), which could lead to inscrutable errors when going between the REPL and emacs.
  • Emacs tex input does not support exactly the same set of LaTeX macros as the REPL—it looks like emacs supports many fewer macros (e.g. \mscrS for 𝒮 from the unicode-math package is not supported by tex input).
  • It is nicer to have identical tab-completion TeX-input behavior for different Julia environments (REPL, IJulia, Emacs, vim, ...).
  • Switching to/from tex input mode is a lot more keystrokes than just hitting tab. (And having the TeX input method turned on all the time is intrusive and annoying whenever you type a backslash...bordering on unusable since \ is a common operator in Julia code.)

Copying the definitions from the REPL to julia-mode.el is pretty painless because it is automated by a script.

@stevengj stevengj added the domain:unicode Related to unicode characters and encodings label Nov 9, 2014
@Wilfred
Copy link
Contributor Author

Wilfred commented Nov 16, 2014

OK, I'm pretty persuaded by the reasons there. I'll add a comment to julia-mode.el to explain this reasoning.

stevengj added a commit that referenced this issue Nov 17, 2014
waTeim pushed a commit to waTeim/julia that referenced this issue Nov 23, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:unicode Related to unicode characters and encodings
Projects
None yet
Development

No branches or pull requests

3 participants