From owner-ntemacs-users@june  Tue Jan 21 10:15:55 1997
X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil]
	[nil "Tue" "21" "January" "1997" "12:26:12" "-0400" "Paul Koning" "Paul_Koning@3mail.3com.com" nil "83" "Re: printing, win95, network printer" "^From:" nil nil "1" nil nil nil nil]
	nil)
Received: from joker.cs.washington.edu (joker.cs.washington.edu [128.95.1.42]) by june.cs.washington.edu (8.8.3+CSE/7.2ju) with SMTP id KAA22142 for <voelker@june.cs.washington.edu>; Tue, 21 Jan 1997 10:15:54 -0800
Received: from june.cs.washington.edu (june.cs.washington.edu [128.95.1.4]) by joker.cs.washington.edu (8.6.12/7.2ws+) with ESMTP id KAA25713 for <voelker@joker.cs.washington.edu>; Tue, 21 Jan 1997 10:15:52 -0800
Received: from custmail.InterNex.Net (custmail.internex.net [199.2.14.213]) by june.cs.washington.edu (8.8.3+CSE/7.2ju) with ESMTP id JAA17859 for <ntemacs-users@cs.washington.edu>; Tue, 21 Jan 1997 09:28:38 -0800
Received: from cixgate ([192.156.136.10]) by custmail.InterNex.Net (8.7.1/8.7.1) with SMTP id JAA13355; Tue, 21 Jan 1997 09:21:52 -0800 (PST)
Received: from gw.3Com.COM by cixgate (4.1/SMI-4.1/3com-cixgate-GCA-931027-01) 	id AA01224; Tue, 21 Jan 97 09:35:46 PST
Received: from hqoutbound.OPS.3Com.COM by gw.3Com.COM with SMTP id AA19631   (5.65c/IDA-1.4.4); Tue, 21 Jan 1997 08:59:06 -0800
Received: by hqoutbound.ops.3com.com(Lotus SMTP MTA v1.05 (274.9 11-27-1996))  id 88256426.005FE478 ; Tue, 21 Jan 1997 09:27:24 -0700
X-Lotus-Fromdomain: 3COM
Message-Id: <85256426.005F8237.00@hqoutbound.ops.3com.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
From: Paul_Koning@3mail.3Com.COM
To: haack@s1001.den.mmc.com
Cc: ntemacs-users@cs.washington.edu
Subject: Re: printing, win95, network printer
Date: Tue, 21 Jan 1997 12:26:12 -0400





>I still can't print from ntemacs.  I'm running Win95, the printer is on
>the network.  I'm using the method (as outlined by others on this mailing
list)
>where I copy a file to the network printer.

I find it easier not to go via a spool file or COPY command at all,
but rather to have Emacs write directly to the printer.  Here's the
relevant
Elisp code.  Note "w95-lpr-buffer"...

     paul

;;; w95-ps-print

(require 'ps-print)
(defvar w95-lpr-buffer "\\\\chips1\\syseng"
  "*Printer to use for PostScript print functions.")

(defun w95-ps-print-buffer-with-faces ()
  "Generate and print a PostScript image of the buffer.

The printout is sent to the printer specified by variable
w95-lpr-buffer (by default \\\\chips1\\syseng).  If the current
buffer has font lock active, comments are printed in italics,
and keywords are bold."
  (interactive)
  (ps-print-buffer-with-faces w95-lpr-buffer)
)

(defun w95-ps-print-file-list (flist)
  "Generate and print a PostScript image of a list of files."
  (let ((filebuf (generate-new-buffer "*PrintBuffer*")))
    (save-excursion
      (mapcar 'w95-spool-file flist)
      (ps-despool w95-lpr-buffer))
    (kill-buffer filebuf)))

(defun w95-ps-print-cmdline ()
  "Print the files specified in the command line."
  (setq ps-razzle-dazzle nil)
  (w95-ps-print-file-list command-line-args-left)
  (setq command-line-args-left ()))

(defun w95-spool-file (filename)
  (setq filename (expand-file-name filename))
  (let ((fname (file-name-nondirectory filename))
     (fdir (file-name-directory filename)))
    (set-buffer filebuf)
    (make-variable-buffer-local 'ps-left-header)
    (setq ps-left-header (list 'fname 'fdir))
    (insert-file-contents filename)
    (ps-spool-buffer)
    (set-buffer filebuf)
    (erase-buffer)))

(defun w95-ps-print-file (filename)
  "Generate and print a PostScript image of a given file."
  (interactive "fFile to print: ")
  (w95-ps-print-file-list (list filename)))

(defun w95-ps-print-region-with-faces (from to)
  "Generate and print a PostScript image of the current region.

The printout is sent to the printer specified by variable
w95-lpr-buffer (by default \\\\chips1\\syseng).  If the current
buffer has font lock active, comments are printed in italics,
and keywords are bold."
  (interactive "r")
  (ps-print-region-with-faces from to w95-lpr-buffer)
)

(put 'w95-ps-print-region-with-faces 'menu-enable 'mark-active)

(setq ps-print-color-p nil)              ; disable color printing
(setq ps-bold-faces '(font-lock-keyword-face))
(setq ps-italic-faces '(font-lock-comment-face))

(provide 'w95-ps-print)


From owner-ntemacs-users@june  Tue Jan 21 09:01:25 1997
X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil]
	[nil "Tue" "21" "January" "1997" "08:50:14" "-0600" "Brad Haack" "haack@s1001.den.mmc.com" nil "28" "printing, win95, network printer" "^From:" nil nil "1" nil nil nil nil]
	nil)
Received: from joker.cs.washington.edu (joker.cs.washington.edu [128.95.1.42]) by june.cs.washington.edu (8.8.3+CSE/7.2ju) with SMTP id JAA15641 for <voelker@june.cs.washington.edu>; Tue, 21 Jan 1997 09:01:25 -0800
Received: from june.cs.washington.edu (june.cs.washington.edu [128.95.1.4]) by joker.cs.washington.edu (8.6.12/7.2ws+) with ESMTP id JAA21281 for <voelker@joker.cs.washington.edu>; Tue, 21 Jan 1997 09:01:23 -0800
Received: from everest.den.mmc.com (everest.den.mmc.com [160.205.27.1]) by june.cs.washington.edu (8.8.3+CSE/7.2ju) with ESMTP id IAA11773 for <ntemacs-users@cs.washington.edu>; Tue, 21 Jan 1997 08:05:39 -0800
Received: from s0101.den.mmc.com (s0101.ast.lmco.com [160.205.6.1]) by everest.den.mmc.com (8.7.5/8.7.3) with SMTP id JAA01546 for <ntemacs-users@cs.washington.edu>; Tue, 21 Jan 1997 09:05:34 -0700 (MST)
Received: by s0101.den.mmc.com 	(1.38.193.4/16.2) id AA06516; Tue, 21 Jan 1997 09:05:32 -0700
Message-Id: <Pine.3.87.9701210814.A6434-0100000@s0101.den.mmc.com>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
From: Brad Haack <haack@s1001.den.mmc.com>
To: ntemacs-users@cs.washington.edu
Subject: printing, win95, network printer
Date: Tue, 21 Jan 1997 08:50:14 -0600 (MDT)

I still can't print from ntemacs.  I'm running Win95, the printer is on
the network.  I'm using the method (as outlined by others on this mailing
list) where I copy a file to the network printer.  Occasionally it will
work, usually it crashes the PC (something about a dev driver corrupting
system memory).  I've tried 2 different printer drivers.  Other programs
can print just fine (word, netscape, notepad). 

Any ideas?

I'm using the following to print: (from Douglas Stephens)

(setq ps-lpr-buffer "c:\\temp\\psspool.ps")       ; a tmp spool file
;;(setq ps-lpr-switches "\\\\Flight_systems\\ssb_409oa_hp_laserjet_4si") 
(setq ps-lpr-switches "\\\\Flight_systems\\ssb_411_hp5si_msp ") 
                                        ; the printer name

;; Modified as no "print" command on my Windows-95 machine
(defun nt-ps-print-buffer-with-faces ()
  (interactive)
  (ps-print-buffer-with-faces ps-lpr-buffer)
  (shell-command
   (apply 'concat (list "copy" " " ps-lpr-buffer " " ps-lpr-switches)
	  ))
)

Brad Haack
haack@ast.lmco.com


From owner-ntemacs-users@june  Thu Jan 16 14:06:12 1997
X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil]
	[nil "Thu" "16" "January" "1997" "18:51:07" "+0000" "Brian Raven" "ntemacs@oskar.demon.co.uk" nil "48" "Re: Printing and shell-command" "^From:" nil nil "1" nil nil nil nil]
	nil)
Received: from joker.cs.washington.edu (joker.cs.washington.edu [128.95.1.42]) by june.cs.washington.edu (8.8.3+CSE/7.2ju) with SMTP id OAA27993 for <voelker@june.cs.washington.edu>; Thu, 16 Jan 1997 14:06:12 -0800
Received: from june.cs.washington.edu (june.cs.washington.edu [128.95.1.4]) by joker.cs.washington.edu (8.6.12/7.2ws+) with ESMTP id OAA24713 for <voelker@joker.cs.washington.edu>; Thu, 16 Jan 1997 14:06:06 -0800
Received: from relay-7.mail.demon.net (relay-7.mail.demon.net [194.217.242.9]) by june.cs.washington.edu (8.8.3+CSE/7.2ju) with SMTP id NAA22558 for <ntemacs-users@cs.washington.edu>; Thu, 16 Jan 1997 13:11:10 -0800
Received: from oskar.demon.co.uk ([158.152.9.154]) by relay-6.mail.demon.net            id aa627223; 16 Jan 97 18:48 GMT
Message-ID: <PmRfbGAbin3yEw7W@oskar.demon.co.uk>
In-Reply-To: <01BC039B.78857E40@Jenpc04.syspace.co.uk>
MIME-Version: 1.0
X-Mailer: Turnpike Version 1.10 <j4YYRroGRJkKpcaeL+Wct7Svyf>
From: Brian Raven <ntemacs@oskar.demon.co.uk>
To: "'ntemacs-users@cs.washington.edu'" <ntemacs-users@cs.washington.edu>
Subject: Re: Printing and shell-command
Date: Thu, 16 Jan 1997 18:51:07 +0000

The following is from my _emacs file, and works fine for me so far
(NT3.51). It has the advantage of not executing external programs (which
may not be an advantage for everybody). Perhaps I am missing something,
but as NT lets me copy files to my postscript printer, it seemed
reasonable to ask emacs to do the same.
I would appreciate any comments, particularly if there is a simpler way
to write a single character to a file (or device).

--------------------------------------------------------------
(require 'ps-print)
(setq ps-paper-type 'ps-a4)
(setq ps-print-color-p nil)


(setq bfr-ps-printer "\\\\CHERYL'S\\OPERATIONS")
(defun bfr-end-of-print-job (arg)
  "Write C-d to printer (specified by arg) to signify end of job"
  (save-excursion
    (setq ps-spool-buffer (get-buffer-create ps-spool-buffer-name))
    (set-buffer ps-spool-buffer)
    (goto-char (point-max))
    (insert "\C-d")
    (write-region (1- (point-max)) (point-max) arg)
    (kill-buffer ps-spool-buffer)))
  
(defun bfr-ps-print-buffer-with-faces ()
  "*My effort at print buffer with faces for NT, writing direct to
printer"
  (interactive)
  (ps-print-buffer-with-faces bfr-ps-printer)
  (bfr-end-of-print-job bfr-ps-printer))

(defun bfr-ps-print-region-with-faces (from to)
  "*My effort at pring region with faces for NT, writing direct to
printer"
  (interactive "r")
  (ps-print-region-with-faces from to bfr-ps-printer)
  (bfr-end-of-print-job bfr-ps-printer))

(global-set-key [menu-bar tools ps-print-buffer]
                '("Postscript Print Buffer" . bfr-ps-print-buffer-with-
faces))
(global-set-key [menu-bar tools ps-print-region]
                '("Postscript Print Region" . bfr-ps-print-region-with-
faces))

-- 
Brian Raven

From owner-ntemacs-users@june  Thu Jan 16 10:28:18 1997
X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil]
	[nil "Thu" "16" "January" "1997" "18:17:48" "+0100" "William Sobel" "will@nj.rpsi.com" nil "46" "Re:Printing-and-shell-command" "^From:" nil nil "1" nil nil nil nil]
	nil)
