Printing 我需要在.emacs中放入什么才能打印到默认的Windows打印机?

Printing 我需要在.emacs中放入什么才能打印到默认的Windows打印机?,printing,emacs23,Printing,Emacs23,我以前在Windows+Cygwin中的Emacs 21中可以完美地进行PostScript打印,但升级到Emacs 23后,我在minibuffer中收到以下错误: 打开输出文件:无效参数,C:/PDFCreator: My current.emacs包含当前的相关声明: (require 'ps-print) (setq ps-spool-duplex t) (setq ps-auto-font-detect nil) (setq ps-print-color-p nil) 它过去也有以下

我以前在Windows+Cygwin中的Emacs 21中可以完美地进行PostScript打印,但升级到Emacs 23后,我在minibuffer中收到以下错误:

打开输出文件:无效参数,C:/PDFCreator:

My current.emacs包含当前的相关声明:

(require 'ps-print)
(setq ps-spool-duplex t)
(setq ps-auto-font-detect nil)
(setq ps-print-color-p nil)
它过去也有以下行:

(setq ps-lpr-command "qprt")
但它也会产生类似的错误:

搜索程序:无此类文件或目录,qprt

你知道Emacs 23中发生了什么变化,以及我如何使打印恢复生机吗

(此时,我只对打印到默认Windows打印机感兴趣,即)。

从中,建议使用以下配置。 其中,lpr是Cygwin lpr版本

  (setenv "PRINTER" "PDFCreator")
    (cond ((eq system-type 'windows-nt)
       (setq ps-printer-name "PDFCreator")
       (setq ps-printer-name-option "-d")
       (setq ps-lpr-command "/bin/lpr")))
您也可以在那里使用Ghostscript配置,并从弹出窗口中选择PDFCreator打印机。相应地调整
GS_LIB
和ghostscript二进制位置

(setenv "GS_LIB" "e:/tools/GSTools/gs8.14/gs8.14/lib;e:/tools/GSTools/gs8.14/fonts")
   (setq ps-lpr-command "e:/tools/GSTools/gs8.14/gs8.14/bin/gswin32c.exe")
   (setq ps-lpr-switches '("-q" "-dNOPAUSE" "-dBATCH" "-sDEVICE=mswinpr2"))
   (setq ps-printer-name t)

请注意PDFCreator的用户-他们现在安装了一组工具栏,并在您安装它时接管您的web浏览器


我让PDFCreator与Emacs一起正常工作,然后我犯了让PDFCreator自我更新的错误。它将我所有的搜索查询重定向到Bing,接管了一系列浏览器设置,添加了工具栏、默认登录页等。我花了大约一个小时清除了它添加的所有垃圾

我有与海报相同的符号,但这不是因为Emacs 23有任何变化。 我的打印机是支持postscript的网络打印机

首先,当我的工作电脑从Windows升级到Vista时,我的主机名发生了轻微的变化。我不得不相应地改变一个字符: 从

这更改了错误消息

direct-print-region-helper: Opening output file: invalid argument, //evf4ce46ac4ad3/seki81050470cm

然后我必须启用打印机的共享。这是在

\\e7f4ce46ac4ad3\Printers
这可能可以用更一般的方式找到。\\%computername%\Printers不适合我;我不知道为什么

右键单击打印机图标,选择共享并启用共享此打印机,使用合适的打印机名称,最好不带空格


这足以让我打印。

谢谢。Cygwin lpr版本可以工作,除了ps lpr命令应该是普通的
“lpr”
(既不能
“/bin/lpr”
也不能
“usr/bin/lpr”
工作)。
direct-print-region-helper: Opening output file: invalid argument, //evf4ce46ac4ad3/seki81050470cm
direct-print-region-helper: Opening output file: no such file or directory, //e7f4ce46ac4ad3/seki81050470cm
\\e7f4ce46ac4ad3\Printers