gcv / julia-snail

An Emacs development environment for Julia
GNU General Public License v3.0
231 stars 21 forks source link

Completion not substituting characters anymore #124

Closed nlw0 closed 12 months ago

nlw0 commented 1 year ago

I've recently updated my emacs configuration, and completions are not working anymore for inputting symbols. For instance, if I type \blacksquare and TAB, it does not replace the symbol. Plus if I type \pi I only get completion-at-point saying it's not unique, but if I type TAB again it doesn't simply replace it with π. What's the proper way to set things up? I'm afraid perhaps it's a conflict with Helm? But it was working fine in the past.

gcv commented 1 year ago

I assume you're having trouble with source buffers, not the REPL? I'll a look in my own configuration later and see if anything broke, but this feature is handled by julia-mode, not Snail. Start by double-checking that it's properly enabled. Then check that it hasn't broken in any recent updates. If it's nothing obvious, then emacs -Q is your friend — turn on the bare minimum to test Julia and see if another package caused a conflict. Let me know what you find.

PS: What version of Emacs?

nlw0 commented 1 year ago

Yes, indeed, in the source buffer, the repl is fine. I thought this involved julia-snail, TIL! Thanks for the info, I'll investigate more later... It's emacs 27.2

dojt commented 1 year ago

I've recently updated [...] if I type \pi I only get completion-at-point saying it's not unique, but if I type TAB again it doesn't simply replace it with π.

Hi @nlw0, I have the same problem. Have you been able to resolve it? Or is there a thread at julia-emacs discussing it? (There seem to be several problems with completion that are discussed at julia-emacs, but I'm struggling with their Emacs-internals vernacular...)

dojt commented 1 year ago

In case anybody else finds him or herself in my / @nlw0's situation, here's what I did:

danmrc commented 1 year ago

I had the same problem. Adding (add-hook 'julia-mode-hook #'abbrev-mode) solved it. Now, substitution does not require you use tab.

nlw0 commented 12 months ago

Hi guys. Thanks so much for the info, now it's clear to me this is about julia-mode, and probably related to https://github.com/JuliaEditorSupport/julia-emacs/pull/185 and maybe https://github.com/JuliaEditorSupport/julia-emacs/issues/193

My understanding is that abbrev-mode allows me to type "\pi space" and that will complete, but what I'm really really looking for is that one TAB opens up completions, and in case it's not unique (as in \pi), a second TAB will replace it. Right now I type "TAB TAB TAB TAB" and it keeps saying "not unique not unique not unique". I still need to check out about version 0.4. The thing is that I have just moved to using straight-use-package, and finally fixed Helm, which was completely unrelated. Anyways, I'm closing this since it's unrelated. Thanks for the help!