From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#32921: emacsclient obeys Xresources even when launched with -nw Date: Wed, 18 May 2022 14:38:33 +0200 Message-ID: <87o7zvc8xi.fsf@gnus.org> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24208"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 32921@debbugs.gnu.org To: Dimitrios Apostolou Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed May 18 14:39:46 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nrIxu-00069o-A5 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 18 May 2022 14:39:46 +0200 Original-Received: from localhost ([::1]:38412 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nrIxt-0003DL-5M for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 18 May 2022 08:39:45 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52808) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nrIxC-0003Bz-CA for bug-gnu-emacs@gnu.org; Wed, 18 May 2022 08:39:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37182) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nrIxC-0000c4-0x for bug-gnu-emacs@gnu.org; Wed, 18 May 2022 08:39:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nrIxB-0004n0-NZ for bug-gnu-emacs@gnu.org; Wed, 18 May 2022 08:39:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 18 May 2022 12:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32921 X-GNU-PR-Package: emacs Original-Received: via spool by 32921-submit@debbugs.gnu.org id=B32921.165287752518372 (code B ref 32921); Wed, 18 May 2022 12:39:01 +0000 Original-Received: (at 32921) by debbugs.gnu.org; 18 May 2022 12:38:45 +0000 Original-Received: from localhost ([127.0.0.1]:59309 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nrIwv-0004mG-IH for submit@debbugs.gnu.org; Wed, 18 May 2022 08:38:45 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:39314) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nrIws-0004lw-VC for 32921@debbugs.gnu.org; Wed, 18 May 2022 08:38:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=+qXQNQaqWgdOYcVKgaVOuxii2ZY1xQDq+L/aTpR+glk=; b=tB23cGjb0wOcyUt4Cadb8Lr/G0 aKn0ZNxdzeHR7GTTAk+G+invogF7wZbAPEzrI0atDm1amOsJhVUfgZfZOmo5NX6K0BUZXjOF3yGJL CNk6sRSCWornkVGo6JRPFmAB7ej0ak5oLMz70Bk7DQtsf/Thd09qIGjh/3yQQish2sZU=; Original-Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nrIwk-0007G0-Eo; Wed, 18 May 2022 14:38:36 +0200 X-Now-Playing: Richard and Linda Thompson's _Hard Luck Stories (5): The Madness of Love: Live 1975 & 1977_: "A Bird In Gods Garden (Live At The Theatre Royal, London 01.05.1977)" In-Reply-To: (Dimitrios Apostolou's message of "Wed, 3 Oct 2018 19:49:31 +0200 (CEST)") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:232552 Archived-At: Dimitrios Apostolou writes: > I have set the Xresource *reverseVideo to true, and as expected emacs > reverses the colours when launched under X, and does not when launched > with -nw thus keeping the terminal colour selections. > > However emacsclient obeys the Xresources even when launched with > -nw. This leads to colour reversal in text mode, which is unwanted > since the xterm has already been configured as desired. (I'm going through old bug reports that unfortunately weren't resolved at the time.) This behaviour is still present in Emacs 29. This seems to be stemming from this: ;; Check the reverseVideo resource. (let ((case-fold-search t)) (let ((rv (x-get-resource "reverseVideo" "ReverseVideo"))) (if (and rv (string-match "^\\(true\\|yes\\|on\\)$" rv)) (setq default-frame-alist (cons '(reverse . t) default-frame-alist))))) in term/x-win.el -- it sets reverse for all new frames, so when the -nw frame appears, it also gets reverted (which isn't what we want, I think). If I just remove this, then everything still works fine (and the -nw client problem disappears), because: (defun x-handle-reverse-video (frame parameters) "Handle the reverse-video frame parameter and X resource. `x-create-frame' does not handle this one." (when (cdr (or (assq 'reverse parameters) (let ((resource (x-get-resource "reverseVideo" "ReverseVideo"))) So it's always handled anyway, and the default-frame-alist setting is just counter-productive, I think? Does anybody see any possible negative consequences of just removing that code from x-win.el? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no