From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Lennart Borgman (gmail)" Newsgroups: gmane.emacs.devel,gmane.emacs.pretest.bugs Subject: Re: 23.0.50; ps-print-buffer-with-faces hangs on w32 Date: Thu, 10 Jan 2008 17:11:36 +0100 Message-ID: <478643B8.5010903@gmail.com> References: <4784F452.6060202@gmail.com> <47851163.8050205@ig.com.br> <47850C39.5060905@gmail.com> <47862D83.3030709@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1199981521 10035 80.91.229.12 (10 Jan 2008 16:12:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 10 Jan 2008 16:12:01 +0000 (UTC) Cc: emacs-pretest-bug@gnu.org, Eli Zaretskii To: Jason Rumney Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jan 10 17:12:21 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JD00y-0001OL-G6 for ged-emacs-devel@m.gmane.org; Thu, 10 Jan 2008 17:12:20 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JD00a-0007b2-Oe for ged-emacs-devel@m.gmane.org; Thu, 10 Jan 2008 11:11:56 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JD00V-0007YJ-MP for emacs-devel@gnu.org; Thu, 10 Jan 2008 11:11:51 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JD00U-0007XV-OE for emacs-devel@gnu.org; Thu, 10 Jan 2008 11:11:51 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JD00U-0007XA-Ih for emacs-devel@gnu.org; Thu, 10 Jan 2008 11:11:50 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JD00U-0003fy-G8 for emacs-devel@gnu.org; Thu, 10 Jan 2008 11:11:50 -0500 Original-Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1JD00U-0003G7-0f for emacs-pretest-bug@gnu.org; Thu, 10 Jan 2008 11:11:50 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1JD00R-0003ev-1Z for emacs-pretest-bug@gnu.org; Thu, 10 Jan 2008 11:11:50 -0500 Original-Received: from ch-smtp02.sth.basefarm.net ([80.76.149.213]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JD00M-0003dL-4i; Thu, 10 Jan 2008 11:11:42 -0500 Original-Received: from c83-254-148-228.bredband.comhem.se ([83.254.148.228]:62135 helo=[127.0.0.1]) by ch-smtp02.sth.basefarm.net with esmtp (Exim 4.68) (envelope-from ) id 1JD00K-0003ss-6T; Thu, 10 Jan 2008 17:11:40 +0100 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666 In-Reply-To: <47862D83.3030709@gnu.org> X-Antivirus: avast! (VPS 080109-0, 2008-01-09), Outbound message X-Antivirus-Status: Clean X-Originating-IP: 83.254.148.228 X-Scan-Result: No virus found in message 1JD00K-0003ss-6T. X-Scan-Signature: ch-smtp02.sth.basefarm.net 1JD00K-0003ss-6T 307d43414f910f2e6813e1d494b9bb88 X-detected-kernel: by monty-python.gnu.org: Linux 2.6? (barebone, rare!) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:86707 gmane.emacs.pretest.bugs:20578 Archived-At: Jason Rumney wrote: > Lennart Borgman (gmail) wrote: >>> >>> What exactly does this mean? >>> >>> Does any Emacs variable have the value "C:\\PRN"? >> >> The variable `printer' above. > I don't have a variable `printer', is this from an external package you > have installed? Hi Jason, No, it is a variable in the function I mentioned in the bug report: Emacs hangs in direct-print-region-helper in the call to (write-region start end printer t 0) at the end of the function. Emacs is completely hanged. I have to kill Emacs from Windows Task Manager. This function is in dos-w32.el. > I do have a variable `printer-name', but it's default value on Windows > is the device name "PRN", I have the same. > not "C:\\PRN" This is what Emacs has translated "PRN" to at the end of the function above. >>> What is a "Windows printer"? >> >> I forgot what these printers are called. It seems like they are called >> "GDI printers" or "winprinters". > Calling them winprinters suggests that there is something that makes > them a win over other more functional printers. Maybe. > Really the printer > hardware is not the issue, often the printer will be better supported by > Free Software like CUPS than by the manufacturers own Windows drivers, > so calling them Windows printers is also misleading. What you really > mean is that the Windows printer drivers that the manufacturer has > supplied are limited to supporting only GDI based printing, as they do > not expose a character device (and are connected via USB, so the COM or > PAR character devices are not automatically available) Correct. > that could be > used to print directly to the printer in text mode or whatever command > language(s) that the printer supports natively (eg Postscript, PCL or > ESC/P). This problem can often be worked around by sharing the printer > from Windows, and setting the printer-name within Emacs to the network > share path of the printer (eg "//localhost/printer"). Yes, that is perhaps a nice little trick. Though I had never had any reason to test it, but if you think it works then maybe this is something worth mentioning on (info "(emacs) Windows Printing")? > But it is unlikely that a printer with such limited drivers supports > Postscript natively, so to use the ps-print commands, you'll need to set > up a software postscript interpreter such as Ghostscript anyway. That is correct, but it is not the problem I am reporting. I must have made some bad mistake in my initial bug report since both you and Eli misunderstood me this way. What I was reporting was that under certain (rather common conditions) Emacs can hang if a user tries to print a file. Emacs hangs very badly and can not be interrupted. You have to kill Emacs from outside - and that of course means that the user can loose data. (It has nothing per se with ps-print-* to do, it hangs in the same way if one uses print-buffer. I actually did M-x ps-print-buffer just to see how Emacs failed.) So my question is what we can do about this? I doubt that there is anything we easily can do technically about it since I notice that in a cmd.exe console copy /b some-non-emtpy-file.txt PRN: hangs the console window rather badly. I think however that we should do something since GDI printers are common on w32. What we can do is to warn the user. The best way IMO would be to add a y/n question in the function direct-print-region-helper in dos-w32.el that warns the user that Emacs might hang. (And of course an option to bypass the question.)