Received: from joker.cs.washington.edu (joker.cs.washington.edu [128.95.1.42]) by june.cs.washington.edu (8.8.3+CSE/7.2ju) with SMTP id KAA04967 for <voelker@june.cs.washington.edu>; Thu, 16 Jan 1997 10:28:17 -0800
Received: from june.cs.washington.edu (june.cs.washington.edu [128.95.1.4]) by joker.cs.washington.edu (8.6.12/7.2ws+) with ESMTP id KAA29549 for <voelker@joker.cs.washington.edu>; Thu, 16 Jan 1997 10:28:15 -0800
Received: from edison.nj.rpsi.com ([38.232.46.130]) by june.cs.washington.edu (8.8.3+CSE/7.2ju) with SMTP id JAA01162 for <ntemacs-users@cs.washington.edu>; Thu, 16 Jan 1997 09:49:57 -0800
Received: by edison.nj.rpsi.com from localhost     (router,SLmailNT V2.0); Thu, 16 Jan 1997 12:18:41 Eastern Standard Time
Received: by edison.nj.rpsi.com from corneille.nj.rpsi.com     (38.232.46.136::mail daemon; unverified,SLmailNT V2.0); Thu, 16 Jan 1997 12:18:40 Eastern Standard Time
Message-ID: <32DE62BB.6FBA@nj.rpsi.com>
Reply-To: "William Sobel" <will@nj.rpsi.com>
Organization: Redpoint Software, Inc.
X-Mailer: Mozilla 3.0Gold (Win95; I)
MIME-Version: 1.0
References: <01BC039B.78857E40@Jenpc04.syspace.co.uk> <199701161418.IAA29894@mocha>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
From: "William Sobel" <will@nj.rpsi.com>
To: ntemacs-users@cs.washington.edu
Subject: Re:Printing-and-shell-command
Date: Thu, 16 Jan 1997 18:17:48 +0100

I have found that the following works better on my machine. Both
text and ps work without a problem. The problem I had with 
shell-command is that our printer is named "Edison HP". This
name can not be passed to shell-command without it requoting
the args and messing up the printer name. I found that call-process
did the quoting the way I wanted it to and passed the arguments to 
lpr.exe (part of NT, it just does not work with stdin as in UNIX)

-----------------------------------------
(defun print-lpr-buffer ()
  (apply 'call-process lpr-command nil nil nil
	 (append lpr-switches (list txt-lpr-buffer)))
  (delete-file txt-lpr-buffer)
)


(defun ps-print-lpr-buffer ()
  (apply 'call-process ps-lpr-command nil nil nil
	 (append ps-lpr-switches (list ps-lpr-buffer)))
  (delete-file ps-lpr-buffer)
)
------------------------------------------

I have also included my the lpr command and lpr flags to be used.

