GNU bug report logs - #16761
24.3.50; focus-in-hook not running accurately when frame switches to terminal

Previous Next

Package: emacs;

Reported by: Steven Edwards <cureadvocate <at> gmail.com>

Date: Sat, 15 Feb 2014 12:15:02 UTC

Severity: normal

Found in version 24.3.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 16761 <at> debbugs.gnu.org (full text, mbox):

From: Steven Edwards <cureadvocate <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Jan Djärv <jan.h.d <at> swipnet.se>, 16761 <at> debbugs.gnu.org
Subject: Re: bug#16761: 24.3.50; focus-in-hook not running accurately when
 frame switches to terminal
Date: Sat, 15 Feb 2014 12:04:52 -0500
> 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




This bug report was last modified 3 years and 227 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.