Skip to content

Load latexsub table as a feature #93

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

Merged

Conversation

non-Jedi
Copy link
Contributor

@non-Jedi non-Jedi commented Dec 3, 2019

Fixes #91. Alternative to #92.

Variable renamed from julia-latexsubs to julia-mode-latexsubs as incremental improvement towards melpa guidelines.

@tpapp
Copy link
Collaborator

tpapp commented Dec 3, 2019

I think this may be the cleanest solution, favoring this over #92.

@tpapp tpapp mentioned this pull request Dec 3, 2019
@tpapp
Copy link
Collaborator

tpapp commented Dec 3, 2019

My preliminary exploration suggests that this should work fine with

  1. MELPA, simply including all the .el files like now, without an extra recipe,

  2. the Emacs package loading mechanism, which puts package directories in load-path so it should always fine the relevant file.

I will keep testing this, comments and reviews are welcome.

@nverno
Copy link
Contributor

nverno commented Dec 4, 2019

@non-Jedi If you are still considering going the abbrev route for latex substitutions, I forgot to mention I have been doing similar in my personal configs, although I believe the generating script to produce the abbrev table from the unicode generating script is out-of-date.

If your interested, the relevant script to generate the abbrev table is at latex_abbrevs.jl which should produce a unicode-latex-abbrev-table.

I'm also a bit obsessive about abbrevs, so there are lot of various abbrev hacks in there. A really nice feature that comes with have a unicode latex substitution table, is the ability to use it in any other mode. The method I found the most useful and least intrusive (only minimally effecting the other active abbrev tables by giving them precedence, and being easily disable/enabled on the fly) was have an interactive function to add an additional abbrev table to the current buffer by adding it as the parent of the local-abbrev-table. Adding the unicode expansions on the fly is nice if you know when they'll be useful or annoying. This is the function I'm referring, and is quite simple. Sadly, I have a couple personal functions worked in there that could be annoying to deal with.

One think I always found annoying was when modes defined abbrev tables without customizable options in mode hooks. This seems to have fallen out of fashion recently though.

Copy link
Collaborator

@tpapp tpapp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

neat work, thanks!

@tpapp tpapp merged commit d21b83d into JuliaEditorSupport:master Dec 7, 2019
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.

Looks for julia-latexsubs in directory of file in current buffer
3 participants