Fork me on GitHub
#emacs
<
2020-08-03
>
borkdude11:08:22

I have this in my prelude personal/init.el but it doesn't work in my terminal emacs:

(set-background-color "grey15")
(set-face-attribute 'region nil :background "#666")
(print "Hello from personal/init.el")
The message gets printed, however the background color isn't changed. It does work with the GUI emacs. It also works when I manually evaluate it in the terminal emacs. What's up...

Kevin11:08:15

Works for me. Which OS / Terminal / Emacs version? I'm running Linux Pop_OS!, Emacs 26.3, Terminator

borkdude11:08:07

Why are you running Pop_OS!, are you using a System76 laptop?

Kevin11:08:17

I have a mini desktop and a System76 laptop. Wanted to try something new (after having used Fedora for a long time). Decided to give it a try and was really happy with it. It's a bit less strict regarding packages than Fedora which is nice. They also have a lot of Flatpak packages in the store (instead of installing everything through deb, I like having "apps" isolated from system dependencies). Based on Ubuntu so that's quite stable. Has a lot of support for the gaming market which is plus for me.

Kevin11:08:28

But I don't know what the packaging state is of Ubuntu. Might not be worth switching if you're already using that

Kevin11:08:17

System76 also puts a lot of work into improving Gnome3 which is just nice overal (battery life, tiling system, high resolution display support)

borkdude11:08:42

Thanks for sharing

Kevin11:08:49

Or does it work if you evaluate it inline?

Kevin11:08:41

Ah yeah, it doesn't work when it's loaded during initialization

borkdude11:08:43

OS: Ubuntu 20.04 in WSL2, Emacs 26.3, terminal http://iTerm2.app in macOS

Kevin11:08:41

Try this instead: (set-face-background 'default "grey15")

Kevin11:08:28

Unless you're changing the region somewhere else (or loading a theme, but probably not) the region line should work

borkdude11:08:54

thanks a lot

👍 3
borkdude15:08:27

Is it possible to get these kind of visual hints when you change something git-related on the side in a terminal emacs?

Kevin15:08:58

I don't think so. Since the fringe is only supported in GUI Emacs

Kevin15:08:46

There is a non fringe version

☝️ 3
Kevin15:08:44

Just wondering, why don't you use the GUI version?

borkdude15:08:48

So just git-gutter I should install?

Kevin15:08:16

Yeah, without the fringe. Not sure what the + is

borkdude15:08:21

Because I'm working on a remote system (well, just a PC in my room, but I don't have a keyboard attached to it).

Kevin15:08:35

SSH? and you have Emacs installed there?

Kevin15:08:58

I thought I remembered you mentioning using TRAMP some time ago. So I assume you've looked into that 🙂

Kevin15:08:35

Which I guess isn't an option for some reason?

borkdude15:08:16

I'm using tramp, but this was slow with magit-status. Also I got strange hangups in dired.

borkdude15:08:28

So now I'm trying this

borkdude15:08:42

Another option is working in the RDP session

borkdude15:08:49

just figuring it out still

borkdude15:08:44

git-gutter seems to work btw

Kevin15:08:06

Haven't used tramp in a while myself. But a couple of jobs back we had a lot of remote servers, and I used tramp for that (including Magit). Worked quite well

Kevin15:08:22

I do remember having to tweak my settings to make it work fast though

borkdude15:08:37

if you remember those tweaks, feel free to share. one benefit of working over ssh is that I can access all the machines in the same way

Kevin15:08:20

I don't really see anything specific that should fix the issue though 😕

Kevin15:08:59

Maybe setting tramp-completion-reread-directory-timeout to nil, possibly

Kevin15:08:15

Although I think that was more Helm related

borkdude15:08:17

Maybe it's just WSL2 that's being weird. Btw, I also had to tweak my login shell scripts to make tramp work, since it didn't understand the output from zsh

borkdude15:08:29

Maybe the dired problem is related to that

Kevin15:08:41

I think I disabled zsh because I couldn't get it to work but idk. 'twas a while ago

borkdude15:08:30

What I do in the zsh script is when TERMINAL is set to dumb, I just execute bash

borkdude15:08:38

This fixed most of the stuff

borkdude16:08:42

oh yes, one other thing with tramp was that flycheck clj-kondo did work, but of course it doesn't resolve the right config. it's a bit complex

borkdude16:08:00

And emacs on Windows just doesn't look so good

borkdude16:08:14

also not via the X server, or maybe it's just something I need to get used to