Thread View: gnu.epoch.misc
3 messages
3 total messages
Started by Amir J. Katz (Xpert)
Thu, 11 Apr 1991 09:26
*-other-screen
Author: Amir J. Katz (Xpert)
Date: Thu, 11 Apr 1991 09:26
Date: Thu, 11 Apr 1991 09:26
16 lines
1060 bytes
1060 bytes
Has anyone out there written Epoch versions for 'mail-other-window' so
it will do 'mail-other-screen'? Similarly for 'manual-entry' ?
My lisp/elisp knowledge is NIL and I'm sure someone has done this before.
Pls email to me, using address below, or post to this n.g.
-- Thanks,
--
Amir J. Katz, System Manager
Internet: amir@taux01.nsc.com
UUCP: {decwrl,uunet,...}!nsc!taux01!amir
Phone: +972 52-570713
Fax: +972 52-570719
Snail-mail: Amir J. Katz, Silvaco Israel Ltd.
19 Maskit St., Herzelia, Israel 46733
*-other-screen
Author: Ed Simpson
Date: Thu, 11 Apr 1991 14:00
Date: Thu, 11 Apr 1991 14:00
38 lines
1991 bytes
1991 bytes
It's pretty easy to extend existing code to use other screens. Here
are examples of what I've done. I just yanked the original code (e.g
for find-file-read-only) and added the accessory code to put up a new
screen.
(require 'epoch)
(defun find-alternate-file-other-screen (filename)
"Find file FILENAME in a new screen and kill the previous buffer and screen."
(interactive "FFind alternate file: ")
(and (buffer-modified-p)
(not buffer-read-only)
(not (yes-or-no-p (format "Buffer %s is modified; kill anyway? "
(buffer-name))))
(error "Aborted"))
(let ((obuf (current-buffer))
(ofile buffer-file-name)
(oname (buffer-name))
(oscr (current-screen)))
(rename-buffer " **lose**")
(setq buffer-file-name nil)
(unwind-protect
(progn
(unlock-buffer)
(find-file-other-screen filename))
(cond ((eq obuf (current-buffer))
(setq buffer-file-name ofile)
(lock-buffer)
(rename-buffer oname))))
(kill-buffer obuf)
(delete-screen oscr)))
(defun find-file-other-screen-read-only (filename)
"Edit file FILENAME in another screen but don't save without confirmation.
Like find-file-other-screen but marks buffer as read-only."
(interactive "fFind file read-only: ")
(find-file-other-screen filename)
(setq buffer-read-only t))
Re: *-other-screen
Author: 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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads