From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "B. T. Raven" Newsgroups: gmane.emacs.help Subject: Re: printing from w32 emacs Date: Tue, 08 Nov 2005 01:11:07 GMT Organization: EarthLink Inc. -- http://www.EarthLink.net Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1131412575 18541 80.91.229.2 (8 Nov 2005 01:16:15 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 8 Nov 2005 01:16:15 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Nov 08 02:16:14 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EZI54-00014l-KV for geh-help-gnu-emacs@m.gmane.org; Tue, 08 Nov 2005 02:15:22 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EZI53-0002JJ-UJ for geh-help-gnu-emacs@m.gmane.org; Mon, 07 Nov 2005 20:15:22 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!elnk-nf2-pas!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!stamper.news.atl.earthlink.net!newsread3.news.atl.earthlink.net.POSTED!0847253b!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 89 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Original-NNTP-Posting-Host: 4.159.160.121 Original-X-Complaints-To: abuse@earthlink.net Original-X-Trace: newsread3.news.atl.earthlink.net 1131412267 4.159.160.121 (Mon, 07 Nov 2005 17:11:07 PST) Original-NNTP-Posting-Date: Mon, 07 Nov 2005 17:11:07 PST Original-Xref: shelby.stanford.edu gnu.emacs.help:135303 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:30896 Archived-At: "Eli Zaretskii" wrote in message news:mailman.14313.1131394933.20277.help-gnu-emacs@gnu.org... > > From: "B. T. Raven" > > Date: Mon, 07 Nov 2005 04:24:24 GMT > > > > Has any of you out there been able to print from emacs to your local > > printer? > > Yes, easily. > > > My installation is acting as if I am printing to NULL. This is > > from an emacs 21.3 on win98 to a Canon i850. Neither PRN (default) or > > LPT1 works as 'printer-name, quoted or not. Printer works fine if I > > minimize emacs and run any other windows app incorporating a print > > function. I had same results with an HP laserjet. > > I would appreciate any light any of you could throw on this problem. > > Did you try to read the manual and follow its advice? The node > "MS-DOS printing" (whose name is misleading: it pertains to Windows as > well) explains how to find out what printer name to use in Emacs and > how to set up printing in several popular situations. > > Thanks Lennart and Eli. Eli, yes I did read it, more than once. I think I even understood everything except the part about printing on a network. I left 'lpr-command at "" (null string). I tried PRN (and suffixed with :), LPT1, LPT2, LPT3. Printer light blinks once but nothing else happens. It's no longer possible to test printing from the dos shell since COPY FILENAME PRN and TYPE FILENAME > PRN are no longer supported by dos, at least not under windows. A program (I think by Lennart) named something like winprint.el can print through Notepad but it overwrites part of the menu bar and then (fortunately after printing) crashes Notepad. I would like to try Lennart's w32-print.el but I am having trouble finding it. Also I want to stick with the current 21.3 ntemacs rather than change to a windows work-alike. The closest to doing what I want is possible by going through Ghostscript/Ghostview. With this in my .emacs: (setq ps-lpr-command "C:\\Program Files\\Ghostgum\\gsview\\gsprint.exe") (setq ps-printer-name t) I can print ordinary files with this setup but if the files contain any characters outside of the Latin-1 range then a popup dialogue appears with: "Font for some characters not found..." when I run Postscript print buffer. I don't know why the emacs file can't just be mapped to one bit per pixel and sent to the printer the way the GDI printer works in Windows. Lennart, yes the printer works from the browser. I printed out all 9 pages of your web site in living color. Does the w32-print.el also use the web browser? I want to keep emacs working as much as possible like the GNU Linux version and do things with the simplest theoretically possible method. With only the following w32 related tweaks to my .emacs: ... '(indent-tabs-mode nil) '(kill-read-only-ok t) '(pc-selection-mode t nil (pc-select)) '(sentence-end "[.?!][]\"')}]*\\($\\| $\\| \\| \\)[ ]*") ;; the above used to have a \n in the repexp but the actual ;; linefeed seems not to affect the working of it. ;; changed from default to have dot space interpreted ;; as sentence end. '(sentence-end-double-space nil) '(tab-stop-list (quote (3 8 20 35 50 70 85 100 115))) '(tab-width 3) ... Calendar display is messed up and text buffers with long lines sometimes fail to wrap lines (no bent arrow and text to the right of the frame can only be seen if the line is split with a hard return. When this happens, point and mouse click no longer correspond but this out-of-synchness can be corrected by changing font size and then changing it back. Apparently emacs is doing something with calculating line length based on the current font character widths. Thanks again. I guess I'll have to settle for save as utf-8 encoding, insert as encoded text into an OpenOffice text file and then copy-paste or print from there.