🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.bug
Article #99275

Re: suggestion for improvement

#99275
From: Jeff Peck
Date: Fri, 05 Oct 1990 21:01
33 lines
2053 bytes
>I use gnu emacs on a mouse-and-window workstation, and I doubt
>my suggestion makes sense for other environments, but here
>it is anyway...
>
>I think it would be nice to be able to enlarge and shrink
>emacs windows by dragging the window sash up and down.

Here's a simple prototype for emacstool.
with these bindings, boink a modeline with the middle button,
then move the mouse to where you want the modeline to be, 
and let up the middle button.

If you care to get mouse "drag" events, rather than just button events,
and you can repaint real fast, you could make the modline follow/track the
mouse [left as an exercise for the reader...]

(defvar *modeline-hit* nil "store original modline-hit data")

(defun modeline-hit (w x y) (interactive)
  (setq *modeline-hit* (cons w (caddr hit))))

(defun mouse-drag-modeline (w x y) (interactive)
  "move previously hit modeline to where mouse is now."
  (if *modeline-hit*
      (let ((delta (- (cdr *modeline-hit*) (caddr hit)))
	    (win (car *modeline-hit*)))
	(setq *modeline-hit* nil)
	(eval-in-window win (shrink-window delta)))))

(global-set-mouse '(modeline      middle)	'modeline-hit)
(global-set-mouse '(modeline   up middle)	'mouse-drag-modeline)
(global-set-mouse '(text       up middle)	'mouse-drag-modeline)
(global-set-mouse '(minibuffer up middle)	'mouse-drag-modeline)
Technical Details
Message-ID: <9010052101.AA05249@denali.Eng.Sun.COM>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!world!decwrl!sdd.hp.com!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!tut.cis.ohio-state.edu!eng.sun.com!peck
References: <9010041248.AA25210@osf.osf.org>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fb2f1,821f25981bd1d2ad
X-Google-Attributes: gidfb2f1,public
X-Google-ArrivalTime: 1990-10-05 21:03:27 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!world!decwrl!sdd.hp.com!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!tut.cis.ohio-state.edu!eng.sun.com!peck
From: peck@eng.sun.com (Jeff Peck)
Newsgroups: gnu.emacs.bug
Subject: Re: suggestion for improvement
Message-ID: <9010052101.AA05249@denali.Eng.Sun.COM>
Date: 5 Oct 90 21:01:17 GMT
References: <9010041248.AA25210@osf.osf.org>
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 33
Posted: Fri Oct  5 22:01:17 1990