🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.epoch.misc
Article #1836

Re: Help with modifying how auto-raise works

#1836
From: Doug Hahn
Date: Thu, 08 Aug 1991 13:25
42 lines
2135 bytes
for finding files, other screen, I use

(defun make-file-window (name)
  "Prompts for a file or directory name and opens a screen on that file.
  The name may be non-existent."
  (interactive "FInsert file name: ")
  (let ((win (epoch::get-buffer-window (find-file-noselect name))))
    (if win
	(select-screen (epoch::screen-of-window win))
	  ;; else 
	(select-screen 
	   (create-screen 
	    "*scratch*"
	    (list (cons 'title (file-name-nondirectory name))
	          (cons 'background "DarkGreen")
		  (cons 'cursor-color "yellow")
		  (cons 'cursor-foreground "yellow")
		  (cons 'cursor-background "black")
		  (cons 'foreground "PaleGreen")
		  (cons 'icon-name (file-name-nondirectory name))
		  (cons 'initial-state nil)
		  (cons 'geometry "80x26")))))
    (find-file name)
    (sit-for 0)
    (warp-mouse 40 10 (current-screen))
    (epoch::mapraised-screen (current-screen))
    ))

the advantage being, if a file is already in a buffer somewhere,
another window is not opened.
the key line regarding bruces question is
    (epoch::mapraised-screen (current-screen))
to raise the window.
Now that I notice it, the properties are really sort of a hack left
over from playing with different screen colors... I think I can take
those out now...

  -- Doug
--
 | Doug Hahn, CRL, Tektronix, PO Box 500/MS 50-662, Beaverton, OR 97077
 | (503) 627-6419    ...!tektronix!crl.labs!hahn  hahn@crl.labs.tek.com
--
Technical Details
Message-ID: <HAHN.91Aug8062559@sunshine.labs.tek.com>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!zephyr.ens.tek.com!crl!tekcrl!hahn
References: <BRUCEC.91Aug7163502@phoebus.labs.tek.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fc7ee,5f9ffd4569a547eb
X-Google-Attributes: gidfc7ee,public
X-Google-ArrivalTime: 1991-08-08 09:18:11 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!zephyr.ens.tek.com!crl!tekcrl!hahn
From: hahn@sunshine.labs.tek.com (Doug Hahn)
Newsgroups: gnu.epoch.misc
Subject: Re: Help with modifying how auto-raise works
Message-ID: <HAHN.91Aug8062559@sunshine.labs.tek.com>
Date: 8 Aug 91 13:25:59 GMT
References: <BRUCEC.91Aug7163502@phoebus.labs.tek.com>
Sender: news@crl.LABS.TEK.COM
Organization: Computer Research Lab, Tektronix Inc.
Lines: 42
In-reply-to: brucec@phoebus.labs.tek.com's message of 7 Aug 91 23:35:02 GMT