Closed just-walk closed 4 months ago
I'm not sure it's a bug, but I've definitely found use-package semantics unintuitive before. Try checking the value of julia-mode-hook
using M-: or eval-expression
.
Output from the first:
(toggle-input-method julia-snail-mode)
Output from the second:
(toggle-input-method julia-snail)
So, it seems to me that it is a bug with use-package because the documentation states that the second form assumes that the hook you're adding is the package name with -mode
appended, julia-snail-mode
in this case. But that clearly isn't happening.
Yes, it certainly looks like use-package strangeness.
Closing since there is nothing to do on the Snail side.
In trying to get julia-snail to conveniently format files on save, I've been messing with my configuration and found this issue. When adding
julia-snail-mode
to thejulia-mode
hook, different forms of the use-package syntax that should have "equivalent" behavior are in fact different. (https://www.gnu.org/software/emacs/manual/html_mono/use-package.html#Hooks)The common config portion:
This first does what I would expect it to do: it enables
julia-snail-mode
in a.jl
buffer. If I I want a REPL, then I can useC-c C-z
.:This second form shortens the hook declaration. In this case, when I open a buffer, it also automatically opens the REPL in a separate buffer, switching to it. The REPL buffer ignores the
.dir-locals.el
julia-mode
configuration, and the original buffer hasjulia-mode
enabled but notjulia-snail-mode
.What's going on? Is this a bug in use-package?