🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.epoch.misc
Article #2185

Re: shrink/enlarge window bug

#2185
From: Anthony Mutiso
Date: Fri, 15 Feb 1991 18:18
62 lines
3251 bytes
>>>>> On 14 Feb 91 16:47:42 GMT, derge@crd.ge.com (Gillmer J. Derge) said:


Gillmer> Invoking shrink-window or enlarge-window when only one window
Gillmer> exists causes epoch to bomb.  This does no happen in emacs
Gillmer> version 18.55.  I suspect it has to do with the somewhat
Gillmer> different handling of the minibufer as a window, but that's a
Gillmer> guess.  Is there a patch to fix this?

Indeed I have experienced the bug as well and write the following
elisp hack to over come it for the time being.

-------------
(defvar resize-screen-on-window-size-change t
  "*Non nil means resize window dimentions on window size change.")

(if (not (functionp 'GNUemacs::shrink-window))
    (fset 'GNUemacs::shrink-window (symbol-function 'shrink-window)))

(defun shrink-screen-window (arg &optional lr)
  "Make current window ARG lines smaller.
From program, optional second arg non-nil means shrink sideways ARG columns."
  (interactive "p")
  (if (and (interactive-p) (not (numberp arg))) (setq arg 1))
  (if (and (not (one-window-p))
          (>= (- (if lr (screen-width) (screen-height))
                 (if lr (window-width) (window-height))
                 arg)
              0))
      (GNUemacs::shrink-window arg)
    (if resize-screen-on-window-size-change
        (if lr
            (epoch::change-screen-size (- (epoch::screen-width) arg) (epoch::scr
een-height))
            (epoch::change-screen-size (epoch::screen-width) (- (epoch::screen-h
eight) arg))))))

(defun enlarge-screen-window (arg &optional lr)
  "Make current window ARG lines smaller.
From program, optional second arg non-nil means enlarge sideways ARG columns."
  (interactive "p")
  (if (and (interactive-p) (not (numberp arg))) (setq arg 1))
  (if (and (not (one-window-p))
           (>= (- (if lr (screen-width) (screen-height))
                  (if lr (window-width) (window-height))
                  arg)
               0))
      (GNUemacs::enlarge-window arg)
    (if resize-screen-on-window-size-change
        (if lr
            (epoch::change-screen-size (+ (epoch::screen-width) arg) (epoch::scr
een-height))
            (epoch::change-screen-size (epoch::screen-width) (+ (epoch::screen-h
eight) arg))))))
----------------

I load the elisp in an (if (boundp 'epoch::version) (load <file>)) in
my .emacs

Anthony
--
Anthony Mutiso (anthony@cs.ualberta.ca)                Life-motto: Logic Rules.
Technical Details
Message-ID: <ANTHONY.91Feb15131846@bellis.cs.UAlberta.CA>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!bonnie.concordia.ca!ccu.umanitoba.ca!herald.usask.ca!alberta!anthony
References: <16767@crdgw1.crd.ge.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fc7ee,2c8da75f8b9c4646,start
X-Google-Attributes: gidfc7ee,public
X-Google-ArrivalTime: 1991-02-15 17:06:20 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!bonnie.concordia.ca!ccu.umanitoba.ca!herald.usask.ca!alberta!anthony
From: anthony@cs.UAlberta.CA (Anthony Mutiso)
Newsgroups: gnu.epoch.misc
Subject: Re: shrink/enlarge window bug
Message-ID: <ANTHONY.91Feb15131846@bellis.cs.UAlberta.CA>
Date: 15 Feb 91 18:18:46 GMT
References: <16767@crdgw1.crd.ge.com>
Sender: news@cs.UAlberta.CA
Distribution: gnu
Organization: Computing Science, U. of Alberta. Edmonton, Alberta. CANADA
Lines: 62
In-Reply-To: derge@crd.ge.com's message of 14 Feb 91 16:47:42 GMT
X-Zippy: Will the third world war keep ``Bosom Buddies'' off the air?