🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

2 total messages Started by Bruce Cohen Wed, 07 Aug 1991 23:35
Help with modifying how auto-raise works
#1834
Author: Bruce Cohen
Date: Wed, 07 Aug 1991 23:35
23 lines
1932 bytes
I don't like auto-raise, so I set the variable auto-raise-screen to nil
in my .emacs file.  On the other hand, I would like to have
find-file-other-screen, which is what I normally use to popup new or old
screens with files in them, automatically raise the screen with the file
I named in it.  Right now, with auto-raise-screen nil, if there is
already a screen with that file in it, the mouse is warped to be over
the screen, but the screen is not raised.  If the screen is covered,
this can be less than helpful, in fact rather confusing.  I typically
keep many screens around, so this is important to efficiently dealing
with my display.

I tried installing a new focus handler which looks at a different
variable, so there would be separate focus and lisp-code-invoked raise
policies.  This seemed to have no effect on the operation of either the
focus events or the lisp code.  I really don't have time just now to get
deeply into the screen-handling code in epoch.el.  If anyone out there
can give me a pointer to how to deal with this, I'd appreciate it.
--
------------------------------------------------------------------------
Speaker-to-managers, aka
Bruce Cohen, Computer Research Lab        email: brucec@crl.labs.tek.com
Tektronix Laboratories, Tektronix, Inc.                phone: (503)627-5241
M/S 50-662, P.O. Box 500, Beaverton, OR  97077
Re: Help with modifying how auto-raise works
#1836
Author: 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
--
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