From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alp Aker Newsgroups: gmane.emacs.help Subject: Re: Distinguish inactive windows Date: Fri, 24 Jun 2011 02:45:41 +0000 (UTC) Message-ID: References: <20110623175236.0cfa498d@gauss> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1308884008 2986 80.91.229.12 (24 Jun 2011 02:53:28 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 24 Jun 2011 02:53:28 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jun 24 04:53:24 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QZwWK-0004ar-MA for geh-help-gnu-emacs@m.gmane.org; Fri, 24 Jun 2011 04:53:24 +0200 Original-Received: from localhost ([::1]:41328 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QZwWJ-0001YB-PJ for geh-help-gnu-emacs@m.gmane.org; Thu, 23 Jun 2011 22:53:23 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:55702) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QZwP6-0000dO-L0 for help-gnu-emacs@gnu.org; Thu, 23 Jun 2011 22:45:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QZwP5-00073m-8Y for help-gnu-emacs@gnu.org; Thu, 23 Jun 2011 22:45:56 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:36171) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QZwP4-00073c-SQ for help-gnu-emacs@gnu.org; Thu, 23 Jun 2011 22:45:55 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QZwP3-0001Er-3Z for help-gnu-emacs@gnu.org; Fri, 24 Jun 2011 04:45:53 +0200 Original-Received: from pool-72-95-250-103.pitbpa.east.verizon.net ([72.95.250.103]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 24 Jun 2011 04:45:53 +0200 Original-Received: from alp.tekin.aker by pool-72-95-250-103.pitbpa.east.verizon.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 24 Jun 2011 04:45:53 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 35 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: sea.gmane.org User-Agent: Loom/3.14 (http://gmane.org/) X-Loom-IP: 72.95.250.103 (Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_5) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.100 Safari/534.30) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 80.91.229.12 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:81417 Archived-At: > How can the selected window be visually distinguished from the other > windows in its frame? I'd like to, say, set mode-line background of the > selected window to a particular color. Is specifically a unique *window* whose mode-line you want to distinguish, or would it suffice to change the mode-line for all windows displaying a particular *buffer*? If the former, you're out of luck; there's no way (that I'm aware of) to do it. If the latter, you can use the variable `mode-line-format', which is buffer-local and which allows you to specify a face. E.g., (setq mode-line-format `(:propertize ,mode-line-format face default)) will highlight (part of) the mode-line. Unfortunately, to get the full effect you're probably looking for, you'll have to dissect the mode-line format construct and put the face properties you want on elements buried several levels deep. See the info node "(elisp) Mode Line Format" for the details on how it works. (Be forewarned that the API is rather cumbersome.) Another way to get a buffer-specific (rather that window-specific) effect is to use `header-line-format', which, when given a non-nil value, will put a line at the top of every window displaying the buffer, and whose appearance is controlled by the face `header-line'. (The format construct rules for header lines are the same as for mode lines. Two advantages header lines might have for your purposes is that they're displayed the same whether the window is selected or not, and they're only used by a few modes, so you can, in most contexts, specify a simple header line you construct from scratch, rather than, as you have to do with mode lines, modifying an existing--and non-trivial--construct.) If what you need really is to highlight a specific window, you might consider using the fringes or marginal display areas to indicate the window of interest. Those can be controlled on a per-window basis.