From: myrkraverk@users.sourceforge.net
Subject: Displaying the window number in the mode line?
Date: Thu, 22 May 2003 01:14:36 +0000 [thread overview]
Message-ID: <16076.9340.643300.771365@jin.tekken> (raw)
Hi,
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
and have been revised a little by better elisp hackers than me :)
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:
(defun my-window-number ()
(number-to-string
(1- (length (memq (selected-window) (nreverse
(window-list)))))))
Then I create this list with items I want to show in the modeline:
(setq window-number-string
(list "W"
'(:eval (my-window-number)) " "))
And add it to the global-mode-string:
(add-to-list 'global-mode-string '("" window-number-string))
But I only get an "W " in the modeline, the number doesn't show up!
Can anyone tell my why this is and how to do it?
And so people won't get confused, I'm using GNU Emacs version 21.[23].
Thanks in advange,
Johann
1 Emacs terminology, this has nothing to do with an os or even a
window system.
next reply other threads:[~2003-05-22 1:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-22 1:14 myrkraverk [this message]
[not found] <mailman.6560.1053566934.21513.help-gnu-emacs@gnu.org>
2003-05-22 11:46 ` Displaying the window number in the mode line? Joakim Hove
2003-05-22 13:21 ` myrkraverk
2003-05-23 9:25 ` Oliver Scholz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=16076.9340.643300.771365@jin.tekken \
--to=myrkraverk@users.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).