我可以在打印过程中更改emacs写入文件的位置吗?

时间:2014-02-10 15:00:35

标签: emacs emacsw32

我们的网络系统设置为无法直接写入根目录(C :),因此在尝试打印时出现以下错误。

Spooling with options (page headers are not supported)...
direct-print-region-helper: Opening output file: permission denied, c:/IP_139.222.92.102

如果我能以某种方式更改emacs尝试写入的位置(在任何其他地方),它可能会有效。

在MS Win 7上运行的GNU emacs 24.3.1

2 个答案:

答案 0 :(得分:1)

我尝试了在这个帖子中给出的各种解决方案,但没有成功。我看到有人评论引用斜线。所以,我进入了

(setq printer-name“\\\\ MyComputer \\ HP8600”)

(setq ps-printer-name“\\\\ MyComputer \\ HP8600”)

<。>在.emacs文件中,以及SUCCESS。显然,您必须更改名称“MyComputer”以使您的计算机和HP8600与您的打印机名称相匹配(均可通过控制面板获得)。

答案 1 :(得分:0)

调整pr-temp-dir,例如:

(setq pr-temp-dir "c:/some/other/location")

在需要'printing后,我的Linux系统上的C-h v pr-temp-dir给出了:

pr-temp-dir is a variable defined in `printing.el'.
Its value is "/tmp/"

Documentation:
Specify a directory for temporary files during printing.

See also `pr-ps-temp-file' and `pr-file-modes'.

You can customize this variable.

您可能必须使用引用或转义Windows样式的路径。