🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.epoch.misc
Article #123

Screen titles (elisp code)

#123
From: Jim Thompson
Date: Wed, 05 Aug 1992 16:18
37 lines
1867 bytes
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:

First, "func" wasn't recognized as a proper function by my epoch (is
that a local thing, Brian, or is my epoch screwed?); I replaced "(func ..."
with "'(lambda ..." and it works fine.

Second, I wanted "@ hostname" to appear in the window title.

Finally, I wanted the icon-name to change also.

These were fairly simple and all seem to work well; here's the hacked
version, for anyone who's interested:

(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
--
   _     Jim Thompson           |  Western Geophysical
 _| ~-   thompson@wg2.waii.com  |  Exploration Products
 \,  _}  jimt@sugar.neosoft.com |  3600 Briarpark
   \(    (713) 964-6213         |  Houston, TX 77042
Technical Details
Message-ID: <9208051618.AA00739@se33.wg2.waii.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!rutgers!usc!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!se01.wg2.waii.COM!jct%se33
References: <BLK.92Aug5094415@vanity.mitre.org>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!rutgers!usc!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!se01.wg2.waii.COM!jct%se33
From: jct%se33@se01.wg2.waii.COM (Jim Thompson)
Newsgroups: gnu.epoch.misc
Subject: Screen titles (elisp code)
Message-ID: <9208051618.AA00739@se33.wg2.waii.com>
Date: 5 Aug 92 16:18:36 GMT
References: <BLK.92Aug5094415@vanity.mitre.org>
Sender: brunsman@cis.ohio-state.edu (carissa ann brunsman)
Reply-To: thompson@wg2.waii.com
Distribution: gnu
Organization: Gnus Not Usenet
Lines: 37