🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.epoch.misc
Article #2068

*-other-screen

#2068
From: Pete Ware
Date: Thu, 11 Apr 1991 23:57
101 lines
4353 bytes
I've done the following to allow 'compile and 'next-error to display
the compile error messages in a small window with a yellow background.
I've bound ^C-c to 'my-compile and kept 'compile around to actually do
the work.

--pete
Pete Ware / Biosym / San Diego CA / (619) 546-5532
     email: pete@biosym.com

Our financial, legal, and even physical lives are increasingly
dependent on realities of which we have only the dimmest awareness.
We have entrusted the basic functions of modern existence to
institutions we cannot name, using tools we have never heard of and
could not operate if we had.  -- John P. Barlow, Mar 91, CACM.

----------------------------------------------------------------------
(load-library "compile")
(setq on-xsgi t)
(if on-xsgi
    (progn
      (setq tiny-font-name "*courier-bold-r-*-*-100-*")
      (setq small-font-name "*courier-bold-r-normal--14-100-*")
      (setq normal-font-name "*courier-bold-r-normal--14-100-*")
      (setq large-font-name "*courier-bold-r-*-180-*")
      )
  (setq tiny-font-name "*courier-medium-r-*-100-*")
  (setq small-font-name "*courier-bold-r-*-120-*")
  (setq normal-font-name "*courier-bold-r-*-140-*")
  (setq large-font-name "*courier-bold-r-*-180-*")
  )

(defvar compile-screen nil)
(defun is-screen (screen)
  (and (epoch::screen-p screen) (epoch::xid-of-screen screen)))
(defun my-compile (command)
  (interactive (list (read-string "Compile command: " compile-command)))
  (if running-epoch
      (let ((this-dir default-directory)
	    (attr (list (cons 'font tiny-font-name)
			(cons 'geometry "80x24+745+230")
			(cons 'background "yellow")
			)
		  )
	    )
	;(kill-buffer "*compiliation*")
	(if (not (is-screen compile-screen))
	    (setq compile-screen (create-screen "*compilation*" attr))
	  )
	(epoch::raise-screen compile-screen)
	(save-screen-excursion
	 (epoch::select-screen compile-screen)
	 (cd this-dir)
	 (my-title)
	(compile command))
	)
	(compile command)
    )
  )
(if running-epoch
(defun next-error (&optional argp)
  "Visit next compilation error message and corresponding source code.
This operates on the output from the \\[compile] command.
If all preparsed error messages have been processed,
the error message buffer is checked for new ones.
A non-nil argument (prefix arg, if interactive)
means reparse the error message buffer and start at the first error."
  (interactive "P")
  (if (or (eq compilation-error-list t)
	  argp)
      (progn (compilation-forget-errors)
	     (setq compilation-parsing-end 1)))
  (if compilation-error-list
      nil
    (save-excursion
      (switch-to-buffer "*compilation*")
      (set-buffer-modified-p nil)
      (compilation-parse-errors)))
  (let ((next-error (car compilation-error-list)))
    (if (null next-error)
	(error (concat compilation-error-message
		       (if (and compilation-process
				(eq (process-status compilation-process)
				    'run))
			   " yet" ""))))
    (setq compilation-error-list (cdr compilation-error-list))
    (if (null (car (cdr next-error)))
	nil
      (switch-to-buffer (marker-buffer (car (cdr next-error))))
      (goto-char (car (cdr next-error)))
      (set-marker (car (cdr next-error)) nil))
    (let* ((pop-up-windows nil)
	   (w nil)
	   (old-screen (epoch::current-screen)))
	(epoch::select-screen compile-screen)
	(setq w (display-buffer (marker-buffer (car next-error))))
	(set-window-point w (car next-error))
	(set-window-start w (car next-error))
	(epoch::select-screen old-screen))
    (set-marker (car next-error) nil)))
)
(global-set-key "\^cc"		'my-compile)
Technical Details
Message-ID: <9104112357.AA18425@iris49.biosym.com>
Path: arc1-ca.pugleaf.net!gmdzi!unido!fauern!ira.uka.de!sol.ctr.columbia.edu!spool.mu.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!cis.ohio-state.edu!tut.cis.ohio-state.edu!unreplyable!garbage
References: <1991Apr11.145814.26628@m.cs.uiuc.edu>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fc7ee,f72cea7727bfb37c
X-Google-Attributes: gidfc7ee,public
X-Google-ArrivalTime: 1991-04-12 15:06:37 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!fauern!ira.uka.de!sol.ctr.columbia.edu!spool.mu.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!cis.ohio-state.edu!tut.cis.ohio-state.edu!unreplyable!garbage
From: pete@IRIS49.BIOSYM.COM (Pete Ware)
Newsgroups: gnu.epoch.misc
Subject: *-other-screen
Message-ID: <9104112357.AA18425@iris49.biosym.com>
Date: 11 Apr 91 23:57:14 GMT
References: <1991Apr11.145814.26628@m.cs.uiuc.edu>
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 101