2

What happened?

This is a problem that I was never able to solve and I always try to switch on another editor when I am coding on my remote machine.

However, I think that I solution should be somewhere for this kind of problem and that I am the only one that is finding this problem.

MY doom configuration with emacs 29.1 on my host machine

enter image description here

but the same configuration on the same file in a ssh session shows the following error

enter image description here

What did you expect to happen?

I think the two configurations should be shown the same. I also try to use export TERM='xterm-256color' or export TERM='xterm' but this do not work for me.

I was also thinking of using TRAMP but this is not working very well for me.

3
  • 1
    Does this happen when using emacs instead of emacsclient? If so, please remove your [emacsclient] tag.
    – shynur
    Commented Oct 5, 2023 at 12:19
  • I do not understand what the "error" you mentioned is, can you explain ? Also in the bottom image, i.e. on the remote machine, clangd appears not to be installed, make sure it is properly installed. Do you use tree-sitter ? Commented Oct 10, 2023 at 11:29
  • @TristanRiehs the same configuration has different colors on ssh Commented Oct 10, 2023 at 13:32

1 Answer 1

3

I discussed the problem on the emacs mailing list [1]

The problem was that my theme assumes 24-bit color, and my remote machine is not advertising that capability. So I followed the emacs docs https://www.gnu.org/software/emacs/manual/html_node/efaq/Colors-on-a-TTY.html and ran the following commands to solve my problem

$ cat terminfo-custom.src

xterm-emacs|xterm with 24-bit direct color mode for Emacs,
  use=xterm-256color,
  setb24=\E[48\:2\:\:%p1%{65536}%/%d\:%p1%{256}%/%{255}%&\
     %d\:%p1%{255}%&%dm,
  setf24=\E[38\:2\:\:%p1%{65536}%/%d\:%p1%{256}%/%{255}%&\
     %d\:%p1%{255}%&%dm,

$ tic -x -o ~/.terminfo terminfo-custom.src

[1] https://lists.gnu.org/archive/html/help-gnu-emacs/2023-10/msg00021.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.