From unknown Fri Aug 15 16:56:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16761: 24.3.50; focus-in-hook not running accurately when frame switches to terminal Resent-From: Steven Edwards Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 15 Feb 2014 12:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 16761 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 16761@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.139246647720745 (code B ref -1); Sat, 15 Feb 2014 12:15:02 +0000 Received: (at submit) by debbugs.gnu.org; 15 Feb 2014 12:14:37 +0000 Received: from localhost ([127.0.0.1]:52993 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WEe8i-0005OW-RF for submit@debbugs.gnu.org; Sat, 15 Feb 2014 07:14:37 -0500 Received: from eggs.gnu.org ([208.118.235.92]:45488) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WEe8g-0005OH-FX for submit@debbugs.gnu.org; Sat, 15 Feb 2014 07:14:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WEe8a-0005e9-16 for submit@debbugs.gnu.org; Sat, 15 Feb 2014 07:14:29 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:39515) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WEe8Z-0005e5-UW for submit@debbugs.gnu.org; Sat, 15 Feb 2014 07:14:27 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47209) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WEe8Y-0001HK-Gg for bug-gnu-emacs@gnu.org; Sat, 15 Feb 2014 07:14:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WEe8X-0005dd-3y for bug-gnu-emacs@gnu.org; Sat, 15 Feb 2014 07:14:26 -0500 Received: from mail-la0-x235.google.com ([2a00:1450:4010:c03::235]:56788) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WEe8W-0005dS-Oe for bug-gnu-emacs@gnu.org; Sat, 15 Feb 2014 07:14:25 -0500 Received: by mail-la0-f53.google.com with SMTP id e16so9866106lan.26 for ; Sat, 15 Feb 2014 04:14:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=JfhwzgT6ybS7yMdvIaQUtcpSMZ5+Vl6kJbQpjqL7YCY=; b=ighRGSH1KG0YW0i/7ZT2Ve+p8FuJZgZWw05jgQYjK6R0k5Fp9YuuNs1N7dFgMNnnZ4 6/Z8Of9pe3YWUvriqGj+hqirax5C2ILybTfei0jL1Nn8DRpFhpUEeQM+h38yFnCDdNqL KH0p9fQIarVUAyPycjwIx+zAJN5qGeZ6Z19PQArR7VgxfYnrIRpUTp6sLQ1O6JBtfEBY HukXBBa74Ay1R03sSgRiqNlWFsitc3EE+QdzJ+spW2qeWsv4X5HnAzWtfmkp2bmdKtFB 4uGErCxaMeOKQ5eZxp4q30oPQNEwgMrzvZkH/fgcAQFRj8uYLuoXVJuwOrptwm1wrQMZ 7VaA== MIME-Version: 1.0 X-Received: by 10.112.164.5 with SMTP id ym5mr1125397lbb.48.1392466462748; Sat, 15 Feb 2014 04:14:22 -0800 (PST) Received: by 10.112.142.233 with HTTP; Sat, 15 Feb 2014 04:14:22 -0800 (PST) Date: Sat, 15 Feb 2014 07:14:22 -0500 Message-ID: From: Steven Edwards Content-Type: text/plain; charset=ISO-8859-1 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: -4.0 (----) Starting from emacs -Q: --- (server-start) (defun rand/on-focus () (message (concat (prin1-to-string window-system) (prin1-to-string (selected-frame)) (format-time-string "%H:%M:%S.%N")))) (add-hook 'focus-in-hook 'rand/on-focus) --- Open another graphical frame with C-x 5 2; switch it to *Messages* buffer. Next open a non-graphical frame with emacsclient -nw. You should now have three frames open. Switch frames from one to the next. (I'm using the awesome window manager, so Super-J.) You'll notice that when switching from one graphical frame to the next, two messages appear, e.g.: --- x#06:40:47.325463985 x#06:40:47.384926969 --- ...but when cycling from a graphical frame to a terminal frame, nothing new appears in *Messages*--until you switch to a graphical frame: --- x#06:44:37.889809270 x#06:44:37.922339020 x#06:44:37.922801690 --- If you perform any actions on the terminal frame after switching switch from a graphical frame, *Messages* will receive one message--as if focus-in-hooks are being called from focus-out-hooks: --- x#06:56:51.097246751 --- Switching to a raphical frame after performing an action on the terminal frame will finally send a message containing the terminal frame object, but only after it loses focus: --- nil#06:56:53.533491550 x#06:56:53.533998714 --- Possibly related, C-x 5 o skips over any terminal frames and C-x 5 1 won't delete terminal frames. The use case for this is that I'd like to use different themes for X frames and terminal frames. I know the use of window-system is deprecated; (framep (selected-frame)) does not work either. I hope this report helps. Best, Steven In GNU Emacs 24.3.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.20.1) of 2014-01-25 on Rand Windowing system distributor `The X.Org Foundation', version 11.0.11004000 System Description: Debian GNU/Linux 6.0.8 (squeeze) Important settings: value of $LC_CTYPE: en_US.UTF-8 value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Emacs-Lisp Minor modes in effect: tooltip-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 transient-mark-mode: t Recent input: C-x C-f . e m a c s C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-b C-x C-e C-x b C-g C-x C-f . e m a c s . d / l i TAB c u s TAB g l TAB C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-b C-x C-e C-n C-n C-n C-n C-n C-n C-a C-b C-x C-e C-x 5 2 M-x i d o - m o d e C-x b m e ESC [ > 1 ; 2 4 0 3 ; 0 c M-x r e p o r t - e m SPC SPC Recent messages: x#06:28:40.401223846 x#06:28:40.435829590 x#06:28:58.428023215 x#06:28:58.482460360 x#06:28:58.482890190 x#06:29:07.640302435 x#06:29:07.675357806 x#06:29:20.079938338 x#06:29:20.136675311 x#06:29:20.137121846 Load-path shadows: None found. Features: (shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util help-fns mail-prsvr mail-utils xterm ido server time-date tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind gfilenotify dynamic-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) From unknown Fri Aug 15 16:56:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16761: 24.3.50; focus-in-hook not running accurately when frame switches to terminal Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 15 Feb 2014 14:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16761 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Steven Edwards Cc: Jan =?UTF-8?Q?Dj=C3=A4rv?= , 16761@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 16761-submit@debbugs.gnu.org id=B16761.13924746747970 (code B ref 16761); Sat, 15 Feb 2014 14:32:02 +0000 Received: (at 16761) by debbugs.gnu.org; 15 Feb 2014 14:31:14 +0000 Received: from localhost ([127.0.0.1]:53055 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WEgGu-00024O-WE for submit@debbugs.gnu.org; Sat, 15 Feb 2014 09:31:13 -0500 Received: from mtaout26.012.net.il ([80.179.55.182]:53649) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WEgGp-00023l-CZ for 16761@debbugs.gnu.org; Sat, 15 Feb 2014 09:31:09 -0500 Received: from conversion-daemon.mtaout26.012.net.il by mtaout26.012.net.il (HyperSendmail v2007.08) id <0N1100E00JYTC200@mtaout26.012.net.il> for 16761@debbugs.gnu.org; Sat, 15 Feb 2014 16:29:29 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout26.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N11007NBK95QI90@mtaout26.012.net.il>; Sat, 15 Feb 2014 16:29:29 +0200 (IST) Date: Sat, 15 Feb 2014 16:31:00 +0200 From: Eli Zaretskii In-reply-to: X-012-Sender: halo1@inter.net.il Message-id: <83eh34bg7v.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: 8bit References: X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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 (+) > Date: Sat, 15 Feb 2014 07:14:22 -0500 > From: Steven Edwards > > Starting from emacs -Q: > > --- > (server-start) > (defun rand/on-focus () > (message (concat (prin1-to-string window-system) (prin1-to-string > (selected-frame)) (format-time-string "%H:%M:%S.%N")))) > (add-hook 'focus-in-hook 'rand/on-focus) > --- > > Open another graphical frame with C-x 5 2; switch it to *Messages* buffer. > > Next open a non-graphical frame with emacsclient -nw. > > You should now have three frames open. > > Switch frames from one to the next. (I'm using the awesome window > manager, so Super-J.) > > You'll notice that when switching from one graphical frame to the next, > two messages appear, e.g.: > > --- > x#06:40:47.325463985 > x#06:40:47.384926969 > --- > > ...but when cycling from a graphical frame to a terminal frame, nothing new > appears in *Messages*--until you switch to a graphical frame: > > --- > x#06:44:37.889809270 > x#06:44:37.922339020 > x#06:44:37.922801690 > --- > > If you perform any actions on the terminal frame after switching switch > from a graphical frame, *Messages* will receive one message--as if > focus-in-hooks are being called from focus-out-hooks: > > --- > x#06:56:51.097246751 > --- > > Switching to a raphical frame after performing an action on the terminal > frame will finally send a message containing the terminal frame object, > but only after it loses focus: > > --- > nil#06:56:53.533491550 > x#06:56:53.533998714 > --- > > Possibly related, C-x 5 o skips over any terminal frames and C-x 5 1 > won't delete terminal frames. You don't say what you expect to happen. Do you expect a focus-in and focus-out event to be generated for terminal frames? Or do you expect (or need) something else? From unknown Fri Aug 15 16:56:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16761: 24.3.50; focus-in-hook not running accurately when frame switches to terminal Resent-From: Steven Edwards Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 15 Feb 2014 17:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16761 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: Jan =?UTF-8?Q?Dj=C3=A4rv?= , 16761@debbugs.gnu.org Received: via spool by 16761-submit@debbugs.gnu.org id=B16761.139248390324594 (code B ref 16761); Sat, 15 Feb 2014 17:06:01 +0000 Received: (at 16761) by debbugs.gnu.org; 15 Feb 2014 17:05:03 +0000 Received: from localhost ([127.0.0.1]:53651 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WEifm-0006OZ-D6 for submit@debbugs.gnu.org; Sat, 15 Feb 2014 12:05:02 -0500 Received: from mail-lb0-f182.google.com ([209.85.217.182]:46434) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WEifi-0006O1-W9 for 16761@debbugs.gnu.org; Sat, 15 Feb 2014 12:04:59 -0500 Received: by mail-lb0-f182.google.com with SMTP id w7so10412997lbi.27 for <16761@debbugs.gnu.org>; Sat, 15 Feb 2014 09:04:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=eYztQIJvU9+H2k6S5aUAHpvx7i11HWPkfwSHaZL3Zh0=; b=gysQo2PgEsQ2jlM06Ke7Z8DSIEimKJXTH6ETuci+iML5rpMf0Bk2RXdX1dREBJhdg9 2L3f88+zZJOFkx6ea2RGtZnyWHJsokr6g7GCw/GEmL0riX2mAvWENjfinudTKOdJjR8j e42O64M7baJ6syi6ZcNJGBhE6F66ZT8mKJWHPllj89+M0mndKvL31yi4MFVY5uRPHWIS KAsPz79CV9DD/Csw790WJeyD9EVPoisKfqIMk06yuSQMkHd6CHmwJM6GXRPbxtTnP675 ZDBoTdfBCcdsw/5oJIKXlrhUcRZkNDhnK0h2rTxwOWkN9+56cBEezBgazbYjG03I4vAu 3d/w== MIME-Version: 1.0 X-Received: by 10.112.170.234 with SMTP id ap10mr9807287lbc.23.1392483892734; Sat, 15 Feb 2014 09:04:52 -0800 (PST) Received: by 10.112.142.233 with HTTP; Sat, 15 Feb 2014 09:04:52 -0800 (PST) In-Reply-To: <83eh34bg7v.fsf@gnu.org> References: <83eh34bg7v.fsf@gnu.org> Date: Sat, 15 Feb 2014 12:04:52 -0500 Message-ID: From: Steven Edwards Content-Type: text/plain; charset=ISO-8859-1 X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: -0.7 (/) > You don't say what you expect to happen. Do you expect a focus-in and > focus-out event to be generated for terminal frames? Or do you expect > (or need) something else? I need a focus-in event to occur when switching to a terminal frame; the code I provided was simply to demonstrate and focus on the error. The real code: --- (defun rand/swap-theme (from to) (disable-theme from) (enable-theme to)) (defun rand/choose-theme () (cond ((memq window-system '(x w32 ns)) (rand/swap-theme 'Custom 'assemblage)) (t (rand/swap-theme 'assemblage 'Custom)))) (add-hook 'focus-in-hook 'rand/choose-theme) --- The goal is to switch to a terminal-friendly theme when I'm in tmux and a GUI friendly theme when I'm in a graphical environment. The problem seems to be that the hooks in focus-in-hooks aren't being executed when I switch to a terminal frame. Best, Steven From unknown Fri Aug 15 16:56:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16761: 24.3.50; focus-in-hook not running accurately when frame switches to terminal Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 15 Feb 2014 17:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16761 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Steven Edwards Cc: jan.h.d@swipnet.se, 16761@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 16761-submit@debbugs.gnu.org id=B16761.139248449225610 (code B ref 16761); Sat, 15 Feb 2014 17:15:02 +0000 Received: (at 16761) by debbugs.gnu.org; 15 Feb 2014 17:14:52 +0000 Received: from localhost ([127.0.0.1]:53657 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WEipI-0006f0-IE for submit@debbugs.gnu.org; Sat, 15 Feb 2014 12:14:52 -0500 Received: from mtaout28.012.net.il ([80.179.55.184]:45618) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WEipG-0006eh-6Q for 16761@debbugs.gnu.org; Sat, 15 Feb 2014 12:14:51 -0500 Received: from conversion-daemon.mtaout28.012.net.il by mtaout28.012.net.il (HyperSendmail v2007.08) id <0N1100O00RHDMK00@mtaout28.012.net.il> for 16761@debbugs.gnu.org; Sat, 15 Feb 2014 19:15:34 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout28.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N1100KZDRXYW460@mtaout28.012.net.il>; Sat, 15 Feb 2014 19:15:34 +0200 (IST) Date: Sat, 15 Feb 2014 19:14:43 +0200 From: Eli Zaretskii In-reply-to: X-012-Sender: halo1@inter.net.il Message-id: <838utcb8n0.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: 8BIT References: <83eh34bg7v.fsf@gnu.org> X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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 (+) > Date: Sat, 15 Feb 2014 12:04:52 -0500 > From: Steven Edwards > Cc: 16761@debbugs.gnu.org, Jan Djärv > > > You don't say what you expect to happen. Do you expect a focus-in and > > focus-out event to be generated for terminal frames? Or do you expect > > (or need) something else? > > I need a focus-in event to occur when switching to a terminal frame; How can Emacs get a focus-in event for the terminal frame, when the event is sent by X? Jan, is this possible with X? From unknown Fri Aug 15 16:56:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16761: 24.3.50; focus-in-hook not running accurately when frame switches to terminal Resent-From: Steven Edwards Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 15 Feb 2014 17:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16761 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: jan.h.d@swipnet.se, 16761@debbugs.gnu.org Received: via spool by 16761-submit@debbugs.gnu.org id=B16761.139248504626595 (code B ref 16761); Sat, 15 Feb 2014 17:25:02 +0000 Received: (at 16761) by debbugs.gnu.org; 15 Feb 2014 17:24:06 +0000 Received: from localhost ([127.0.0.1]:53670 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WEiyD-0006uq-6b for submit@debbugs.gnu.org; Sat, 15 Feb 2014 12:24:05 -0500 Received: from mail-la0-f53.google.com ([209.85.215.53]:62137) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WEiyA-0006u5-9L for 16761@debbugs.gnu.org; Sat, 15 Feb 2014 12:24:02 -0500 Received: by mail-la0-f53.google.com with SMTP id e16so10021536lan.40 for <16761@debbugs.gnu.org>; Sat, 15 Feb 2014 09:23:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=MnuNoO83sOaf21TjhC4DcJYvh0hDUtNHovC+/n76SEY=; b=yrqpnHEQ9hKze2vebH7yUZ99RdUB+VswzQi5tQgD8xwMRAOXdW5qQ9Jc/UO/WU8x4+ 91U4Zlgq0z3+Qg7ExAMlw4au1L7LtvdfYxjwgR4vm534GIHpAYWGt+MmZTNSKL1fPYYo Wjm+ycYcwUDA1UHrFPyjjBRn58Ja0J8rRxuLVhk5PXea8IREI1hxyBnqjYh4SnxOvh6o EajrftFm47Ox8KaP1Q1nvO2yz0qlv8Ja+2QJ7GPkKwXdEAZvvVm59+nDXDWsuUS6q1Q8 CmNJJNPq2AiCcfj9N0+mayTtL1T3cbZ2umzSsuJng4bBV+d5jvfU1vQ9d253X2GOwLEs TMbg== MIME-Version: 1.0 X-Received: by 10.152.8.47 with SMTP id o15mr10548819laa.20.1392485036123; Sat, 15 Feb 2014 09:23:56 -0800 (PST) Received: by 10.112.142.233 with HTTP; Sat, 15 Feb 2014 09:23:56 -0800 (PST) In-Reply-To: <838utcb8n0.fsf@gnu.org> References: <83eh34bg7v.fsf@gnu.org> <838utcb8n0.fsf@gnu.org> Date: Sat, 15 Feb 2014 12:23:56 -0500 Message-ID: From: Steven Edwards Content-Type: text/plain; charset=ISO-8859-1 X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: -0.7 (/) On 2/15/14, Eli Zaretskii wrote: > How can Emacs get a focus-in event for the terminal frame, when the > event is sent by X? Jan, is this possible with X? Interesting. I wasn't aware those events were sent by X. Out of curiosity, then, how does Emacs produce the message indicating a terminal frame after I return to an X frame? It seems like it's blocking somewhere. From unknown Fri Aug 15 16:56:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16761: 24.3.50; focus-in-hook not running accurately when frame switches to terminal Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 15 Feb 2014 20:40:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16761 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Steven Edwards Cc: jan.h.d@swipnet.se, 16761@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 16761-submit@debbugs.gnu.org id=B16761.139249676214952 (code B ref 16761); Sat, 15 Feb 2014 20:40:01 +0000 Received: (at 16761) by debbugs.gnu.org; 15 Feb 2014 20:39:22 +0000 Received: from localhost ([127.0.0.1]:53799 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WEm1C-0003t6-0m for submit@debbugs.gnu.org; Sat, 15 Feb 2014 15:39:22 -0500 Received: from mtaout21.012.net.il ([80.179.55.169]:56918) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WEm19-0003sn-7J for 16761@debbugs.gnu.org; Sat, 15 Feb 2014 15:39:20 -0500 Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0N1200M001339700@a-mtaout21.012.net.il> for 16761@debbugs.gnu.org; Sat, 15 Feb 2014 22:39:12 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N1200MGY1DC3B40@a-mtaout21.012.net.il>; Sat, 15 Feb 2014 22:39:12 +0200 (IST) Date: Sat, 15 Feb 2014 22:39:12 +0200 From: Eli Zaretskii In-reply-to: X-012-Sender: halo1@inter.net.il Message-id: <837g8waz67.fsf@gnu.org> References: <83eh34bg7v.fsf@gnu.org> <838utcb8n0.fsf@gnu.org> X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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 (+) > Date: Sat, 15 Feb 2014 12:23:56 -0500 > From: Steven Edwards > Cc: 16761@debbugs.gnu.org, jan.h.d@swipnet.se > > On 2/15/14, Eli Zaretskii wrote: > > How can Emacs get a focus-in event for the terminal frame, when the > > event is sent by X? Jan, is this possible with X? > > Interesting. I wasn't aware those events were sent by X. > > Out of curiosity, then, how does Emacs produce the message indicating > a terminal frame after I return to an X frame? It seems like it's > blocking somewhere. I think the event is generated by X when you switch to a GUI frame, and the terminal frame is just indicated as the previous one (since Emacs does know about its terminal frames). But I may be mistaken, so I prefer to hear from Jan on this. From unknown Fri Aug 15 16:56:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16761: 24.3.50; focus-in-hook not running accurately when frame switches to terminal Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 Dec 2021 03:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16761 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Steven Edwards Cc: 16761@debbugs.gnu.org Received: via spool by 16761-submit@debbugs.gnu.org id=B16761.16385884919359 (code B ref 16761); Sat, 04 Dec 2021 03:29:01 +0000 Received: (at 16761) by debbugs.gnu.org; 4 Dec 2021 03:28:11 +0000 Received: from localhost ([127.0.0.1]:52603 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mtLid-0002Qs-AH for submit@debbugs.gnu.org; Fri, 03 Dec 2021 22:28:11 -0500 Received: from quimby.gnus.org ([95.216.78.240]:59498) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mtLia-0002Qd-AC for 16761@debbugs.gnu.org; Fri, 03 Dec 2021 22:28:10 -0500 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=aM4RqhCK7jojBU02/AgCZdgj5Zf6IouwfJ3iA7+TPVc=; b=Jy9mb53cDkYUQU6l6k0Aag2tjJ rs0az4eZYDMouK5txZ5tudhNDW17LsXHD7t+MACqUXIDDuA7pH8QNOdQTrdqLSos9/E+Hwgnh0Zb+ JKE6kFqxSTSE4cFmO4ntGNsYYdrWAOJAM+4botJzqFqsQCj5ko26tWAKIOn2YzcRQq7w=; 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 1mtLiR-0001nT-At; Sat, 04 Dec 2021 04:28:01 +0100 From: Lars Ingebrigtsen References: X-Now-Playing: Genesis's _Trespass_: "The Knife" Date: Sat, 04 Dec 2021 04:27:56 +0100 In-Reply-To: (Steven Edwards's message of "Sat, 15 Feb 2014 07:14:22 -0500") Message-ID: <87a6hhrqv7.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.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: Steven Edwards writes: > ...but when cycling from a graphical frame to a terminal frame, nothing new > appears in *Messages*--until you switch to a graphical frame: (I'm going through old bug reports that unfortunately weren't resolved at the time.) 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-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 (---) Steven Edwards writes: > ...but when cycling from a graphical frame to a terminal frame, nothing new > appears in *Messages*--until you switch to a graphical frame: (I'm going through old bug reports that unfortunately weren't resolved at the time.) focus-in-hook was made obsolete in Emacs 27.1, and `after-focus-change-function' should be used instead. And using that, I see that the change function is called reliably when changing to a terminal frame, so I think this has been fixed now, and I'm closing this bug report. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 03 22:28:17 2021 Received: (at control) by debbugs.gnu.org; 4 Dec 2021 03:28:17 +0000 Received: from localhost ([127.0.0.1]:52606 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mtLij-0002RA-Gw for submit@debbugs.gnu.org; Fri, 03 Dec 2021 22:28:17 -0500 Received: from quimby.gnus.org ([95.216.78.240]:59512) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mtLih-0002Ql-2q for control@debbugs.gnu.org; Fri, 03 Dec 2021 22:28:15 -0500 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=8u4ImgDKOK61hiw3wKKLKXMq6WDCDRv9oqUEus2qnsA=; b=aP/YFlLGAs7mdamchs23SHlbGu YnekWfKjNyeV24HZghzqAYBr4y2tmv0fARmPj2Krnhi0LCl7xORrz+lrw16Lnku9Fb8AQRrstgGzl 1rMCJa+oydsbGioWR7rpZdtaY5znca8TuMMdTg7QZATxA2QYVZ6QqCI3WFNxnCrmvokU=; 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 1mtLiZ-0001nw-6t for control@debbugs.gnu.org; Sat, 04 Dec 2021 04:28:09 +0100 Date: Sat, 04 Dec 2021 04:28:06 +0100 Message-Id: <878rx1rqux.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #16761 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 16761 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 16761 quit