From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: myrkraverk@users.sourceforge.net Newsgroups: gmane.emacs.help Subject: Re: Displaying the window number in the mode line? Date: Thu, 22 May 2003 13:21:25 +0000 Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <16076.52949.350406.102810@jin.tekken> References: <4yel2rgq4t.fsf@skjellgran.ii.uib.no> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1053611056 23219 80.91.224.249 (22 May 2003 13:44:16 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 22 May 2003 13:44:16 +0000 (UTC) Cc: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Thu May 22 15:44:14 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19IqK8-0005l6-00 for ; Thu, 22 May 2003 15:41:37 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19IqGD-0003DG-6b for gnu-help-gnu-emacs@m.gmane.org; Thu, 22 May 2003 09:37:33 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19IqDL-0002Mh-05 for help-gnu-emacs@gnu.org; Thu, 22 May 2003 09:34:35 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19Iq8Z-0008Sr-Cs for help-gnu-emacs@gnu.org; Thu, 22 May 2003 09:30:10 -0400 Original-Received: from adsl1-61.du.heimsnet.is ([62.145.142.61] helo=jin.tekken) by monty-python.gnu.org with esmtp (Exim 4.20) id 19Iq0r-0005mr-Rz for help-gnu-emacs@gnu.org; Thu, 22 May 2003 09:21:42 -0400 Original-Received: (from myrkraverk@localhost) by jin.tekken (8.11.6/8.11.6) id h4MDLPt14164; Thu, 22 May 2003 13:21:25 GMT X-Authentication-Warning: jin.tekken: myrkraverk set sender to myrkraverk@users.sourceforge.net using -f Original-To: Joakim Hove In-Reply-To: <4yel2rgq4t.fsf@skjellgran.ii.uib.no> X-Mailer: VM 7.15 under Emacs 21.3.1 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:10023 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:10023 Hi, Joakim Hove writes: > > myrkraverk@users.sourceforge.net writes: > > > I've made a crude hack to jump to a window with specific number, the > > functions are available at > > > > http://www.emacswiki.org/cgi-bin/wiki.pl?SwitchingWindows > > > > Looks interesting! > > > This has resulted in my desire to display the window[1] number in the > > mode line. So far I've the following function to evalute the number > > of the selected window: > 1. The *global*-mode-string is just that - i.e. it is gloablly shared > among all windows (and even frames) - hence any code which simply > sets global-mode-string to some value will result in the same value > displayed in all windows. So (as far as I can see) The (:eval ..) construct is though unique to each modeline. > 2. global-mode-string is a string - not a list. The following Actually, global-mode-string is a list, and now there are two methods that show the window number in the modeline at the above url. The latter is a fixed version of what I was trying to do. Thanx though, Johann