home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!charon.amdahl.com!pacbell.com!ames!agate!apple!apple!cambridge.apple.com!cartier@math.uqam.ca
- From: cartier@math.uqam.ca (Guillaume Cartier)
- Newsgroups: comp.lang.lisp.mcl
- Subject: Printing Blues (was "printing .lisp files")
- Message-ID: <9211172038.AA05436@mipsmath.math.uqam.ca>
- Date: 17 Nov 92 20:38:44 GMT
- Sender: info-mcl-request@cambridge.apple.com
- Lines: 41
- Approved: comp.lang.lisp.mcl@Cambridge.Apple.C0M
- Original-To: bright@ENH.NIST.GOV
- X-Sender: cartier@mipsmath.math.uqam.ca
- Original-Cc: info-mcl@cambridge.apple.com (Macintosh Common Lisp)
-
- <---
- | When I print my .lisp files (in Fred Windows), they print with a header
- | that has the file name, date, page number. When the path to the file is
- | long, the header gets garbled by overprinting. Anyone know how to make the
- | header print out on more than one line so that all of the info is readable?
- --->
-
-
- Here's a very simple hack I use daily.
- The file name in the header will be truncated to only the file namestring.
-
- It should be simple to adapt to your own preferences
- (i.e. truncating file names longer than 50 chars, etc...).
-
- To understand the hack, look at the source for the draw-hardcopy method.
-
-
- (in-package "CCL")
-
- (defvar *hardcopying*
- nil)
-
- (advise (:method draw-hardcopy (fred-window))
- (let ((*hardcopying* t))
- (:do-it))
- :when :around
- :name :hardcopy-header)
-
- (advise namestring
- (if (not *hardcopying*)
- (:do-it)
- (mac-file-namestring (:do-it)))
- :when :around
- :name :hardcopy-header)
-
- *********************************************************************
- * Guillaume Cartier (514) 844-5294 (maison) *
- * L.A.C.I.M. (514) 987-4290 (bureau) *
- * Universite du Quebec a Montreal (514) 987-8477 (telecopieur) *
- * Montreal, Quebec, Canada cartier@math.uqam.ca (internet) *
- *********************************************************************
-