From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#32921: emacsclient obeys Xresources even when launched with -nw Date: Wed, 18 May 2022 16:27:56 +0300 Message-ID: <834k1nezs3.fsf@gnu.org> References: <87o7zvc8xi.fsf@gnus.org> <835ym3f0xt.fsf@gnu.org> <875ym3c7bj.fsf@gnus.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5251"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 32921@debbugs.gnu.org, jimis@gmx.net To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed May 18 15:29:12 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 1nrJjk-00016f-5o for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 18 May 2022 15:29:12 +0200 Original-Received: from localhost ([::1]:45994 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nrJji-0007VJ-QY for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 18 May 2022 09:29:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35900) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nrJja-0007Uw-Ph for bug-gnu-emacs@gnu.org; Wed, 18 May 2022 09:29:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37314) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nrJja-0001rM-4m for bug-gnu-emacs@gnu.org; Wed, 18 May 2022 09:29:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nrJja-0004EG-0s for bug-gnu-emacs@gnu.org; Wed, 18 May 2022 09:29:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 18 May 2022 13:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32921 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 32921-submit@debbugs.gnu.org id=B32921.165288050916212 (code B ref 32921); Wed, 18 May 2022 13:29:01 +0000 Original-Received: (at 32921) by debbugs.gnu.org; 18 May 2022 13:28:29 +0000 Original-Received: from localhost ([127.0.0.1]:59444 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nrJj2-0004DP-Sy for submit@debbugs.gnu.org; Wed, 18 May 2022 09:28:29 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:42520) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nrJj0-0004DC-I6 for 32921@debbugs.gnu.org; Wed, 18 May 2022 09:28:27 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:57838) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nrJig-0001nh-9b; Wed, 18 May 2022 09:28:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=HrNa2wMPiprjbt2NDk5nRCfez+Ay3IiYf/FQrTRPXvo=; b=KLwaKUobie2p wV3SDrf5I16J/wRQkVkdwvaS6O7awY6xqFAiOhayDRulqyK64+p5TViWGfUKZi4T+Au5fM3bD1g7u T0Poj2vUPmzdXI8C6kmMC6AY+kiOsIPcfjh7O0rQzboHBH5DvEelHdOp1Mf554jidLo8c5PZ8Tolp gYKdsaIcE4stdPDQTJuL5NJPhaxXlL9GDTBnDgsjDUUlV5HddmYwwQ+jlHyJprdh4j80BDNIjRgun Nf8KFeC+r+BURFGjGFjqx4KM0Ifko86hCnwDOSJQsJ74Aw92N+hg1/qxbc8PQ0EHV63+3HNoEnMeW QB8iTiXpAafoF24LH8ayfA==; Original-Received: from [87.69.77.57] (port=2544 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nrJid-0004cu-LB; Wed, 18 May 2022 09:28:05 -0400 In-Reply-To: <875ym3c7bj.fsf@gnus.org> (message from Lars Ingebrigtsen on Wed, 18 May 2022 15:13:20 +0200) 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:232565 Archived-At: > From: Lars Ingebrigtsen > Cc: jimis@gmx.net, 32921@debbugs.gnu.org > Date: Wed, 18 May 2022 15:13:20 +0200 > > Eli Zaretskii writes: > > > Which sequence of calls ends up calling x-handle-reverse-video, and > > what is the trigger for that sequence of calls? > > It's: > > Debugger entered: nil > x-handle-reverse-video(# ((vertical-scroll-bars) (height . 53) (width . 81) (reverse . t) (cursor-color . "red") (cursor-type . box) (mouse-color . "red") (horizontal-scroll-bars))) > x-create-frame-with-faces(((vertical-scroll-bars) (height . 53) (width . 81) (reverse . t) (cursor-color . "red") (cursor-type . box) (mouse-color . "red") (horizontal-scroll-bars))) > #f(compiled-function (params) #)(((vertical-scroll-bars) (height . 53) (width . 81) (reverse . t) (cursor-color . "red") (cursor-type . box) (mouse-color . "red") (horizontal-scroll-bars))) > apply(#f(compiled-function (params) #) ((vertical-scroll-bars) (height . 53) (width . 81) (reverse . t) (cursor-color . "red") (cursor-type . box) (mouse-color . "red") (horizontal-scroll-bars))) > frame-creation-function(((vertical-scroll-bars) (height . 53) (width . 81) (reverse . t) (cursor-color . "red") (cursor-type . box) (mouse-color . "red") (horizontal-scroll-bars))) > make-frame() So the difference is between (a) taking notice of the reverseVideo resource at startup timer as opposed to (b) at frame creation time, is that right? If so, I think this might affect the use case whereby someone changes the X resources after Emacs has already started, or something? > > (These kinds of changes in code that was there for decades give me the > > creeps.) > > Indeed. I tried to do some VC history spelunking for why we're > apparently checking reverseVideo redundantly in this way, but I came up > short. Maybe it would be safer to add a special frame-parameter which will record the fact that some parameters came from X resources, and will then refrain from applying those parameters to TTY frames? Or maybe we should have some other special construct in default-frame-alist that prevents some parameters from being applied to TTY frames? Because I think reverseVideo is just one example of such parameters. > It might not be redundant on Windows, which presumably doesn't call > these X functions, but does heed reverseVideo in the w32 version of > window-system-initialization. Yes, we emulate X resources using the Registry on MS-Windows (although I think this is largely unknown and unused).