Article View: gnu.epoch.misc
Article #2055Re: *-other-screen
From: Alan M. Carroll
Date: Thu, 11 Apr 1991 14:58
Date: Thu, 11 Apr 1991 14:58
85 lines
3699 bytes
3699 bytes
In article <AMIR.91Apr11122647@taux01.nsc.com>, amir@taux01.nsc.com (Amir J. Katz (Xpert)) writes:
> Has anyone out there written Epoch versions for 'mail-other-window' so
> it will do 'mail-other-screen'?
I use MH-e, and have some support code to put it into another window.
This code defines a function called "mh-set-up", which switches to a
seperate MH screen, creating and mapping if necessary. It is also set
up to incorporate new mail whenever the screen is mapped, e.g. when
un-iconified. Elsewhere I bind Meta-Control-M to 'mh-set-up, so that I
can get to my mailer via that key.
;;; --------------------------------------------------------------------------
;;; MH support
;;;
(require 'mh-e)
(mh-find-path) ;set up MH paths
;; Force this variable to be bound to something, in case someone else uses
;; this code. This var is used in functions in amc.el.
(defvar inhibit-rename-screen nil)
;;; Override default signature with this one, which forces the .sig to
;;; the end of the file.
(define-key mh-letter-mode-map "\C-c\C-s"
(definteractive
(save-excursion
(goto-char (point-max))
(if (/= (current-column) 0) (insert "\n"))
(insert "____\n")
(mh-insert-signature)
)))
(defvar mh-screen nil)
(defun mh-set-up () (interactive)
"Set up the MH screen. If there is no MH screen or it is dead, a new
one is created. The screen is forced to be mapped, raised, and
selected, and the MH buffers put in the screen."
(if (and (screenp mh-screen) (get-screen-id mh-screen))
(mapraised-screen mh-screen)
(setq mh-screen
(create-screen "*scratch*"
'((geometry . "80x45-0-192") (icon-name . "MH")
(title . "MH-Mailer") (font . "6x13")
))))
;; This is to prevent my buffer screen renamer from renaming the MH
;; screen.
(or
(memq mh-screen inhibit-rename-screen)
(setq inhibit-rename-screen (cons mh-screen inhibit-rename-screen))
)
;; I know these are set above, but it's better to be safe, because we
;; might not have created the screen when we get here.
(title "MH Mailer" mh-screen)
(icon-name "MH" mh-screen)
;; set up auto incorporate on map
(on-map-do mh-screen 'mh-screen-mapper)
;; set motion style locally for the mail screen, because we use a smaller
;; font on this screen.
(let ((s (make-style)))
(set-style-foreground s (foreground))
(set-style-background s (background))
(set-style-underline s "red")
(set-attribute-style motion::attribute s mh-screen)
))
(defun mh-screen-mapper (s)
"Select the screen and incorporate new mail for MH. Also reinstalls
itself to maintain this action on the map event."
(on-map-do s 'mh-screen-mapper)
(select-screen s)
(mh-inc-folder)
)
--
Alan M. Carroll <-- Another victim of applied metaphysics
Epoch Development Team
Urbana Il. "I hate shopping with the reality-impaired" - Susan
Technical Details
Message-ID:
<1991Apr11.145814.26628@m.cs.uiuc.edu>Path:
arc1-ca.pugleaf.net!gmdzi!unido!fauern!ira.uka.de!math.lsa.umich.edu!zaphod.mps.ohio-state.edu!wuarchive!m.cs.uiuc.edu!uiucdcs!carrollReferences:
<AMIR.91Apr11122647@taux01.nsc.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fc7ee,f72cea7727bfb37c X-Google-Attributes: gidfc7ee,public X-Google-ArrivalTime: 1991-04-11 21:26:53 PST Path: arc1-ca.pugleaf.net!gmdzi!unido!fauern!ira.uka.de!math.lsa.umich.edu!zaphod.mps.ohio-state.edu!wuarchive!m.cs.uiuc.edu!uiucdcs!carroll From: carroll@cs.uiuc.edu (Alan M. Carroll) Newsgroups: gnu.epoch.misc Subject: Re: *-other-screen Message-ID: <1991Apr11.145814.26628@m.cs.uiuc.edu> Date: 11 Apr 91 14:58:14 GMT References: <AMIR.91Apr11122647@taux01.nsc.com> Sender: news@m.cs.uiuc.edu (News Database (admin-Mike Schwager)) Reply-To: carroll@cs.uiuc.edu (Alan M. Carroll) Distribution: gnu Organization: Technophiles Inc. - Engineers with Attitude Lines: 85