-----------------------------------------
;; Printing
(require 'nt-print)

(setq lpr-command "lpr.exe")
(setq ps-lpr-command lpr-command)
(setq lpr-switches '("-S" "edison" "-P" "Edison HP"))
(setq ps-lpr-switches (append lpr-switches '("-o" "l")))
------------------------------------------


Hope this helps.

Will

-- 

*    William Sobel               Redpoint Software, Inc.      *
*    SVP Technology              110 Fieldcrest Ave.          *
*    http://www.rpsi.com/        Raritan Center I, 4th Floor  *
*    will@nj.rpsi.com            Edison, NJ 08837             *

From owner-ntemacs-users@june  Thu Jan 16 06:52:09 1997
X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil]
	[nil "Thu" "16" "January" "1997" "08:18:07" "-0600" "Douglas Gray Stephens" "gray@austin.apc.slb.com" nil "76" "" "^From:" nil nil "1" nil nil nil nil]
	nil)
Received: from joker.cs.washington.edu (joker.cs.washington.edu [128.95.1.42]) by june.cs.washington.edu (8.8.3+CSE/7.2ju) with SMTP id GAA20038 for <voelker@june.cs.washington.edu>; Thu, 16 Jan 1997 06:52:09 -0800
Received: from june.cs.washington.edu (june.cs.washington.edu [128.95.1.4]) by joker.cs.washington.edu (8.6.12/7.2ws+) with ESMTP id GAA33518 for <voelker@joker.cs.washington.edu>; Thu, 16 Jan 1997 06:51:59 -0800
Received: from austin.asc.slb.com (PIGPEN-CLEAR.AUSTIN.ASC.SLB.COM [163.185.74.6]) by june.cs.washington.edu (8.8.3+CSE/7.2ju) with SMTP id GAA18230 for <ntemacs-users@cs.washington.edu>; Thu, 16 Jan 1997 06:18:50 -0800
Received: from mocha (MOCHA.AUSTIN.ASC.SLB.COM) by austin.asc.slb.com (4.1/relay.951226a) 	id AA16524 for <ntemacs-users@cs.washington.edu>; Thu, 16 Jan 97 08:18:36 CST
Received: from ICE-APC.austin.apc.slb.com by mocha (SMI-8.6/client.nfs.930922a) 	id IAA29894; Thu, 16 Jan 1997 08:18:07 -0600
Message-Id: <199701161418.IAA29894@mocha>
X-Mailer: emacs 19.33.1 (via feedmail 3 I) 
In-Reply-To: <01BC039B.78857E40@Jenpc04.syspace.co.uk> (John.Goodenough@jennic.co.uk)
References: <01BC039B.78857E40@Jenpc04.syspace.co.uk>
From: gray@austin.apc.slb.com (Douglas Gray Stephens)
To: ntemacs-users@cs.washington.edu
Cc: Subject:Re:Printing-and-shell-command@austin.apc.slb.com
Date: Thu, 16 Jan 1997 08:18:07 -0600


John,

I'm not sure if this reply is still in the archives, but there is some
information in the NT Emacs FAQ at
 http://www.cs.washington.edu/homes/voelker/ntemacs.html#printing

My ~/.emacs file includes:
 
;; Fri 06-Sep-1996; Douglas Gray Stephens 
;;  Printing on PC based on information in
;;   http://www.cs.washington.edu/homes/voelker/ntemacs/contrib/printing2.txt
(require 'ps-print)

(setq ps-paper-type 'ps-letter)

(setq ps-lpr-buffer (concat (getenv "TEMP") "\\psspool.ps")) ; a tmp spool file

;; Windows 95 (setq ps-lpr-switches "\\\\vader\\flj2") ; the printer name
;; Windows 95 (defun nt-ps-print-buffer-with-faces ()
;; Windows 95   (interactive)
;; Windows 95   (ps-print-buffer-with-faces ps-lpr-buffer)
;; Windows 95   (shell-command
;; Windows 95    (apply 'concat (list "copy" " " ps-lpr-buffer " " ps-lpr-switches)
;; Windows 95 	  ))
;; Windows 95 )
;; Windows 95 (defun nt-ps-print-region-with-faces (from to)
;; Windows 95   (interactive (list (point) (mark)))
;; Windows 95   (ps-print-region-with-faces from to ps-lpr-buffer)
;; Windows 95   (shell-command
;; Windows 95    (apply 'concat (list "copy" " " ps-lpr-buffer " " ps-lpr-switches)
;; Windows 95 	  ))
;; Windows 95 )

;; NT setup
(setq ps-lpr-switches '("/D:\\\\VADER\\FLJ2")) ; the printer name
(setq ps-lpr-command "print")

(defun nt-ps-print-buffer-with-faces ()
  (interactive)
  (nt-ps-print-region-with-faces (point-min) (point-max))
)

;; DGS function
(defun nt-ps-print-region-with-faces (from to)
  (interactive (list (point) (mark)))
  (ps-print-region-with-faces from to ps-lpr-buffer)
  (shell-command
   (apply 'concat (append (list ps-lpr-command " ")
                          ps-lpr-switches
                          (list " " ps-lpr-buffer))))
)

;; Define a keystroke to print buffer and region
;;(define-key global-map "\C-cp" 'nt-ps-print-buffer-with-faces)
(define-key global-map [f12]  'nt-ps-print-buffer-with-faces)
(define-key global-map [\C-f12]  'nt-ps-print-region-with-faces)


I hope that this helps you to get printing working.

Douglas.

-- 

================================
Douglas GRAY STEPHENS        
Schlumberger Austin Product Centre,
8311 North FM 620,
AUSTIN,
TX 78726

Phone +1 512 331 3717
Fax   +1 512 331 3760
Email DGrayStephens@slb.com
================================

From owner-ntemacs-users@june  Thu Jan 16 03:39:39 1997
X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil]
	[nil "Thu" "16" "January" "1997" "10:53:12" "-0000" "John Goodenough" "John.Goodenough@jennic.co.uk" nil "41" "Printing and shell-command" "^From:" nil nil "1" nil nil nil nil]
	nil)
Received: from joker.cs.washington.edu (joker.cs.washington.edu [128.95.1.42]) by june.cs.washington.edu (8.8.3+CSE/7.2ju) with SMTP id DAA14070 for <voelker@june.cs.washington.edu>; Thu, 16 Jan 1997 03:39:39 -0800
Received: from june.cs.washington.edu (june.cs.washington.edu [128.95.1.4]) by joker.cs.washington.edu (8.6.12/7.2ws+) with ESMTP id DAA30862 for <voelker@joker.cs.washington.edu>; Thu, 16 Jan 1997 03:39:25 -0800
Received: from sygnet.syspace.co.uk ([194.201.67.3]) by june.cs.washington.edu (8.8.3+CSE/7.2ju) with ESMTP id CAA13123 for <ntemacs-users@cs.washington.edu>; Thu, 16 Jan 1997 02:58:22 -0800
Received: from jenpc01.jennic.co.uk ([194.201.67.134])           by sygnet.syspace.co.uk (Netscape Mail Server v2.0) with ESMTP           id AAA24964 for <ntemacs-users@cs.washington.edu>;           Thu, 16 Jan 1997 10:56:39 +0100
Received: from Jenpc04.syspace.co.uk ([194.201.67.137])           by jenpc01.jennic.co.uk (post.office MTA v2.0 0813 ID# 0-0U10)           with SMTP id AAA210 for <ntemacs-users@cs.washington.edu>;           Thu, 16 Jan 1997 10:55:29 +0000
Received: by Jenpc04.syspace.co.uk with Microsoft Mail 	id <01BC039B.78857E40@Jenpc04.syspace.co.uk>; Thu, 16 Jan 1997 10:53:13 -0000
Message-ID: <01BC039B.78857E40@Jenpc04.syspace.co.uk>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
From: John.Goodenough@jennic.co.uk (John Goodenough)
To: "'ntemacs-users@cs.washington.edu'" <ntemacs-users@cs.washington.edu>
Subject: Printing and shell-command
Date: Thu, 16 Jan 1997 10:53:12 -0000

Hi,

  I have been trying to get Printing to work with NT and emacs. I have =
now got as far as producing a nice postscript spool file and I can even
  print this from an NT command window using print. I can also start a =
shell window up in Emacs and get it to print from there. What doesn't =
seem to work
  is the lisp function (shell-command). Which just does nothing. I am =
using the following code and have checked all the variable values and =
the value of t-var
  and hence what is being used as argument for shell-command is

 "print /d:\\\\jenpc01\\jenprt01 c:\\temp\\psspool.ps"

If I type the following in an command window print /d:\\jenpc01\jenprt01 =
c:\temp\psspool.ps it prints OK, also if I do M-x shell and then type =
into emacs shell window.

Here is the function which is asserting shell-command

(defun ps-print-lpr-buffer ()
	(shell-command
   (apply 'concat (append (list ps-lpr-command " /d:")
                          ps-lpr-destination
                          (list " " ps-lpr-buffer))))
 (setq t-var (apply 'concat (append (list ps-lpr-command " /d:")
                          ps-lpr-destination
                          (list " " ps-lpr-buffer))))
(print t-var)
       ; remove comment to get spool file to dissappear
	;(delete-file  ps-lpr-buffer)
)

Do I need to set any more variables to control the shell? If so its a =
bit weird that I can go M-x shell and get a shell window up OK.
Note also that M-x shell-command doesn't work properly at all.

Thanks

jg


From owner-ntemacs-users@june  Wed Jan 15 14:10:38 1997
X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil]
	[nil "Wed" "15" "January" "1997" "13:32:14" "-0800" "Nick Silberstein" "nick@fusioni.com" nil "28" "Re: Printing" "^From:" nil nil "1" nil nil nil nil]
	nil)
Received: from joker.cs.washington.edu (joker.cs.washington.edu [128.95.1.42]) by june.cs.washington.edu (8.8.3+CSE/7.2ju) with SMTP id OAA25894 for <voelker@june.cs.washington.edu>; Wed, 15 Jan 1997 14:10:38 -0800
Received: from june.cs.washington.edu (june.cs.washington.edu [128.95.1.4]) by joker.cs.washington.edu (8.6.12/7.2ws+) with ESMTP id OAA30534 for <voelker@joker.cs.washington.edu>; Wed, 15 Jan 1997 14:10:32 -0800
Received: from rainier.tpdinc.com (rainier.tpdinc.com [206.136.148.3]) by june.cs.washington.edu (8.8.3+CSE/7.2ju) with ESMTP id NAA22676 for <ntemacs-users@cs.washington.edu>; Wed, 15 Jan 1997 13:33:11 -0800
Received: from orcas.tpdinc.com by rainier.tpdinc.com (8.7.5/TPD-Sendmail-2.0-072396) 	id NAA04669; Wed, 15 Jan 1997 13:34:43 -0800 (PST)
Message-Id: <3.0.32.19970115133214.006d13e4@mail.tpdinc.com>
X-Sender: nick@mail.tpdinc.com
X-Mailer: Windows Eudora Pro Version 3.0 (32)
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
From: Nick Silberstein <nick@fusioni.com>
To: ntemacs-users@cs.washington.edu
Subject: Re: Printing
Date: Wed, 15 Jan 1997 13:32:14 -0800

I thought win95 users might be interested in this.

At 10:35 AM 1/15/97 -0700, Brad Sileo wrote:
>Here is print-NT.el, which we use at our site.  
>;;; Setup printing for NT's using lpr.exe/NT-print.el
>(setq lpr-command     "print"

The pr command linked to from Geoff's page worked fine, 
except it didn't accept the /D: argument; changing
that to -P fixed the problem.

Emacs locked up when I attempted to print using
'Print Buffer' on the 'Tools' menu.  I'll have a quick
look and see if I can figure out why.

'Print Postscript Buffer' does work though (Hooray!), and
since I'm using a postscript capable printer, I'm happy
with that.

Nick

--
Nick Silberstein                      | Fusion Interactive
WWWebslinger & Interactive Production | Seattle, WA
http://www.fusioni.com/~nick/         | 206.282.8119

Water, taken in moderation cannot hurt anybody.
		-- Mark Twain

From owner-ntemacs-users@june  Wed Jan 15 12:04:56 1997
X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil]
	[nil "Wed" "15" "January" "1997" "13:54:21" "-0500" "Brian Gorka" "gorkab@sanchez.com" nil "38" "RE: Printing" "^From:" nil nil "1" nil nil nil nil]
	nil)
Received: from joker.cs.washington.edu (joker.cs.washington.edu [128.95.1.42]) by june.cs.washington.edu (8.8.3+CSE/7.2ju) with SMTP id MAA13481 for <voelker@june.cs.washington.edu>; Wed, 15 Jan 1997 12:04:55 -0800
Received: from june.cs.washington.edu (june.cs.washington.edu [128.95.1.4]) by joker.cs.washington.edu (8.6.12/7.2ws+) with ESMTP id MAA29905 for <voelker@joker.cs.washington.edu>; Wed, 15 Jan 1997 12:04:53 -0800
Received: from net.sanchez.com (net.sanchez.com [206.7.38.252]) by june.cs.washington.edu (8.8.3+CSE/7.2ju) with ESMTP id KAA06326 for <ntemacs-users@cs.washington.edu>; Wed, 15 Jan 1997 10:53:47 -0800
Received: from oz.sanchez.com ([140.140.1.251]) by net.sanchez.com           (post.office MTA v2.0 0813 ID# 0-0U10) with SMTP id AAA177           for <ntemacs-users@cs.washington.edu>;           Wed, 15 Jan 1997 13:49:35 -0500
Received: by oz.sanchez.com with SMTP (Microsoft Exchange Server Internet Mail Connector Version 4.0.994.63) 	id <01BC02EB.9C7D03A0@oz.sanchez.com>; Wed, 15 Jan 1997 13:54:22 -0500
Message-ID: <c=US%a=_%p=Sanchez_Computer%l=OZ-970115185421Z-9442@oz.sanchez.com>
X-Mailer:  Microsoft Exchange Server Internet Mail Connector Version 4.0.994.63
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
From: gorkab@sanchez.com (Brian Gorka)
To: "'ntemacs-users@cs.washington.edu'" <ntemacs-users@cs.washington.edu>
Subject: RE: Printing
Date: Wed, 15 Jan 1997 13:54:21 -0500

I use print-nt.el as well and it does work.  One minor change I had to
make for postscript printing was the addition of the -o flag.  This
prevented the dumping of postscript source to my printer.

>-----Original Message-----
>From:	Brad Sileo [SMTP:brad@GeoData-GIS.com]
>Sent:	Wednesday, January 15, 1997 12:35 PM
>To:	Ron I. Herman
>Cc:	ntemacs-users@cs.washington.edu
>Subject:	Re: Printing
>
>At 09:25 AM 1/15/97 -0500, you wrote:
>>I just installed Emacs under NT 3.51 and would like
>>some info about printing. I saw the name Pascal Obry
>>in the emacs document from cs.washington.edu as being
>>someone who knows how to set this up, but was unable
>>to find his address.
>
>Here is print-NT.el, which we use at our site.  
>
>I add the following to my .emacs (or default.el, etc..) to configure it:
>
>;;; Setup printing for NT's using lpr.exe/NT-print.el
>(setq lpr-command     "print"
>      ps-paper-type   'ps-a4)
>
>(defvar      lpr-destination    '("\\\\server\\printer")
>  "*The UNC style location for regular print jobs\nThe default is
>\\\\server\\printer.\nRemember to escape the backslashes(use '\\\\' for each
>'\\') for emacs.")
>(defvar      ps-lpr-destination '("\\\\server\\ps_printer")
>  "*The UNC style location for Postscript print jobs\nThe default is
>\\\\server\\ps_printer.\nRemember to escape the backslashes(use '\\\\' for
>each '\\') for emacs.")
>
>(load "print-NT"() t)
>
><print-nt.el deleted>

From owner-ntemacs-users@june  Wed Jan 15 10:29:42 1997
X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil]
	[nil "Wed" "15" "January" "1997" "10:35:23" "-0700" "Brad Sileo" "brad@geodata-gis.com" nil "122" "Re: Printing" "^From:" nil nil "1" nil nil nil nil]
	nil)
Received: from joker.cs.washington.edu (joker.cs.washington.edu [128.95.1.42]) by june.cs.washington.edu (8.8.3+CSE/7.2ju) with SMTP id KAA03582 for <voelker@june.cs.washington.edu>; Wed, 15 Jan 1997 10:29:41 -0800
Received: from june.cs.washington.edu (june.cs.washington.edu [128.95.1.4]) by joker.cs.washington.edu (8.6.12/7.2ws+) with ESMTP id KAA32340 for <voelker@joker.cs.washington.edu>; Wed, 15 Jan 1997 10:29:40 -0800
Received: from nile.GeoData-GIS.com (nile.GeoData-GIS.COM [204.133.146.23]) by june.cs.washington.edu (8.8.3+CSE/7.2ju) with ESMTP id JAA29281 for <ntemacs-users@cs.washington.edu>; Wed, 15 Jan 1997 09:36:54 -0800
Received: from lehigh (lehigh.geodata-gis.com [204.133.146.47]) by nile.GeoData-GIS.com (8.8.4/8.7.3) with SMTP id KAA26350; Wed, 15 Jan 1997 10:35:25 -0700 (MST)
Message-Id: <1.5.4.32.19970115173523.00328910@nile.geodata-gis.com>
X-Sender: brad@nile.geodata-gis.com
X-Mailer: Windows Eudora Light Version 1.5.4 (32)
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
From: Brad Sileo <brad@GeoData-GIS.com>
To: "Ron I. Herman" <m1rih00@FRB.GOV>
Cc: ntemacs-users@cs.washington.edu
Subject: Re: Printing
Date: Wed, 15 Jan 1997 10:35:23 -0700

At 09:25 AM 1/15/97 -0500, you wrote:
>I just installed Emacs under NT 3.51 and would like
>some info about printing. I saw the name Pascal Obry
>in the emacs document from cs.washington.edu as being
>someone who knows how to set this up, but was unable
>to find his address.

Here is print-NT.el, which we use at our site.  

I add the following to my .emacs (or default.el, etc..) to configure it:

;;; Setup printing for NT's using lpr.exe/NT-print.el
(setq lpr-command     "print"
      ps-paper-type   'ps-a4)

(defvar      lpr-destination    '("\\\\server\\printer")
  "*The UNC style location for regular print jobs\nThe default is
\\\\server\\printer.\nRemember to escape the backslashes(use '\\\\' for each
'\\') for emacs.")
(defvar      ps-lpr-destination '("\\\\server\\ps_printer")
  "*The UNC style location for Postscript print jobs\nThe default is
\\\\server\\ps_printer.\nRemember to escape the backslashes(use '\\\\' for
each '\\') for emacs.")

(load "print-NT"() t)


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; print-NT.el
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(defvar ps-lpr-buffer "c:\\temp\\psspool.ps")
(defvar txt-lpr-buffer "c:\\temp\\psspool.txt")

;;;;;;; simple print

(defun print-lpr-buffer ()
	(shell-command
   (apply 'concat (append (list lpr-command " /D:")
                          lpr-destination
                          (list " " txt-lpr-buffer))))
	(delete-file txt-lpr-buffer)
)
(defun nt-print-buffer ()
  (interactive)
	(write-region (point-min) (point-max) txt-lpr-buffer)
	(print-lpr-buffer )
)
(defun nt-print-region ()
  (interactive)
	(write-region (point) (mark) txt-lpr-buffer)
	(print-lpr-buffer )
)

(define-key menu-bar-tools-menu [print-region]
  '("Print Region" . nt-print-region))
(define-key menu-bar-tools-menu [print-buffer]
  '("Print Buffer" . nt-print-buffer))



;;;;;;; ps-print 

(require 'ps-print)

(defun ps-print-lpr-buffer ()
	(shell-command
   (apply 'concat (append (list ps-lpr-command " /D:")
                          ps-lpr-destination
                          (list " " ps-lpr-buffer))))
	(delete-file  ps-lpr-buffer)
)

(defvar ps-print-use-faces nil
	"*Non-nil means alway print with faces.")

(defun toggle-use-face ()
	(interactive)
	(if ps-print-use-faces 
			(progn (setq ps-print-use-faces nil)
						 (message "ps-print-use-faces disabled"))
		(setq ps-print-use-faces t)
		(message "ps-print-use-faces unabled"))
)
(define-key menu-bar-tools-menu [toggle-use-face]
  '("Toggle on/off print-with-faces" . toggle-use-face))

(defun nt-ps-print-buffer ()
  (interactive)
	(if ps-print-use-faces 
			(ps-print-buffer-with-faces ps-lpr-buffer)
		(ps-print-buffer ps-lpr-buffer)
		)
  (ps-print-lpr-buffer)
)
(define-key menu-bar-tools-menu [ps-print-buffer]
  '("Postscript Print Buffer" . nt-ps-print-buffer))
(define-key global-map "\C-cp" 'nt-ps-print-buffer)


(defun nt-ps-print-region ()
  (interactive)
	(if ps-print-use-faces 
			(ps-print-region-with-faces (point) (mark) ps-lpr-buffer)
		(ps-print-region (point) (mark) ps-lpr-buffer)
		)
  (ps-print-lpr-buffer)
)
(define-key menu-bar-tools-menu [ps-print-region]
  '("Postscript Print Region" . nt-ps-print-region))
(define-key global-map "\C-crp" 'nt-ps-print-region)


;;;;;;;;;;
======================================================
                   Brad Sileo
              GeoData Solutions, Inc.		
Network Engineer                     GIS Consultant
Voice:(303)650-1600                 Fax:(303)650-1795 
             http://www.geodata-gis.com
======================================================

From atohst2@ato.abb.se  Mon Jan 27 02:09:31 1997
X-VM-v5-Data: ([nil nil nil nil t nil nil nil nil]
	[nil "Mon" "27" "January" "0100" "11:09:23" "" "Haakan Strandberg" "atohst2@ato.abb.se" "<199701271009.LAA23556@u.ato.abb.se>" "33" "winNT network printing" "^From:" nil nil "1" nil nil nil nil]
	nil)
Received: from sdas01.seinf.abb.se (sdas01.seinf.abb.se [138.221.200.200]) by june.cs.washington.edu (8.8.5+CS/7.2ju) with SMTP id CAA14717 for <voelker@cs.washington.edu>; Mon, 27 Jan 1997 02:09:29 -0800
Received: from u.ato.abb.se by sdas01.seinf.abb.se (5.65v3.2/1.1.10.5/19Jan97-0838PM) 	id AA18799; Mon, 27 Jan 1997 11:11:01 +0100
Received: from multia179 (multia179.ato.abb.se [138.221.42.6]) by u.ato.abb.se (8.7.3/8.7.3) with SMTP id LAA23556 for <voelker@cs.washington.edu>; Mon, 27 Jan 1997 11:09:22 +0100
Message-Id: <199701271009.LAA23556@u.ato.abb.se>
Organization: ABB Atom AB
X-Mailer: Mozilla 1.2 (Windows; I; 32bit)
Mime-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset=iso-8859-1
From: Haakan Strandberg <atohst2@ato.abb.se>
To: voelker@cs.washington.edu
Subject: winNT network printing
Date: Mon, 27 Jan 97 11:09:23 0100

Here is the code for network printing from WinNT 3.51 with 
emacs 19.31. I hope it will be helpfull. 

ps-lpr-switches
Look for the computer and the sharename in the printmanager 
box "Default" which in my case shows \\BDC_B1\p208 

For more information about lpr search the WinNT help for 
"lpr".

Hekan Strandberg

;;###########################  NT - NetWork - PS - Print

(require 'ps-print)
(setq ps-paper-type 'ps-a4)
(setq ps-lpr-command "lpr")		;network print command
(setq ps-lpr-switches '("-S BDC_B1 -P p208 -o l")) 
				;computername,sharename,bin 
option 
(setq ps-lpr-buffer "d:\\temp\\psspool.ps")       ;a tmp spool 
file
 
(defun ntnetworkprintps ()
  (interactive)
  (ps-print-buffer ps-lpr-buffer)
  (shell-command
  (apply 'concat (append (list ps-lpr-command " 
")ps-lpr-switches
			    (list " " ps-lpr-buffer))))
)
 


From owner-ntemacs-users@june  Wed Jan 29 04:14:13 1997
X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil]
	[nil "Wed" "29" "January" "1997" "11:44:44" "GMT" "Alfredo Rodriguez-Garcia" "alfredo@luz.ee.umist.ac.uk" nil "111" "printing-gs" "^From:" nil nil "1" nil nil nil nil]
	nil)
Received: from joker.cs.washington.edu (joker.cs.washington.edu [128.95.1.42]) by june.cs.washington.edu (8.8.5+CS/7.2ju) with SMTP id EAA07000 for <voelker@june.cs.washington.edu>; Wed, 29 Jan 1997 04:14:12 -0800
Received: from june.cs.washington.edu (june.cs.washington.edu [128.95.1.4]) by joker.cs.washington.edu (8.6.12/7.2ws+) with ESMTP id EAA31350 for <voelker@joker.cs.washington.edu>; Wed, 29 Jan 1997 04:14:11 -0800
Received: from nessie.mcc.ac.uk (nessie.mcc.ac.uk [130.88.200.20]) by june.cs.washington.edu (8.8.5+CS/7.2ju) with ESMTP id DAA06448 for <ntemacs-users@cs.washington.edu>; Wed, 29 Jan 1997 03:39:00 -0800
Received: from luz.ee.umist.ac.uk by nessie.mcc.ac.uk with SMTP (PP);           Wed, 29 Jan 1997 11:38:41 +0000
Message-Id: <2581.9701291144@luz.ee.umist.ac.uk>
Mailer: Elm [revision: 70.85]
From: Alfredo Rodriguez-Garcia <alfredo@luz.ee.umist.ac.uk>
To: ntemacs-users@cs.washington.edu (NT Emacs Group List)
Subject: printing-gs
Date: Wed, 29 Jan 97 11:44:44 GMT

Hi everybody

I sent this message to Mr. Vassil and maybe someone
of you can help me.


I tried djet500. The computer create the postscript
file but can not print it. It give to me a message
that I can not read because the message dissapears
so quickly and I do not how to hold the message.

Many thanks in advance.

> 
> Hi Mr. Vassil
> 
> I have used your program to print using gs.
> I have a small problem and I wonder if you
> can help me. When I put the instructions in
> my _emacs file and try to print something,
> gs told me that it can not find the printer.
> What I should do ?
> How to specify my hp deskjet 600 ?
> 
> Thank very much in advance
> 
> Regards.
> 
> 
> 
> 
> > 
> > Hi!
> > 
> > I thought I'd send you my solution to printing from emacs under win95
> > using GhostScript (since I don't have a Postscript ptinter - just
> > a DeskJet540). It is based on the one from Pascal and has been tested
> > with gs4.01 (http://www.cs.wisc.edu/~ghost/aladdin/) for Win32 and 
> > NTEmacs 19-34-1:
> > 
> > ;; ##################################################  win95 - PS-Print
> > ;; A note on the gs options:
> > ;; -q                            quiet
> > ;; -sDEVICE=djet500              the printer - works with HP DeskJet 540
> > ;; -r300                         resolution 300x300
> > ;; -dNOPAUSE                     don't wait for user intervention
> > ;; -IE:\\GSTOOLS\\gs4.01;E:\\GSTOOLS\\gs4.01\\fonts
> > ;;                               the directories needed for gs
> > ;; -c quit                       this is added at the end to terminate
> > gs
> > 
> > (require 'ps-print)
> > (setq ps-paper-type 'ps-letter)
> > (setq ps-lpr-command "E:\\gstools\\gs4.01\\gswin32")
> > (setq ps-lpr-switches '("-q -sDEVICE=djet500 -r300 -dNOPAUSE
> > -IE:\\GSTOOLS\\gs4.01;E:\\GSTOOLS\\gs4.01\\fonts")) ; the GhosScript
> > options
> > (setq ps-lpr-buffer "e:\\emacs\\spool\\psspool.ps")       ; a tmp spool
> > file
> > 
> > 
> > (defun win32-ps-print-buffer ()
> >   (interactive)
> >   (ps-print-buffer ps-lpr-buffer)
> >   (shell-command
> >    (apply 'concat (append (list ps-lpr-command " ")
> >                           ps-lpr-switches
> >                           (list " " ps-lpr-buffer " -c quit"))))
> > )
> > 
> > (define-key global-map "\C-cp" 'win32-ps-print-buffer)
> > 
> 
> 
> --
> ______________________________________________________________
> 
>    Alfredo Rodriguez-Garcia
>    UMIST Dept. EE+E Ferranti Building B18
>    P.O. Box 88 Sackville Street
>    Manchester U.K. M60 1QD
>    Telephone (0161)-2363311 ext 4811
>    Fax       (0161)-2004820
>    e-mail    alfredo@luz.ee.umist.ac.uk
> 
>       o o o o o o . . .    ======================== ==========================
>     o      _____           ||  Alfredo Rodriguez  | ||                       |
>   .][__n_n_|DD(  ==^^____  ||  Garcia             | ||         UMIST         | 
>  >(________|__|_[________]_||_____________________|_||_______________________|_
>  _/oo OOOOO oo`  oo    oo  'o^o                o^o` 'o^o                  o^o`
> -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
> 


--
______________________________________________________________

   Alfredo Rodriguez-Garcia
   UMIST Dept. EE+E Ferranti Building B18
   P.O. Box 88 Sackville Street
   Manchester U.K. M60 1QD
   Telephone (0161)-2363311 ext 4811
   Fax       (0161)-2004820
   e-mail    alfredo@luz.ee.umist.ac.uk

      o o o o o o . . .    ======================== ==========================
    o      _____           ||  Alfredo Rodriguez  | ||                       |
  .][__n_n_|DD(  ==^^____  ||  Garcia             | ||         UMIST         | 
 >(________|__|_[________]_||_____________________|_||_______________________|_
 _/oo OOOOO oo`  oo    oo  'o^o                o^o` 'o^o                  o^o`
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-

From owner-ntemacs-users@trout  Wed Mar 12 13:40:29 1997
X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil]
	[nil "Wed" "12" "March" "1997" "15:40:30" "-0500" "Kevin D'Elia" "kdelia@us.net" nil "22" "ps-print info on Web page" "^From:" nil nil "3" nil nil nil nil]
	nil)
Received: from joker.cs.washington.edu (joker.cs.washington.edu [128.95.1.42]) by june.cs.washington.edu (8.8.5+CS/7.2ju) with SMTP id NAA29714 for <voelker@june.cs.washington.edu>; Wed, 12 Mar 1997 13:40:29 -0800
Received: from trout.cs.washington.edu (trout.cs.washington.edu [128.95.1.178]) by joker.cs.washington.edu (8.6.12/7.2ws+) with ESMTP id NAA43244 for <voelker@joker.cs.washington.edu>; Wed, 12 Mar 1997 13:40:27 -0800
Received: from june.cs.washington.edu (june.cs.washington.edu [128.95.1.4]) by trout.cs.washington.edu (8.8.5+CS/7.2ws+) with ESMTP id MAA00384 for <ntemacs-users@trout.cs.washington.edu>; Wed, 12 Mar 1997 12:40:32 -0800 (PST)
Received: from us.net (laurel.us.net [198.240.72.4]) by june.cs.washington.edu (8.8.5+CS/7.2ju) with SMTP id MAA24550 for <ntemacs-users@cs.washington.edu>; Wed, 12 Mar 1997 12:40:30 -0800
Received: from localhost (kdelia@localhost) by us.net (8.6.5/8.6.12) with SMTP id PAA03255 for <ntemacs-users@cs.washington.edu>; Wed, 12 Mar 1997 15:40:31 -0500
X-Provider: US Net - Advanced Internet Services - (301) 572-5926 - info@us.net
X-Authentication-Warning: laurel.us.net: kdelia owned process doing -bs
Message-ID: <Pine.BSI.3.95.970312153454.2858D-100000@laurel.us.net>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
From: "Kevin D'Elia" <kdelia@us.net>
To: ntemacs-users@cs.washington.edu
Subject: ps-print info on Web page
Date: Wed, 12 Mar 1997 15:40:30 -0500 (EST)


Hello, 

	I don't know if this is of any use to NT Emacs users, but I tried
the ps-print code that I found on the Web page (the one that uses
ghostscript); it works like a charm (and I am happy to be able to print
under NT the way that I became accustomed to under Unix), but I didn't
like the dummy ghostscript screen that appeared every time I printed
something.  The solution I arrived at is to prepend the command that is
bound to the lpr-command with "start /min", so my code looks like this:

(setq ps-lpr-command "start /min C:\\gstools\\gs4.03\\gswin32")

This works fine on my system, and eliminates the annoying "ghost" window.
Hope this is of help to someone..

 	Regards,

		Kevin E. D'Elia

		kdelia@us.net
		kde@usorder.com

From owner-ntemacs-users@trout  Thu Apr 10 11:26:23 1997
X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil]
	[nil "Thu" "10" "April" "1997" "13:50:21" "-0400" "Brian Gorka" "gorkab@sanchez.com" nil "212" "YANTPS (yet another NT printing solution)" "^From:" nil nil "4" nil nil nil nil]
	nil)
Received: from joker.cs.washington.edu (joker.cs.washington.edu [128.95.1.42]) by june.cs.washington.edu (8.8.5+CS/7.2ju) with SMTP id LAA12413 for <voelker@june.cs.washington.edu>; Thu, 10 Apr 1997 11:26:23 -0700
Received: from trout.cs.washington.edu (trout.cs.washington.edu [128.95.1.178]) by joker.cs.washington.edu (8.6.12/7.2ws+) with ESMTP id LAA32328 for <voelker@joker.cs.washington.edu>; Thu, 10 Apr 1997 11:26:21 -0700
Received: from june.cs.washington.edu (june.cs.washington.edu [128.95.1.4]) by trout.cs.washington.edu (8.8.5+CS/7.2ws+) with ESMTP id KAA16012 for <ntemacs-users@trout.cs.washington.edu>; Thu, 10 Apr 1997 10:49:52 -0700 (PDT)
Received: from net.sanchez.com (net.sanchez.com [206.7.38.252]) by june.cs.washington.edu (8.8.5+CS/7.2ju) with ESMTP id KAA08111; Thu, 10 Apr 1997 10:49:43 -0700
Received: from oz.sanchez.com ([140.140.1.251]) by net.sanchez.com           (post.office MTA v2.0 0813 ID# 0-0U10) with SMTP id AAA277;           Thu, 10 Apr 1997 13:44:08 -0400
Received: by oz.sanchez.com with SMTP (Microsoft Exchange Server Internet Mail Connector Version 4.0.995.52) 	id <01BC45B6.23681780@oz.sanchez.com>; Thu, 10 Apr 1997 13:50:23 -0400
Message-ID: <c=US%a=_%p=Sanchez_Computer%l=OZ-970410175021Z-175@oz.sanchez.com>
X-Mailer:  Microsoft Exchange Server Internet Mail Connector Version 4.0.995.52
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
From: gorkab@sanchez.com (Brian Gorka)
To: "'ntemacs-users@cs.washington.edu'" <ntemacs-users@cs.washington.edu>
Cc: "'voelker@cs.washington.edu'" <voelker@cs.washington.edu>
Subject: YANTPS (yet another NT printing solution)
Date: Thu, 10 Apr 1997 13:50:21 -0400

This one seems to have been missed by the FAQ.  I didn't write it, but I
added the 2up (or Nup) support that print.el has.  It's pretty easy to
modify, so I might add Ghostscript and Adobe Acrobat Distiller as
options after finals.  It works with local or network printers too.  It
requires cmd.exe to be in your path (for 95 users, i think you need the
cmd32 from Perl 5 for Win32)

;;; print-NT.el --- Special printing fonctions for Windows NT
;;
;; Author: Frederic Corne <frederic.corne@erli.fr> 
;; Created: jul 1996
;; Version: 1.0  1996/10/02 
;; Keywords: print, PostScript
;;
;;; Commentary:
;; 
;;  This file is based on the example of Pascal Obry (in the ntemacs
FAQ).
;;
;;  This file overwrites the items of the Tools menu, so it must be
loaded 
;;  before any use of the menu.
;;
;;  It alows to print with faces or not.
;;
;; USAGE: Byte-compile this file, and add the following line to your
;;  emacs initialization file (.emacs/_emacs) according to the type 
;;  of printer command (print or lpr):
;; 
;;  if you use print.exe command (The UNC style location for regular
print jobs):
;;  Remember to escape the backslashes(use '\\\\' for each '\\') for
emacs.
;;  
;;  (setq lpr-command "print"
;;       lpr-destination '("/D:\\\\host\\share-name") ;; for normal
printer
;;  	 ps-lpr-destination '("/D:\\\\host\\share-name") ;; for postscript
printer
;;  
;;  (setq  ps-paper-type 'ps-a4 ) ; the type of paper (if needed)
;;  
;;  (load "print-NT"() t)
;;  
;;  
;;  
;;  if you use lpr.exe command, add :
;;  
;;  (setq lpr-command "lpr"
;;     lpr-destination '("-S host -P share-name")  ;; for normal printer
;;     ps-lpr-destination '("-S host -P share-name")) ;; for postscript
printer
;;  			
;;  (setq  ps-paper-type 'ps-a4 ) ; the type of paper (if needed)
;;  
;;  (load "print-NT"() t)
;;  
;;
;;  You can also change the temporary buffers values ps-lpr-buffer and
txt-lpr-buffer
;;;;;  
;;;;; Change log:
;;
;; Revision 1.0  1996/10/02 fcorne
;; Initial revision
;;
;; Credit for suggestions, patches and bug-fixes:
;; David J. Fiande <davidf@mks.com>
;; Brad Sileo <brad@GeoData-GIS.com> 
;;;;; 
;;;;; Change log:
;;
;; Revision 1.1  1997/4/10 gorkab
;; Initial revision
;;
;; Brian Gorka <gorkab@sanchez.com>
;; 
;; Added nt-ps-2up-print-buffer
;;
;; With psnup.exe you can print multiple pages per sheet...
;;
;; (defvar ps-psnup-command "psnup")
;; (defvar ps-psnup-switches '(" -l -2 -m.25in "))
;; (defvar ps-psnup-buffer "c:\\tmp\\psnup.ps")

;;; Code:

(defvar  lpr-destination    '("-S host -P share-name"))
(defvar  ps-lpr-destination '("-S host -P share-name"))

(defvar ps-lpr-buffer "c:\\tmp\\psspool.ps")
(defvar txt-lpr-buffer "c:\\tmp\\psspool.txt")

(defvar ps-psnup-command "psnup")
(defvar ps-psnup-switches '(" -l -2 -m.25in "))
(defvar ps-psnup-buffer "c:\\tmp\\psnup.ps")

;;;;;;; print simple
(defun print-lpr-buffer ()
  (let ((shell-file-name "cmd.exe")	; switch back to cmd.exe temporarily
	(win32-quote-process-args nil)
	(shell-command-switch "/c"))
    (shell-command
     (apply 'concat (append (list lpr-command "
")														lpr-destination (list " " txt-lpr-buffer)))))
  (delete-file txt-lpr-buffer)
  )
(defun nt-print-buffer ()
  (interactive)
  (write-region (point-min) (point-max) txt-lpr-buffer)
  (print-lpr-buffer )
  )
(defun nt-print-region ()
  (interactive)
  (write-region (point) (mark) txt-lpr-buffer)
  (print-lpr-buffer )
  )

(define-key menu-bar-tools-menu [print-region]
  '("Print Region" . nt-print-region))

(define-key menu-bar-tools-menu [print-buffer]
  '("Print Buffer" . nt-print-buffer))

(define-key menu-bar-tools-menu [2up-print-buffer]
  '("2up Print Buffer" . nt-ps-2up-print-buffer))

;;;;;;; ps-print 

(require 'ps-print)

(defun ps-print-lpr-buffer ()
  (let ((shell-file-name "cmd.exe")	; switch back to cmd.exe temporarily
	(win32-quote-process-args nil)
	(shell-command-switch "/c"))
    (shell-command
     (apply 'concat (append (list ps-lpr-command " ")
			    ps-lpr-destination
			    (list " " ps-lpr-buffer)))))
  (delete-file  ps-lpr-buffer)
  )

(defvar ps-print-use-faces nil
  "*Non-nil means alway print with faces.")

(defun toggle-use-face ()
  (interactive)
  (if ps-print-use-faces 
      (progn (setq ps-print-use-faces nil)
	     (message "ps-print-use-faces disabled"))
    (setq ps-print-use-faces t)
    (message "ps-print-use-faces enabled"))
  )

(define-key menu-bar-tools-menu [toggle-use-face]
  '("Toggle on/off print-with-faces" . toggle-use-face))

(defun nt-ps-print-buffer ()
  (interactive)
  (if ps-print-use-faces 
      (ps-print-buffer-with-faces ps-lpr-buffer)
    (ps-print-buffer ps-lpr-buffer)
    )
  (ps-print-lpr-buffer)
  )

(define-key menu-bar-tools-menu [ps-print-buffer]
  '("Postscript Print Buffer" . nt-ps-print-buffer))
(define-key global-map "\C-cp" 'nt-ps-print-buffer)


(defun nt-ps-print-region ()
  (interactive)
  (if ps-print-use-faces 
      (ps-print-region-with-faces (point) (mark) ps-lpr-buffer)
    (ps-print-region (point) (mark) ps-lpr-buffer)
    )
  (ps-print-lpr-buffer)
  )

(define-key menu-bar-tools-menu [ps-print-region]
  '("Postscript Print Region" . nt-ps-print-region))
(define-key global-map "\C-crp" 'nt-ps-print-region)


(defun nt-ps-2up-print-buffer ()
  (interactive)
  (ps-print-buffer-with-faces ps-lpr-buffer)
  (let ((shell-file-name "cmd.exe")	; switch back to cmd.exe temporarily
	(win32-quote-process-args nil)
	(shell-command-switch "/c"))
    (shell-command
     (apply 'concat (append (list ps-psnup-command " ")
			    ps-psnup-switches
			    (list " " ps-lpr-buffer)
			    (list " " ps-psnup-buffer)
			    )))

    (delete-file  ps-lpr-buffer)

    (shell-command
     (apply 'concat (append (list ps-lpr-command " ")
			    ps-lpr-destination
			    (list " " ps-psnup-buffer)))))

  (delete-file  ps-psnup-buffer)
  )

(define-key global-map "\C-c2p" 'nt-ps-2up-print-buffer)

----------
This message has been made with only the finest ASCII characters.

From owner-ntemacs-users@trout  Sat Mar 15 20:53:01 1997
X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil]
	[nil "" "15" "March" "1997" "14:39:26" "-0500" "Stainless Steel Rat" "ratinox@peorth.gweep.net" nil "42" "PostScript printing from NTEmacs" "^From:" nil nil "3" nil nil nil nil]
	nil)
Received: from joker.cs.washington.edu (joker.cs.washington.edu [128.95.1.42]) by june.cs.washington.edu (8.8.5+CS/7.2ju) with SMTP id UAA21746 for <voelker@june.cs.washington.edu>; Sat, 15 Mar 1997 20:53:01 -0800
Received: from trout.cs.washington.edu (trout.cs.washington.edu [128.95.1.178]) by joker.cs.washington.edu (8.6.12/7.2ws+) with ESMTP id UAA43347 for <voelker@joker.cs.washington.edu>; Sat, 15 Mar 1997 20:53:00 -0800
Received: from june.cs.washington.edu (june.cs.washington.edu [128.95.1.4]) by trout.cs.washington.edu (8.8.5+CS/7.2ws+) with ESMTP id UAA21079 for <ntemacs-users@trout.cs.washington.edu>; Sat, 15 Mar 1997 20:07:23 -0800 (PST)
Received: from londo.prescienttech.com (londo.prescienttech.com [199.103.216.62]) by june.cs.washington.edu (8.8.5+CS/7.2ju) with ESMTP id UAA20633 for <ntemacs-users@cs.washington.edu>; Sat, 15 Mar 1997 20:07:18 -0800
Received: from gkar.asds.com (gkar.asds.com [111.17.19.1])           by londo.prescienttech.com (8.8.4/8.8.4) with ESMTP 	  id XAA25984 for <ntemacs-users@cs.washington.edu>; Sat, 15 Mar 1997 23:07:13 -0500
Received: from peorth.gweep.net (gkar.asds.com [111.17.19.1])           by gkar.asds.com (8.8.4/8.8.4) with SMTP 	  id XAA01550 for <ntemacs-users@cs.washington.edu>; Sat, 15 Mar 1997 23:07:11 -0500
Organization: The Happy Fun Ball Brigade
X-Attribution: Rat
Message-ID: <wkybbpueq9.fsf@peorth.gweep.net>
Lines: 42
X-Mailer: Gnus v5.4.25/Emacs 19.34
From: Stainless Steel Rat <ratinox@peorth.gweep.net>
To: ntemacs-users@cs.washington.edu
Subject: PostScript printing from NTEmacs
Date: 15 Mar 1997 14:39:26 -0500

-----BEGIN PGP SIGNED MESSAGE-----

I have refined the PostScript/Ghostscript printing technique in the FAQ.
This should work pretty much transparently.  You still need to set
ps-lpr-command and ps-lpr-switches as in the FAQ.

(require 'ps-print)
(or (fboundp 'ps-print-buffer-org)
    (fset 'ps-print-buffer-org (symbol-function 'ps-print-buffer)))
(or (fboundp 'ps-print-buffer-with-faces-org)
    (fset 'ps-print-buffer-with-faces-org (symbol-function 'ps-print-buffer-with-faces)))
;; note: these two functions drop the optional filename as they
;; explicitly dump to the file ps-lpr-buffer
(defun ps-print-buffer (&optional filename)
  (interactive)
  (ps-print-buffer-org ps-lpr-buffer)
  (shell-command
   (apply 'concat (append (list ps-lpr-command " ")
			  ps-lpr-switches
			  (list " " ps-lpr-buffer " -c quit")))))
(defun ps-print-buffer-with-faces (&optional filename)
  (interactive)
  (ps-print-buffer-with-faces-org ps-lpr-buffer)
  (shell-command
   (apply 'concat (append (list ps-lpr-command " ")
			  ps-lpr-switches
			  (list " " ps-lpr-buffer " -c quit")))))

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3
Charset: cp850

iQCVAwUBMyr6v56VRH7BJMxHAQEzewP9GyPiFR8YexyM4zjtsG1cCA75eywbmTT9
P0Fx2b3BBzaL8f2o/tT77ZY2KNx6EbXlE2Vi3klasvzaGc1MReYKhNex6hFpSQfx
DYBE0Srd/ojUQ4aWttgy2Uf+u9go1KS6TZY5igVCC9MfdIyzk02wvJwb/AvI68+R
eesNMeLia80=
=jY54
-----END PGP SIGNATURE-----
-- 
Rat <ratinox@peorth.gweep.net>    \ Do not use Happy Fun Ball on concrete.
PGP Key: at a key server near you! \ 
                                    \ 

From owner-ntemacs-users@trout  Wed May 14 16:20:54 1997
X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil]
	[nil "Wed" "14" "May" "1997" "18:35:55" "-0400" "Kevin E. D'Elia" "Kevin.DElia@mci.com" nil "30" "Ghostscript printing and bash.exe" "^From:" nil nil "5" nil nil nil nil]
	nil)
Received: from joker.cs.washington.edu (joker.cs.washington.edu [128.95.1.42]) by june.cs.washington.edu (8.8.5+CS/7.2ju) with SMTP id QAA06926 for <voelker@june.cs.washington.edu>; Wed, 14 May 1997 16:20:54 -0700
Received: from trout.cs.washington.edu (trout.cs.washington.edu [128.95.1.178]) by joker.cs.washington.edu (8.6.12/7.2ws+) with ESMTP id QAA29773 for <voelker@joker.cs.washington.edu>; Wed, 14 May 1997 16:20:52 -0700
Received: from june.cs.washington.edu (june.cs.washington.edu [128.95.1.4]) by trout.cs.washington.edu (8.8.5+CS/7.2ws+) with ESMTP id PAA21532 for <ntemacs-users@trout.cs.washington.edu>; Wed, 14 May 1997 15:32:44 -0700 (PDT)
Received: from mailserv.metro.mci.com (mailserv.metro.mci.com [166.44.43.237]) by june.cs.washington.edu (8.8.5+CS/7.2ju) with SMTP id PAA02733 for <ntemacs-users@cs.washington.edu>; Wed, 14 May 1997 15:32:43 -0700
Received: from dsrinivasan.metro.mci.com by mailserv.metro.mci.com (NX5.67f2/NX3.0M) 	id AA18959; Wed, 14 May 97 18:30:48 -0400
Message-Id: <337A3E4B.33C8@mci.com>
Reply-To: Kevin.DElia@mci.com
Organization: MCI Metro
X-Mailer: Mozilla 3.01Gold (WinNT; I)
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
From: "Kevin E.D'Elia" <Kevin.DElia@mci.com>
To: ntemacs-users@cs.washington.edu
Subject: Ghostscript printing and bash.exe
Date: Wed, 14 May 1997 18:35:55 -0400

Hello,

	Thanks to Ian Reinhart, I was able to figure out how to get the
Ghostscript printing code to work using bash.exe as my shell.  My code
snippet follows:

(require 'ps-print)
(setq ps-paper-type 'ps-letter)
(setq ps-lpr-command "/gstools/gs4.03/gswin32c")
(setq ps-lpr-switches '("-q -sDEVICE=ljet4 -r300 -dNOPAUSE
-I/GSTOOLS/gs4.03 -I/GSTOOLS/gs4.03/fonts"))
(setq ps-lpr-buffer "/TEMP/psspool.ps")

(defun win32-ps-print-buffer ()
  (interactive)
  (ps-print-buffer ps-lpr-buffer)
  (shell-command
   (apply 'concat (append (list ps-lpr-command " ")
                          ps-lpr-switches
                          (list " " ps-lpr-buffer " -c quit"))))
)

(define-key global-map "\C-cp" 'win32-ps-print-buffer)

Hope this helps.  Thanks to all others who responded to my inquiry...
-- 
Kevin D'Elia			e-mail: Kevin.DElia@mci.com
MCI Metro				kdelia@us.net
1921 Gallows Road		phone:	(703) 918-0884
Vienna, VA				(703) 918-1884

From owner-ntemacs-users@cs.washington.edu  Mon Nov 17 15:16:21 1997
X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil]
	[nil "Mon" "17" "November" "1997" "14:44:55" "-0800" "DAVE LOWE" "DAVE_LOWE@hp-vancouver-om1.om.hp.com" nil "76" "RE: Printing without postscript?" "^From:" nil nil "11" nil nil nil nil]
	nil)
Received: from joker.cs.washington.edu (joker.cs.washington.edu [128.95.1.42]) by june.cs.washington.edu (8.8.7+CS/7.2ju) with SMTP id PAA08622 for <voelker@june.cs.washington.edu>; Mon, 17 Nov 1997 15:16:20 -0800
Received: from trout.cs.washington.edu (trout.cs.washington.edu [128.95.1.178]) by joker.cs.washington.edu (8.6.12/7.2ws+) with ESMTP id PAA34181 for <voelker@joker.cs.washington.edu>; Mon, 17 Nov 1997 15:16:18 -0800
Received: (majordom@localhost) by trout.cs.washington.edu (8.8.5+CS/7.2ws+) id OAA01519 for ntemacs-users-outgoing; Mon, 17 Nov 1997 14:45:21 -0800 (PST)
Received: from june.cs.washington.edu (june.cs.washington.edu [128.95.1.4]) by trout.cs.washington.edu (8.8.5+CS/7.2ws+) with ESMTP id OAA01515 for <ntemacs-users@trout.cs.washington.edu>; Mon, 17 Nov 1997 14:45:14 -0800 (PST)
Received: from palrel1.hp.com (palrel1.hp.com [156.153.255.235]) by june.cs.washington.edu (8.8.7+CS/7.2ju) with ESMTP id OAA04615 for <ntemacs-users@cs.washington.edu>; Mon, 17 Nov 1997 14:45:09 -0800
Received: from om1.vcd.hp.com (om1.vcd.hp.com [15.69.130.24]) 	by palrel1.hp.com (8.8.6/8.8.5tis) with ESMTP id OAA26487 	for <ntemacs-users@cs.washington.edu>; Mon, 17 Nov 1997 14:45:07 -0800 (PST)
Received: from localhost (root@localhost) by om1.vcd.hp.com with SMTP (8.7.6/8.7.3 TIS 5.0 Openmail) id OAA01576 for ntemacs-users@cs.washington.edu; Mon, 17 Nov 1997 14:45:06 -0800 (PST)
X-OpenMail-Hops: 1
Message-Id: <H00019870588dbe3@MHS>
Precedence: bulk
From: DAVE_LOWE@HP-Vancouver-om1.om.hp.com
Sender: owner-ntemacs-users@cs.washington.edu
TO: ntemacs-users@cs.washington.edu
Subject: RE: Printing without postscript?
Date: Mon, 17 Nov 97 14:44:55 -0800

Maybe this is close enough to what you want or at least can get you 
started on a solution. I print without postscript using the lpr elisp 
package, the NT print.exe command, and pr.exe from the MKS toolkit. The 
lpr package gives you two commands, lpr-buffer and lpr-region, that 
print unformatted.  And two commands, print-buffer and print-region, 
that pass the text first through the pr filter before printing. The pr 
filter is a simple filter that adds a header to each page. The default 
header has date, filename, and page numbers. The results are not as 
pretty as postscript and there is no "2 up" option. Here are the 
relevant parts of my .emacs file.

;;(require 'lpr)
(defvar lpr-spool-file "c:\\temp\\lprspool.txt"
  "*Name of temporary file for spooling print images.")
(setq lpr-switches '("/D:lpt1"))
(setq lpr-command "C:\\WINNT\\system32\\print.exe")
(setq lpr-page-header-program 
"C:\\ISIX86\\sniff\\mks\\mks-5.2\\mksnt\\pr.exe")
(setq lpr-page-header-switches '("-l60"))
(setq lpr-add-switches t)
(defun nt-print-region-function (start end &rest args)
  (write-region start end lpr-spool-file)
  (shell-command
   (apply 'concat (append (list lpr-command " ")
                          lpr-switches
                          (list " " lpr-spool-file)))))
(setq print-region-function 'nt-print-region-function)

Dave

-----Original Message-----
From: Non-HP-tom 
Sent: Monday, November 17, 1997 10:30 AM
To: Non-HP-ntemacs-users
Subject: Printing without postscript?

As near as I can tell from the FAQ, all the printing solutions for 
ntemacs
revolve around postscript, and if you don't have a postscript printer,
you're supposed to do some elaborate stuff with ghostscript to convert 
the
postscript for your printer.

However, windows already has a perfectly good printer interface API and
thousands of printer manufacturers all over the world churning out 
windows
drivers for all their printers so everything looks as good as possible 
if
you use the native windows printing interface to talk to them.

In all the world of win32 apps out there, wouldn't you think there would
be some small little program that could take a file of text, some 
options
that say how to format it (headers, line numbers, etc), and just send 
it to
the printer using the normal windows printer interface mechanism?

If there really isn't any such program out there, perhaps I'll try to 
write
one, but it sure seems like something that should already exist (not 
that
I've been able to find one, mind you :-).

Does anyone know of such a program? Do you think it would be useful
for me to write one if I ever collect enough round tuits?
--
>>==> The *Best* political site: <URL:http://www.vote-smart.org/> <<==<<
<URL:mailto:Tom.Horsley@mail.ccur.com>        <URL:http://www.ccur.com/>
icbm:Concurrent Computers, 2101 W. Cypress Creek Rd. Ft. Lauderdale FL  
33309
 << File: Printing without postscript_.TXT >> 

.......................................................................

Item Subject: WINMAIL.DAT
Couldn't convert Microsoft Mail Message Data item to text at a gateway.

From owner-ntemacs-users@cs.washington.edu  Tue Dec  9 19:34:43 1997
X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil]
	[nil "Tue" " 9" "December" "1997" "20:05:08" "-0500" "bill@bubblegum.net" "bill@bubblegum.net" nil "72" "RE: More printing without postscript" "^From:" nil nil "12" nil nil nil nil]
	nil)
Received: from joker.cs.washington.edu (joker.cs.washington.edu [128.95.1.42]) by june.cs.washington.edu (8.8.7+CS/7.2ju) with SMTP id TAA21020 for <voelker@june.cs.washington.edu>; Tue, 9 Dec 1997 19:34:42 -0800
Received: from trout.cs.washington.edu (trout.cs.washington.edu [128.95.1.178]) by joker.cs.washington.edu (8.6.12/7.2ws+) with ESMTP id TAA35404 for <voelker@joker.cs.washington.edu>; Tue, 9 Dec 1997 19:34:41 -0800
Received: (majordom@localhost) by trout.cs.washington.edu (8.8.5+CS/7.2ws+) id SAA27961 for ntemacs-users-outgoing; Tue, 9 Dec 1997 18:58:49 -0800 (PST)
Received: from june.cs.washington.edu (june.cs.washington.edu [128.95.1.4]) by trout.cs.washington.edu (8.8.5+CS/7.2ws+) with ESMTP id SAA27957 for <ntemacs-users@trout.cs.washington.edu>; Tue, 9 Dec 1997 18:58:46 -0800 (PST)
Received: from neo.buoyant.com ([209.14.128.35]) by june.cs.washington.edu (8.8.7+CS/7.2ju) with ESMTP id SAA19822 for <ntemacs-users@cs.washington.edu>; Tue, 9 Dec 1997 18:58:44 -0800
Received: from CARPENTER.pointillist.com (89.middletown-06.va.dial-access.att.net [12.68.18.89])           by neo.buoyant.com (8.8.5/8.8.4) with SMTP 	  id VAA14981; Tue, 9 Dec 1997 21:54:23 -0500 (EST)
Message-ID: <1996-Tue09Dec1997215407-0500-bill@pointillist.com>
X-Mailer: emacs 19.34.6 (via feedmail 8-beta-2 Q) WJC; 	VM 6.34 under Emacs 19.34.6
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="radar-Serbian-mElOa"
Content-Transfer-Encoding: 7bit
In-Reply-To: David J Lowe's note of 20 Nov 1997 15:46:49 -0800
References: <01BCF5CB.847222D0@vcsdlowe3.vcd.hp.com>
Precedence: bulk
From: bill@bubblegum.net (WJCarpenter)
Sender: owner-ntemacs-users@cs.washington.edu
To: ntemacs-users@cs.washington.edu
CC: aheard@buoyant.com (Andy Heard), ptlerup@hem1.passagen.se (Peter Lerup)
Subject: RE: More printing without postscript
Date: Tue,  9 Dec 1997 20:05:08 -0500


--radar-Serbian-mElOa
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

dave_lowe> I found a freeware program that lets me do 2-up printing
dave_lowe> without postscript. The program is PrintFile and can be
dave_lowe> found at http://hem1.passagen.se/ptlerup.

This is a fine utility and solves several annoying problems related to
file printing and network printers for Win95 users.  Even if you're
not currently having printer woes for NTemacs, you might want to check
it out.

dave_lowe> I use these additions to my .emacs to interface the program
dave_lowe> with the lpr package.

My first pass at using this was to paraphrase Dave Lowe's settings,
which worked well enough but seemed kind of complicated.  Also, I has
to do a similar, even more complicated bunch of stuff to be able to
use the ps-print.el stuff, which normally tries to inherit a lot from
lpr.el.

All the grief boils down to the fact that PrFile32, like any other
Win95 GUI program, can't take stdin.  Both lpr.el and ps-print.el try
to pipe regions into commands pipelines.  Even though I'm a
hunt-and-pecker at MSDOS batch files, I was able to crank out one that
copies stdin to a file and then calls PrFile32 to dispose of that
file.  That greatly simplified my lpr elisp settings and eliminated my
ps-print settings for getting things to the printer (they just inherit
from lpr stuff).  Here's what I've got now:

	(setq lpr-command "wjcsplut.bat") ;; must be on $PATH
	(setq lpr-headers-switches "fake-cuz-lpr.el-is-inconvenient")

I've included that batch file below (wjcsplut.bat).  It just needs a
couple customizations for your own environment (name of spool file and
name of PrFile32 configuration).  I don't run PrFile32 in "quiet" mode
because I use various different printers, and PrFile32 is flexible
enough to let me decide at print time which destination I want to go
to.  An unfortunate characteristic of the batch file is that it makes
NTemacs wait for PrFile32 to do its stuff, which is not really a
hardship for me (though if anyone knows how to fix that without
resorting to a different command processor, I'd be happy to hear it).
-- 
  bill@pointillist.com  Pointillist Technologies, Inc      (WJCarpenter)
  bill@buoyant.com      The Buoyant Company          +1.212.633.6649 x29
  PGP     0x1BCA333D    38 95 1B 69 C9 C6 3D 25  73 46 32 04 69 D6 ED F3

--radar-Serbian-mElOa
Content-Type: text/plain
Content-Disposition: inline; filename="wjcsplut.bat"
Content-Transfer-Encoding: 7bit

@echo off
REM   Bill Carpenter, bill@bubblegum.net, Dec 1997

REM   Since PrFile32 is a GUI program, it can't take stdin.  This
REM   script copies stdin to a file and then invokes PrFile32.

REM   I don't know how to get MSDOS to copy stdin to a file, so I'm
REM   abusing the sort command, which seems willing to do it.  The
REM   following command sorts stdin based on column 1 million; probably
REM   safe.

REM   Pick a convenient spool file name for your local situation and
REM   name a configuration via /n: that you have defined in PrFile32.

sort /+1000000         > c:\scratch\lprspool.txt
PrFile32 /n:buoyant-ps   c:\scratch\lprspool.txt

--radar-Serbian-mElOa--

