From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Harald Joerg Newsgroups: gmane.emacs.help Subject: Re: network printing on an Win2k network. Date: 09 Apr 2003 12:07:36 +0200 Organization: Fujitsu Siemens Computers EP OS MF2 Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: <000001c2fd33$0b7a5080$e508e1a7@CORREROPC> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1049883140 5485 80.91.224.249 (9 Apr 2003 10:12:20 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 9 Apr 2003 10:12:20 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Wed Apr 09 12:12:19 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 193CZ0-0001QL-00 for ; Wed, 09 Apr 2003 12:12:18 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 193CXi-0006di-03 for gnu-help-gnu-emacs@m.gmane.org; Wed, 09 Apr 2003 06:10:58 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!cyclone.bc.net!skynet.be!skynet.be!news-FFM2.ecrc.net!newsfeed.siemens.de!news.pdb.sbs.de!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 38 Original-NNTP-Posting-Host: 172.25.86.151 Original-X-Trace: dackel.pdb.sbs.de 1049882856 6200 172.25.86.151 (9 Apr 2003 10:07:36 GMT) Original-X-Complaints-To: abuse@siemens.de Original-NNTP-Posting-Date: Wed, 9 Apr 2003 10:07:36 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 Original-Xref: shelby.stanford.edu gnu.emacs.help:111813 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:8314 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:8314 pjacklam@online.no (Peter J. Acklam) writes: > I use this on Windows XP and it works perfectly ("HOST" and > "Printer" must be set appropriately) > > (setq-default ps-lpr-command "print") > (setq-default ps-printer-name "\\\\HOST\\Printer") > [...] That's what I had, too, but... > With Ghostscript installed one can get the usual Windows printer > dialog thing with > > (setq-default ps-lpr-command "gsprint.exe") > (setq-default ps-printer-name t) > (setq-default ps-printer-name-option nil) > (setq ps-lpr-switches '("-query")) ; show printer dialog I really like this one! Thanks for the hint! This inspired me to look for a solution for emacs under cygwin. Under cygwin, emacs appears *not* to create a file which can be fed to gsprint (Customize claims that it does so under "MS-DOS and MS-Windows systems"), but to pipe the buffer (or region) to whatever is defined in ps-lpr-command. I came up with a small shell procedure gsprint.sh: #!/usr/bin/bash TMPFILE=`mktemp -t emacs.print.XXXXX` || exit 1 cat >$TMPFILE /$CYGPATH_TO_gsview/gsprint.exe -query "`cygpath -w $TMPFILE`" ...and set ps-lpr-command to "gsprint.sh". -- Cheers, haj