Closed nesteiner closed 2 years ago
How large is the julia-snail.elc
byte-compiled file? Sometimes the byte compiler does not compile the whole file. If it’s only a few hundred bytes, delete it, make sure vterm is fully loaded (M-x vterm
), and recompile julia-snail.el
.
still not work,
does that work on your system ?
Is init-julia.el
the file with your use-package
forms? Please post the size of your julia-snail.el*
files. Let’s first make sure the Snail installation is not broken.
That's still an init-julia.el
file. I'm asking for ls -la
output of your Snail installation directory, not your configuration code.
here you are ![Uploading 2022-02-01 01-49-46 的屏幕截图.png…]()
There's nothing attached to your message.
That's the installation directory. I want to see the files inside it, specifically the julia-snail.elc
file.
Your installation looks good.
Can you post the values of julia-mode-hook
both when you do and do not have the byte-compiled init-julia
file available? I want to understand if the byte compiler is messing something up for your configuration file.
both hook are the same like this, maybe it the problem of my configuration code ?
holy shit, this code works !
(use-package julia-mode
:hook (julia-mode . julia-snail-mode)
:config
(setq julia-repl-switches nil
julia-snail-extra-args nil
julia-indent-offset 2)
:commands julia-snail-mode)
I think I have took you too much time
Very interesting. You're the second person to report this problem and this exact workaround (see #70). For completeness and so I can look into this later, what version of Emacs are you using? What OS? Do you have native compilation enabled?
maybe we are not so familiar with emacs-lisp, I think the major mode once loaded, so that its hook can be called.
What we don't understand is use-package
. I managed to reproduce the problem you reported. Remove :requires vterm
from your original example, and it should work.
It looks like this bug occurs because of :requires
: https://github.com/jwiegley/use-package#prevent-loading-if-dependencies-are-missing — so if your (use-package vterm)
form is not evaluated first, even if the vterm package is installed, julia-snail is not loaded. It looks like your case and #70 both happened because of this.
I'll update the Snail README and remove :requires vterm
and see if that causes a separate set of problems.
@gcv hey I think I found the problem, using this code
(use-package julia-snail
:ensure t
:after julia-mode
:requires vterm
:config
(setq-default julia-snail-extra-args "--sysimage /home/steiner/.julia-images/julia-dev.so")
(setq julia-snail-executable "/usr/local/bin/julia"))
and I found that when load julia file, watching the local varibale and the julia-snail-extra-args
is nil, so I think this code is not loaded at all
how about trying this code, and check the local buffer variable, you will find out
You need to remove requires :vterm
from there. I discovered this upthread: https://github.com/gcv/julia-snail/issues/75#issuecomment-1026930872
maybe is the problem of my program ability on
emacs-lisp
, when I type this code,julia-snail
can't autoload when loading a julia fileI remember that it was ok, after i use byte compile emacs-lisp file, it does not work since then