julia-emacs icon indicating copy to clipboard operation
julia-emacs copied to clipboard

Unicode substitution broken with helm

Open non-Jedi opened this issue 6 months ago • 2 comments

@giordano reports:

Yes, "\alph" for me is completed to "\alpha", not "α", further pressing M-C-i does nothing. Not sure it's relevant, but I use Helm. I also have auto-complete installed, but doesn't seem the mode is active in my julia buffer.

Locally, I've confirmed that with only julia-mode installed, C-M-i correctly completes "\alph" to "α". If helm is installed with the following minimal config, C-M-i completes "\alph" to "\alpha":

(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
(package-initialize)

(package-install 'julia-mode)

(package-install 'helm)
(helm-mode 1)

This seems like a re-occurrence of https://github.com/emacs-helm/helm/issues/2356, but more investigation is needed.

non-Jedi avatar Jan 25 '24 13:01 non-Jedi

Ran the snippet from https://github.com/emacs-helm/helm/issues/2356, and this issue is not the same as https://github.com/emacs-helm/helm/issues/2356; :exit-function is properly called with 'finished. Will need to do some more digging to figure out what's going on here.

non-Jedi avatar Jan 25 '24 14:01 non-Jedi

Workaround until this issue is resolved is to manually call expand-abbrev (C-x ' in default emacs keybindings) after completing a latex symbol or enable abbrev-mode.

non-Jedi avatar Jan 25 '24 14:01 non-Jedi

For anyone else running into this, another solution is just to revert to the version of julia-emacs before all the completion changes from the PR https://github.com/JuliaEditorSupport/julia-emacs/pull/185 were introduced. I use commit 7aafa8e which also fixes https://github.com/JuliaEditorSupport/julia-emacs/issues/188

MasonProtter avatar Feb 29 '24 10:02 MasonProtter

https://github.com/JuliaEditorSupport/julia-emacs/pull/196 appears to fix it too

MasonProtter avatar Feb 29 '24 11:02 MasonProtter

Reopening per https://github.com/JuliaEditorSupport/julia-emacs/pull/206#issuecomment-2003889106

non-Jedi avatar Mar 18 '24 14:03 non-Jedi

So the current issue is that \alph<TAB> calls :exit-function with 'finished whereas \alpha<TAB> calls :exit-function with 'exact. According to the docstring for completion-extra-properties, this is a helm bug since the text may not "be further completed". This bug, unlike the one fixed in #206 is a similar but more specific version of https://github.com/emacs-helm/helm/issues/2356.

non-Jedi avatar Mar 18 '24 14:03 non-Jedi

Thierry fixed things on the helm side (https://github.com/emacs-helm/helm/issues/2646). Could you please check again that the issue is fixed for you with latest master of helm @giordano?

non-Jedi avatar Mar 28 '24 15:03 non-Jedi