From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alessandro Piras Newsgroups: gmane.emacs.help Subject: Recognizing active/inactive mode-line in (:eval ...) form in mode-line-string Date: Thu, 28 Feb 2013 12:25:27 +0100 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1362070615 12625 80.91.229.3 (28 Feb 2013 16:56:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 28 Feb 2013 16:56:55 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Feb 28 17:57:19 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UB6nG-0002j1-Hc for geh-help-gnu-emacs@m.gmane.org; Thu, 28 Feb 2013 17:57:18 +0100 Original-Received: from localhost ([::1]:39495 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UB6mv-0006PA-LJ for geh-help-gnu-emacs@m.gmane.org; Thu, 28 Feb 2013 11:56:57 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:47919) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UB1cU-0003VH-To for help-gnu-emacs@gnu.org; Thu, 28 Feb 2013 06:25:57 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UB1cS-0002IE-8J for help-gnu-emacs@gnu.org; Thu, 28 Feb 2013 06:25:50 -0500 Original-Received: from mail-ia0-x235.google.com ([2607:f8b0:4001:c02::235]:44801) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UB1cS-0002HM-4H for help-gnu-emacs@gnu.org; Thu, 28 Feb 2013 06:25:48 -0500 Original-Received: by mail-ia0-f181.google.com with SMTP id w33so1374246iag.40 for ; Thu, 28 Feb 2013 03:25:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:from:date:message-id:subject:to :content-type; bh=SwtCnGrwlF2XiU1qiqK9BWKPzId+yLI3RGbY/T2SddA=; b=vRqvvxUkGIFKTpSF2mpkhCqnSjJSf1grunR21iGADr6NgkdpDxHGKtfv0mrqd9aLhV OoLClUdVcgexYudgmvGNkixAkX5EWlLEO4En/VnKhK7ywAMah5apHgjELX9gxivRH2GO ZTKd0RQ6LzgIA82j69pXLQpOtHwdU9BHVhRWH6x3iP3d+1EMPZUDVV9OHF58M7YB1lzd kidLcaNZYS+nAT4cagaXBFmzPgi+q6uSU/CB/enzFzxJanFbsq5P5P8HErLwRsx355bB 6yAMwCxnEBEJcJMr45RqwS2YhRhRf6I731Ws1Iljjmx9RPQr3bTqQv24xbh18q4/kgc0 +MGw== X-Received: by 10.50.17.131 with SMTP id o3mr9457795igd.63.1362050747276; Thu, 28 Feb 2013 03:25:47 -0800 (PST) Original-Received: by 10.231.1.68 with HTTP; Thu, 28 Feb 2013 03:25:27 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4001:c02::235 X-Mailman-Approved-At: Thu, 28 Feb 2013 11:56:47 -0500 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:89295 Archived-At: Is there a way to know if the mode-line is active in a (:eval ...) form inside the mode-line-string? A simple example: mode-line-string => ("%e" (:eval (if "foo" "bar"))) I would like to see "foo" on the mode-line of the active window, "bar" on the others. -- AP