Article View: gnu.epoch.misc
Article #161Re: Screen titles (elisp code)
From: Phil Johnson
Date: Tue, 25 Aug 1992 21:03
Date: Tue, 25 Aug 1992 21:03
34 lines
1862 bytes
1862 bytes
(Sorry for all the included text which follows -- I hate it when people do this! -- but this thread is a bit stale.) Jim Thompson (thompson@wg2.waii.com) writes: > Thanks to Brian for distributing his do-titles; I'd been wanting > something like it, but didn't have time to write it. I did, however, > take the time to make a couple of quick hacks to Brian's code: . . . > (defun ep:do-titles (win) > "Chnage screen title and icon name, WIN currently selected." > ;; change screen title if new name, not minibuf > (let ((scr (concat (buffer-name (window-buffer win)) " @ " (system-name)))) > (if (not (string-equal (title) scr)) > (if (string-match "Minibuf" scr) > nil > (icon-name scr) > (title scr))))) > > (setq set-window-buffer-hook > '(lambda (win) (ep:do-titles win))) > > (setq window-select-hook > '(lambda (win) (ep:do-titles win))) Jim's (and Brian's) code works fine for me, with a small problem: when doing find-file-other-screen from another screen, the old screen's title bar is updated before the new screen's. So you end up with two screens labeled with the name of the new buffer. (The old one will be fixed when you move the cursor back into it.) Is there an easy fix for this? - Phil
Technical Details
Message-ID:
<BtK56F.Kp1@news.dtc.hp.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!sequent!ogicse!hp-cv!hp-pcd!news1.boi.hp.com!cupnews0.cup.hp.com!hpscdc!news.dtc.hp.com!johnsonReferences:
<BLK.92Aug5094415@vanity.mitre.org> <9208051618.AA00739@se33.wg2.waii.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!sequent!ogicse!hp-cv!hp-pcd!news1.boi.hp.com!cupnews0.cup.hp.com!hpscdc!news.dtc.hp.com!johnson From: johnson@dtc.hp.com (Phil Johnson) Newsgroups: gnu.epoch.misc Subject: Re: Screen titles (elisp code) Message-ID: <BtK56F.Kp1@news.dtc.hp.com> Date: 25 Aug 92 21:03:50 GMT Article-I.D.: news.BtK56F.Kp1 References: <BLK.92Aug5094415@vanity.mitre.org> <9208051618.AA00739@se33.wg2.waii.com> Sender: news@news.dtc.hp.com ((Network News admin)) Distribution: gnu Organization: HP Design Technology Center, Santa Clara, CA Lines: 34