From unknown Wed Sep 24 05:40:52 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#49932 <49932@debbugs.gnu.org> To: bug#49932 <49932@debbugs.gnu.org> Subject: Status: 28.0.50; Error in GUI frames when xterm-set-window-title is set Reply-To: bug#49932 <49932@debbugs.gnu.org> Date: Wed, 24 Sep 2025 12:40:52 +0000 retitle 49932 28.0.50; Error in GUI frames when xterm-set-window-title is s= et reassign 49932 emacs submitter 49932 Knut Anders Hatlen severity 49932 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 07 17:15:13 2021 Received: (at submit) by debbugs.gnu.org; 7 Aug 2021 21:15:13 +0000 Received: from localhost ([127.0.0.1]:53237 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mCTey-0000BU-Ny for submit@debbugs.gnu.org; Sat, 07 Aug 2021 17:15:13 -0400 Received: from lists.gnu.org ([209.51.188.17]:38966) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mCTew-0000BI-Hz for submit@debbugs.gnu.org; Sat, 07 Aug 2021 17:15:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40872) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mCTew-0006S4-C3 for bug-gnu-emacs@gnu.org; Sat, 07 Aug 2021 17:15:10 -0400 Received: from mail-lf1-x132.google.com ([2a00:1450:4864:20::132]:45619) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mCTeu-0002Sx-6V for bug-gnu-emacs@gnu.org; Sat, 07 Aug 2021 17:15:10 -0400 Received: by mail-lf1-x132.google.com with SMTP id g13so25526827lfj.12 for ; Sat, 07 Aug 2021 14:15:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=mW2aTFQhK74M02CYu96+7mvFcaO0z6HiR9xKiscPipE=; b=gaboshS72qwqdds1gUegHl3nOZABMy69cErjxPwLcgR9fpgco5tOsa5gLBxi/jctYo zDXqtFuUolwrUb93hw1i3Rg/zWnsux/rSoXb/3f5pschRpL5WxCnXt+6zDmT+LRltqWP 0xcWjd1nmWdgdE2NKaqO4OM9tjpWuMNBQIQs2IKpXQY7sbjhdZrUdG95DRu+ABDdmT5+ iwVSXCTS5a16ihcv12kMezbtbfXqVBnXqmHYeP6mvyKBWm2xHeOKxo0TmSWLaEAmijbz B6vvEtqrzoY+8/aFa+hwmlgaKu+JHZFkuq/fyJ483K4JFd9KzJP2n+VAxwTYx6VSaQbV kalQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=mW2aTFQhK74M02CYu96+7mvFcaO0z6HiR9xKiscPipE=; b=DYPTnmJZwtxBSsVWp6Jx95Ird+bOJwIFU+2Hl4qMvGMgGvT9dqgpVIYhia5/YMFEN4 tzHyaQLnDrSaayxy7TZN8JPvvqWdSasXqX4TgAkgupPfaQTOjj5NN7tRGPv2/04gVrY4 wbaxagzs8gkxTeC8mA0fAS90EpSgDtr5NKIRP6JI3/ktRPqQeTjgR5MWg5IYTIHBJf6N +MoDIqMIt897QhVygfsSCpLNegOUp71Y7dy6+m1IZs6XnIC1AfLkGMjcH1KSqeYwrBfd a7IpqQ/GApopf/O0NfZzy0QPc2RjpS8TzojMu3+f0s92PJOUG3pYBqPbd5aSC6JQpp3V NQAA== X-Gm-Message-State: AOAM53270lvK1sZPAmysD8gv4lOSx1hVEfdXJoQ+qVZVMirUhmYIKFxY fQ5PtjfxbQ3crOlhRR1/bq2O3yjtow== X-Google-Smtp-Source: ABdhPJxASdg5st5JXxLidyz4NRvush+9Oqfwq84cnQ6zGFOKsDnkL3AxsIUv4ppgNxihJWKRe/Kx/w== X-Received: by 2002:a19:f60c:: with SMTP id x12mr11736484lfe.262.1628370905742; Sat, 07 Aug 2021 14:15:05 -0700 (PDT) Received: from dell ([2a02:1660:692e:dd00::44c]) by smtp.gmail.com with ESMTPSA id 1sm1236953lfr.76.2021.08.07.14.15.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Aug 2021 14:15:05 -0700 (PDT) From: Knut Anders Hatlen To: bug-gnu-emacs@gnu.org Subject: 28.0.50; Error in GUI frames when xterm-set-window-title is set Date: Sat, 07 Aug 2021 23:14:06 +0200 Message-ID: <87im0h0xgh.fsf@dell.mail-host-address-is-not-set> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2a00:1450:4864:20::132; envelope-from=kahatlen@gmail.com; helo=mail-lf1-x132.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) 1. Start GUI Emacs with 'emacs -Q'. 2. Evaluate: (progn (setq xterm-set-window-title t) (server-start)) 3. In a terminal, run 'emacsclient -t'. 4. Switch to the GUI instance started in 1. Observe that the following error is raised: Error in post-command-hook (xterm-set-window-title): (error "Device 1 is not a termcap terminal device") 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. In GNU Emacs 28.0.50 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, cairo version 1.16.0) of 2021-08-07 built on dell Repository revision: adab672edb3fad0851a52e3b6ccf3ac31c80b025 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12011000 System Description: Debian GNU/Linux 11 (bullseye) Configured using: 'configure --with-native-compilation --with-json --with-xml2 'CFLAGS=-O2 -flto -march=native' LDFLAGS=-flto' Configured features: CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBSELINUX LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM GTK3 ZLIB Important settings: value of $LANG: nn_NO.UTF-8 value of $XMODIFIERS: @im=ibus locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs rfc822 mml mml-sec epa derived epg epg-config gnus-util rmail rmail-loaddefs auth-source eieio eieio-core eieio-loaddefs password-cache json map text-property-search time-date mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail comp comp-cstr warnings subr-x rx cl-seq cl-macs cl-extra help-mode seq cl-loaddefs cl-lib rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils term/xterm xterm byte-opt gv bytecomp byte-compile cconv server iso-transl tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit x multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 97323 10174) (symbols 48 8073 1) (strings 32 23185 1925) (string-bytes 1 785139) (vectors 16 17773) (vector-slots 8 349322 14036) (floats 8 44 33) (intervals 56 236 0) (buffers 992 14)) From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 09 09:43:53 2021 Received: (at 49932) by debbugs.gnu.org; 9 Aug 2021 13:43:53 +0000 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 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=; 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 From: Lars Ingebrigtsen To: Knut Anders Hatlen Subject: Re: bug#49932: 28.0.50; Error in GUI frames when xterm-set-window-title is set References: <87im0h0xgh.fsf@dell.mail-host-address-is-not-set> Date: Mon, 09 Aug 2021 15:43:37 +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") Message-ID: <87wnou3f92.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: 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. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 49932 Cc: 49932@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) 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 From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 09 09:44:01 2021 Received: (at control) by debbugs.gnu.org; 9 Aug 2021 13:44:01 +0000 Received: from localhost ([127.0.0.1]:56378 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mD5ZK-00043m-LC for submit@debbugs.gnu.org; Mon, 09 Aug 2021 09:44:01 -0400 Received: from quimby.gnus.org ([95.216.78.240]:37650) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mD5ZG-00043K-IM for control@debbugs.gnu.org; Mon, 09 Aug 2021 09:43:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=caaM0EjLFjEHtXOPx5O2nHFZR9tZbFjaigdcFuaQcuM=; b=b4PjKawMU36rL0bqZxl9A79sua X7nLXM4L7ZoLJJyBfQd4GvA+rOZHHSyHu4DoMuBQ7Im6HpOd41fGBHOxoTrV3rF1DxyVdLC7RkJTR y/dWUQGDaLsdklX1BIOj5hK4JQyganEuBCraXC56IqseRcLHlDljZUS/bu7zTxuvNf+I=; 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 1mD5Z8-0005mP-Ff for control@debbugs.gnu.org; Mon, 09 Aug 2021 15:43:44 +0200 Date: Mon, 09 Aug 2021 15:43:42 +0200 Message-Id: <87v94e3f8x.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #49932 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 49932 28.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) close 49932 28.1 quit From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 09 14:39:37 2021 Received: (at 49932) by debbugs.gnu.org; 9 Aug 2021 18:39:37 +0000 Received: from localhost ([127.0.0.1]:57764 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mDABU-0003Y5-OE for submit@debbugs.gnu.org; Mon, 09 Aug 2021 14:39:37 -0400 Received: from mail-lf1-f45.google.com ([209.85.167.45]:35638) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mDABR-0003Xn-TQ for 49932@debbugs.gnu.org; Mon, 09 Aug 2021 14:39:35 -0400 Received: by mail-lf1-f45.google.com with SMTP id c16so35975902lfc.2 for <49932@debbugs.gnu.org>; Mon, 09 Aug 2021 11:39:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=dIYvPthijM6e8x6BxFiiUYG+tBAwjJNTkXrvEaTT/Xc=; b=lq1uGx9rfaoKMLFLuMcwWWMwOLRJqZ0/3FFUVybh6NnKmlNgfs9K3w2tum0nmRc/VT ZKtu1MmIzodaIWQQH8jFX35ncZc2WASPPicC49vlxG5KfmDGnLb0q/Etnv0IBdvmGJFV cj5c2eJE36b7Le1tPRX3w5e3NEQtYHaPi37Vh0aWa//I/+vrKJF6iF5WhFdejPZHompx ef5mkpDco7MHGJlz8wtAUSC7H2GO6QPXV37fnuOrd4fss1jOl7P4JhgddWdkcDyhviUb tmHWt3XF/FgxXzyMaF++v6bDHm4yFaAcsWxCgkk7XhGGUw0ZRTuQEzIObuDU2IIFgesY 3tYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=dIYvPthijM6e8x6BxFiiUYG+tBAwjJNTkXrvEaTT/Xc=; b=Ep4HjIqeUL4RjefhJpz28jfJl+lp/DWVPCgrW6jVHqIqzmlCei0PcEcWLKeZUmFQlX ZMh1uN9WRNlGwdbs5Suvg5Qu5nFdLhck08VI2j9ZB5W7kJcfjZWFb8FVNvHxAHiLFzLy Oquw7CWR4OvL5HcO4ZFYhiCTyeA16g7gBzwOKcBxhMHl35d0ZP079Sk6lcFcaWu8kOmP nrKN4DOkky3PNMbsLPH975ReXA8JRnQOvzouslvnlP2DGRdybA5cmf4temK0EGjXc0IO GsH5M3XUuGA27m9dEm1PGFBcn25vxMIMxr7TTEevsLTzS2KNl7K+1mUl+/wyuy51kK7Q nk+g== X-Gm-Message-State: AOAM533Lx4WDKefWjGyVh78kxJCoU2lVXVQvu71Qv3WLkcYBaER940je kUsU080r8OnFLbqdx80vNrxqqsyxiQ== X-Google-Smtp-Source: ABdhPJx3ZmpFQvUx6QlYDHU7GfSrhQwclHqwKlWc1Cxv+/tfnHDd4yBZ/5wa/zwwlSZzphnvsT+Oow== X-Received: by 2002:ac2:5192:: with SMTP id u18mr18286671lfi.527.1628534367313; Mon, 09 Aug 2021 11:39:27 -0700 (PDT) Received: from dell ([2a02:1660:692e:dd00::44c]) by smtp.gmail.com with ESMTPSA id 4sm1630627ljf.127.2021.08.09.11.39.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Aug 2021 11:39:26 -0700 (PDT) From: Knut Anders Hatlen To: Lars Ingebrigtsen Subject: Re: bug#49932: 28.0.50; Error in GUI frames when xterm-set-window-title is set References: <87im0h0xgh.fsf@dell.mail-host-address-is-not-set> <87wnou3f92.fsf@gnus.org> Date: Mon, 09 Aug 2021 20:39:25 +0200 In-Reply-To: <87wnou3f92.fsf@gnus.org> (Lars Ingebrigtsen's message of "Mon, 09 Aug 2021 15:43:37 +0200") Message-ID: <875ywe5uoy.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 49932 Cc: 49932@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Lars Ingebrigtsen writes: > 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 . # apply(#f(compiled-function (params) #) ((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? Thanks for the quick fix, Lars. I guess you're right that it's not ideal. Some kind of generic set-frame-title mechanism that both graphical frames and tty frames could hook into sounds better. (I don't know the code well enough to suggest anything concrete. And I haven't had xterm-set-window-title enabled long enough to have noticed other problems with the current approach.) But in any case your patch seems to fix the immediate problem, so thanks for that. -- Knut Anders From unknown Wed Sep 24 05:40:52 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 07 Sep 2021 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator