-
-
Notifications
You must be signed in to change notification settings - Fork 62
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
Make julia-latexsub work if point in the middle of latex symbol. #70
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.
LGTM, it would be great to merge this.
Unless I made a mistake, this doesn't work well for me: the substitution happens only if my point is within the word, not when it's at the end (in other words, the only thing which doesn't work is what was working before!). Can you confirm? |
(interactive "*") | ||
(let ((orig-pt (point)) | ||
(word-end (progn (forward-word) | ||
(point)))) |
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.
The problem is here, it goes forward one character too much.
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 think this will make it work
(point)))) | |
(backward-char) | |
(point)))) |
I think I can make it work with the suggestion above (currently testing it in practice). But in general, I am a bit bothered by the fact that we don't have any unit tests for completion, so I will contribute some and in the meantime hold off on this PR. |
When #81 is merged, it should also be merged to this branch, and then some tests can be added (or commented out). |
Superseded by #185 |
This pull request fixes two minor issues I had:
invoke-command
machinery was calling the zero-argument functionjulia-latexsub
with a nil argument. Removing thei
in the argument specifier string fixed this (might be a Spacemacs issue, not a julia-mode issue).The second change seems relatively innocuous, the first might break things that invoke
julia-latexsub
in ways that Spacemacs doesn't, i.e. with an argument (although it hasn't broken anything for me)