From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: John J Foerch Newsgroups: gmane.emacs.devel Subject: Re: request: make-frame-visible hook Date: Wed, 18 Feb 2009 12:14:06 -0500 Message-ID: <87zlgjis69.fsf@earthlink.net> References: <87fxidj8gt.fsf@earthlink.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1234977192 16279 80.91.229.12 (18 Feb 2009 17:13:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 18 Feb 2009 17:13:12 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Feb 18 18:14:27 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LZq06-00005C-U9 for ged-emacs-devel@m.gmane.org; Wed, 18 Feb 2009 18:14:23 +0100 Original-Received: from localhost ([127.0.0.1]:40876 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LZpym-0002Qw-2r for ged-emacs-devel@m.gmane.org; Wed, 18 Feb 2009 12:13:00 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LZpwR-0000tB-8j for emacs-devel@gnu.org; Wed, 18 Feb 2009 12:10:35 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LZpwP-0000qd-Hc for emacs-devel@gnu.org; Wed, 18 Feb 2009 12:10:34 -0500 Original-Received: from [199.232.76.173] (port=59321 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LZpwP-0000qW-A3 for emacs-devel@gnu.org; Wed, 18 Feb 2009 12:10:33 -0500 Original-Received: from main.gmane.org ([80.91.229.2]:47849 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LZpwO-00013z-UO for emacs-devel@gnu.org; Wed, 18 Feb 2009 12:10:33 -0500 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1LZpwJ-0002mK-BE for emacs-devel@gnu.org; Wed, 18 Feb 2009 17:10:27 +0000 Original-Received: from dialup-4.159.5.112.dial1.chicago1.level3.net ([4.159.5.112]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 18 Feb 2009 17:10:27 +0000 Original-Received: from jjfoerch by dialup-4.159.5.112.dial1.chicago1.level3.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 18 Feb 2009 17:10:27 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 47 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: dialup-4.159.5.112.dial1.chicago1.level3.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) Cancel-Lock: sha1:SDFyDnRsS1s1mTP5aqkGatYN3zc= X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:109191 Archived-At: Richard M Stallman writes: > The make-frame-visible > event is very useful for, e.g. updating buffer-tracking notification in > modules like erc-track (in erc) > > Could you explain why it is useful to keep track of which frames > are visible? > > or tracking (in circe) when a frame is > made visible because of changing desktops/workspaces in a window > manager. > > Could you explain what that means? Why does changing desktops affect > frame visibility? The window manager I use (a common one) offers 4 > desktops in parallel, but I don't think switching between them has any > effect on Emacs frame visibility, because the frames on other desktops > are nonetheless visible. Hi Richard, Certainly. Let me answer your second question first. I'm using the window manager XMonad, and when I switch to a workspace containing some emacs frame, the make-frame-visible event is fired for that frame. I did not realize other WMs did not necessarily work the same way. I have used the emacs irc clients Circe and Erc, which both provide modes to track activity in hidden irc buffers. "Hidden" may mean a buffer that is not visible in any frame, or a buffer shown in a non-visible frame. The irc channels with new activity are indicated in the mode-line. Switching to a tracked buffer removes that buffer's indicator from the mode-line. What I would like to achieve is to have the make-frame-visible event trigger an update of the tracking indicator, so that when I switch to a workspace which contains an emacs frame in which a tracked buffer is visible, the indicator for that buffer will be removed from the mode-line tracking indicator. I have been able to get this effect in the past by registering a handler in special-event-map, but that method is not good, because other modules (like dframe) put their own handlers on the same event. Thank you. -- John Foerch