tags 29716 + patch quit semente writes: > On gnome-terminal 3.22.2 (Debian Stretch), for some reason, Emacs is > setting the background-mode to light when I'm running a dark > background. On xterm or ttys it works fine. > $ printf '\e[>0c' > 1;4601;0c > > $ printf '\e]11;?\e\' > 11;rgb:2323/2727/2929 > > $ echo $TERM > xterm-256color I think the attached should do the trick then. There are two other xterm features that Emacs tries to use based on version number; I'm not sure how to test if your version of gnome-terminal supports them or not though (so I played it safe in the patch and use the query background feature only). (defun xterm--version-handler () ... ;; If version is 216 (the version when modifyOtherKeys was ;; introduced) or higher, initialize the ;; modifyOtherKeys support. (when (>= version 216) (xterm--init-modify-other-keys)) ;; In version 203 support for accessing the X selection was ;; added. Hterm reports itself as version 256 and supports it ;; as well. gnome-terminal doesn't and is excluded by this ;; test. (when (>= version 203) ;; Most xterms seem to have it disabled by default, and if it's ;; disabled, C-y will incur a timeout, so we only use it if the user ;; explicitly requests it. ;;(xterm--init-activate-get-selection) (xterm--init-activate-set-selection))...)