syl20bnr / spacemacs

A community-driven Emacs distribution - The best editor is neither Emacs nor Vim, it's Emacs *and* Vim!
http://spacemacs.org
GNU General Public License v3.0
23.64k stars 4.89k forks source link

latex layer overwrite SPC f f helm open file shortcut #16534

Open arnome-uBe opened 2 weeks ago

arnome-uBe commented 2 weeks ago

Hi,

after last update, when I set the latex layer, the shortcut SPC f f for open file is unavailable anymore and a error occur :

helm/:config: Symbol’s chain of function indirections contains a loop: ConTeXt-mode

It's not the only shortcut leads to this error but it's the first I try and it's a major one.

After some research, I try to uninstall AUCtex package manually but it doesn't work. Apparently, the error occur after the rewriting of some major mode names by AUCtex package : full announcement here.

My OS is GNU/Linux Debian 12 and my version of emacs is 29.4. Spacemacs is in up-to-date develop branch.

My knowledge of spacemacs is not sufficient to go further, I'm a beginner despite I'm an enthusiasm.

Thank's for all this great works,

arnome.

fnussbaum commented 2 weeks ago

I try to uninstall AUCtex package manually but it doesn't work

Did uninstalling the package fail? Or did uninstalling and reinstalling not solve the problem?

In the former case you could try to remove the latex layer from dotspacemacs-configuration-layers in your .spacemacs file, restart, and add it back. (I assume the value of dotspacemacs-install-packages is the default, used-only). Or just try deleting the auctex directory in ~/.emacs.d/elpa/ and restarting.

From the mailing list discussion it seems that this is probably not a bug in Spacemacs (it also works fine for me), but rather a problem with the auctex upgrade.

arnome-uBe commented 2 weeks ago

Hi, thanks @fnussbaum, uninstall AUCtex works but I can't find a way to reinstall in spacemacs way without layer mode. I already try to remove latex layer and set again in dotspacemacs-configuration-layers several times but it doesn't works. I know that's not properly a spacemacs bug, it's more a bug of latex layer who include the buggy AUCTex package but I don't how to fix it.

arnome-uBe commented 2 weeks ago

Or just try deleting the auctex directory in ~/.emacs.d/elpa/ and restarting.

I just try this suggestion but it does not work eather

arnome

arnome-uBe commented 2 weeks ago

After a last try, it's working now, I make a change in the latex layer and set xetex as engine. Here is the change I make :

non working configuration

 dotspacemacs-configuration-layers
   '(
     ...
     bibtex
     helm
     (latex :variables
            latex-build-command "LatexMk")
     lsp
     ...)

working configuration

 dotspacemacs-configuration-layers
   '(
     ...
     bibtex
     helm
     (latex :variables
            latex-build-command "LatexMk"
            latex-build-engine 'xetex)
     lsp
     ...)

I was plan to use this engine anyway, so...

arnome-uBe commented 2 weeks ago

Hi, unfortunately, I close this issue too soon... After last start of (spac)emacs, the troubleshooting is still there. Don't known what to do Any ideas are welcome arnome

fnussbaum commented 2 weeks ago

Sorry I don't have a really good idea, and I cannot reproduce the problem on my system. I would suggest to try deleting all *.elc files from the auctex folder and restarting, to check whether it is a problem with byte-compilation. You should compile them again later though (or reinstall) to improve performance.

smile13241324 commented 5 days ago

Hmmm this looks like a lot of work, the auctex package did change the naming of most modes and I am afraid that the layer is now calling a mixture of build-in modes and auctex modes.

I need to take a deeper look into the latex layer to resolve this.

smile13241324 commented 5 days ago

As to your specific error @arnome-uBe we should rollout any issues from byte compilation therefore I would ask you to remove your elpa folder and reinstall all the packages and restart Spacemacs.

If this solves your issue then it was a compile issue if not it may come from the layer or the packages within it.

Btw: if you have the time you could also switch to LSP and see if the error persists. I would be very interested in the results of all three tests to be honest :).

arnome-uBe commented 5 days ago

As to your specific error @arnome-uBe we should rollout any issues from byte compilation therefore I would ask you to remove your elpa folder and reinstall all the packages and restart Spacemacs.

If this solves your issue then it was a compile issue if not it may come from the layer or the packages within it.

Btw: if you have the time you could also switch to LSP and see if the error persists. I would be very interested in the results of all three tests to be honest :).

ok, I take the time to do that probably next week. But I don't know what LSP stand for. Can you explain what you expected ? Thanks arnome

smile13241324 commented 5 days ago

Hi @arnome-uBe

lsp is a protocol used to connect external dev servers to your ide this is the defacto standard today for ides.

In Spacemacs there is the lsp layer available for this which will provide the details to use lsp servers for other layers like the latex layer.

In your case auctex is the old Emacs package which was doing latex processing before by switching to lsp you can eliminate this source of errors.

Anyway I am going to adjust the layer anyway so you don't have to try out lsp if you are not needing it.