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

Completion not substituting characters anymore #124

Closed
nlw0 opened this issue Jun 9, 2023 · 6 comments
Closed

Completion not substituting characters anymore #124

nlw0 opened this issue Jun 9, 2023 · 6 comments

Comments

@nlw0
Copy link

nlw0 commented Jun 9, 2023

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
Copy link
Owner

gcv commented Jun 9, 2023

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
Copy link
Author

nlw0 commented Jun 9, 2023

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
Copy link

dojt commented Jun 24, 2023

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
Copy link

dojt commented Jun 24, 2023

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

  • With package-list-packages
    • Uninstall julia-mode (make sure to uninstall the packages requiring it, e.g., julia-snail, so that julia-mode disappears from "installed"/"dependency")
    • Install the old version 0.4 of julia-mode
  • In ~/.emacs.d/elpa/julia-mode-0.4, edit the file julia-mode.el to fix the bug in the function julia-last-open-block-pos:
    • All appearances of the variable count inside the defun should really be cl-count
  • Compile the file with byte-compile-file
  • Restart emacs, install julia-snail again, get to actual work 😊😊.

@danmrc
Copy link

danmrc commented Jun 25, 2023

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

@nlw0
Copy link
Author

nlw0 commented Jul 5, 2023

Hi guys. Thanks so much for the info, now it's clear to me this is about julia-mode, and probably related to JuliaEditorSupport/julia-emacs#185 and maybe JuliaEditorSupport/julia-emacs#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!

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

No branches or pull requests

4 participants