Subject: bug#20097: closed (Re: bug#20097: focus-out-hook doesn't work w/other emacsclient frame)

From: [email-masked] (GNU bug Tracking System)
Date: Wed, 12 Aug 2020 16:22:02 +0000

Your bug report

#20097: Add new hook to be run when switching frames

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
20097: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=20097
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#20097: focus-out-hook doesn't work w/other emacsclient frame
From: Stefan Kangas <[email-masked]>
To: Rasmus Pank Roulund <[email-masked]>
Cc: [email-masked]
Date: Wed, 12 Aug 2020 09:21:35 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

Rasmus Pank Roulund <[email-masked]> writes:

>>> Yes, but it's up to you to describe your use case with enough info that
>>> the semantics that they choose is useful for you.
>>
>> I'm just triaging bugs, and don't have any use case to provide.
>> Perhaps the OP will be able to provide us with more details.
>
> I hardly remember at this point.
>
> I think I wanted to use it for opening an Org Agenda view via Gnome Shell
> and (type <Super> agenda, opening an emacsclient) and get rid of the
> window once I click somewhere else.
>
> Feel free to close.

Thanks, it seems to be that it will be hard to make any progress here
without having a specific use-case.

I'm therefore closing this bug report.

Best regards,
Stefan Kangas

Subject: 25.0.50; focus-out-hook doesn't work w/other emacsclient frame
From: Rasmus <[email-masked]>
To: [email-masked]
Date: Thu, 12 Mar 2015 12:38:42 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi,

I think focus-out-hook doesn't work as expected when used with other
emacsclient that belong to the same daemon.  Of course I could be
misunderstanding the meaning of "input focus" cf. the docstring.

Try the following.  Start a new emacsclient.  Let's call its first GTK
frame 'A' (informally).  Do

1. Make (new-frame).  Let's call this frame 'B' (informally).
2. Make a new buffer in B and eval:
   (set (make-local-variable (quote focus-out-hook)) (quote delete-frame))
3. Switch focus to frame A.  I do so by clicking on A or using
   Super/M-TAB.  Notice that nothing happens
4. Now try this with another program that's not an emacsclient.  The
   Frame is closed as expected.

The real use case for this is an org-agenda desktop file that I use to
integrate the Org calendar with the system calendar button.

Thanks,
Ramus

GNU Emacs 25.0.50.2 (x86_64-unknown-linux-gnu, GTK+ Version 3.14.8) of 2015-02-06 on x200s

-- 
When in doubt, do it!