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#49932: 28.0.50; Error in GUI frames when xterm-set-window-title is set Date: Mon, 09 Aug 2021 15:43:37 +0200 Message-ID: <87wnou3f92.fsf@gnus.org> References: <87im0h0xgh.fsf@dell.mail-host-address-is-not-set> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37114"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 49932@debbugs.gnu.org To: Knut Anders Hatlen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Aug 09 15:44:10 2021 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 1mD5Za-0009TT-1Y for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 09 Aug 2021 15:44:10 +0200 Original-Received: from localhost ([::1]:54358 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mD5ZZ-0007vh-1J for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 09 Aug 2021 09:44:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56736) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mD5ZS-0007vF-HP for bug-gnu-emacs@gnu.org; Mon, 09 Aug 2021 09:44:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44832) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mD5ZS-0007g4-Ah for bug-gnu-emacs@gnu.org; Mon, 09 Aug 2021 09:44:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mD5ZS-00044G-2n for bug-gnu-emacs@gnu.org; Mon, 09 Aug 2021 09:44:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 09 Aug 2021 13:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49932 X-GNU-PR-Package: emacs Original-Received: via spool by 49932-submit@debbugs.gnu.org id=B49932.162851663315601 (code B ref 49932); Mon, 09 Aug 2021 13:44:02 +0000 Original-Received: (at 49932) by debbugs.gnu.org; 9 Aug 2021 13:43:53 +0000 Original-Received: from localhost ([127.0.0.1]:56376 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mD5ZH-00043Y-Se for submit@debbugs.gnu.org; Mon, 09 Aug 2021 09:43:53 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:37636) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mD5ZC-00043B-LQ for 49932@debbugs.gnu.org; Mon, 09 Aug 2021 09:43:51 -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=cI2DisH3o7giTIZuz0pglPyPVvJT496Y2kDj5TX2cWY=; b=arydSnw9F0rJYjES0TdAji7O9e pEg46Akp7cqvj0JJ6Xpuos8FL8p6tvjyZ5k0dUYqkD3yyI+nFGLk+YyrzbMJ1eTFQdQVS12Rrsj8A YlkUQH6l568BuXg0FMZscNg0e29Bwn7NYDMa7r4D3fUYTSPrPR3MhCAxQQcXx1kXCvlQ=; Original-Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mD5Z3-0005mH-Lf; Mon, 09 Aug 2021 15:43:40 +0200 In-Reply-To: <87im0h0xgh.fsf@dell.mail-host-address-is-not-set> (Knut Anders Hatlen's message of "Sat, 07 Aug 2021 23:14:06 +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:211443 Archived-At: Knut Anders Hatlen writes: > 5. Start a new GUI frame with 'emacsclient -c', and again observe that > "Device 1 is not a termcap terminal device" is reported. > > I believe xterm-set-window-title should not affect GUI frames. The problem seems to be: (defun xterm-set-window-title (&optional terminal) "Set the window title of the Xterm TERMINAL. The title is constructed from `frame-title-format'." (send-string-to-terminal (format "\e]2;%s\a" (format-mode-line frame-title-format)) terminal)) Debugger entered: nil xterm-set-window-title() xterm--init-frame-title() xterm--init() terminal-init-xterm() tty-run-terminal-initialization(# nil t) tty-create-frame-with-faces(((client . #>) (environment "_=./$ #f(compiled-function (params) #)(((client . #) ((client . #$ frame-creation-function(((client . #>) (environment "_=./li That is, it's not specifying what terminal to set the title in -- so it's set in all terminals, no matter what, all the time? That is: (add-hook 'post-command-hook 'xterm-set-window-title) (add-hook 'minibuffer-exit-hook 'xterm-set-window-title)) Which just seems less than optimal in many ways -- running this from post-command-hook seems pretty excessive? But... Anyway, I've now just made the function not do anything on graphical displays, which should make the problem go away, but perhaps this should be implemented a different way? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no