[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[h-e-w] print-NT.el
From: |
Jeff Rancier |
Subject: |
[h-e-w] print-NT.el |
Date: |
Wed, 10 Oct 2001 10:40:03 -0400 |
Hi,
I wrote a small function as follows:
(defun jbr-copy-reqion-and-print-scratch(start end)
"Erase *scratch*. Copy region to *scratch*. Print the buffer."
(interactive "r")
(let ((currbuff (current-buffer)))
(save-excursion
(set-buffer (get-buffer-create "*scratch*"))
(erase-buffer)
(insert-buffer-substring currbuff start end)
(nt-ps-print-buffer))))
(global-set-key "\C-cj" 'jbr-copy-reqion-and-print-scratch)
Everything seems to work, but it won't print. I can switch to *scratch*,
and manually print it using nt-ps-print-buffer(), but not from within the
function. Should I be able to do this?
The function in print-NT.el is as follows:
(defun nt-ps-print-buffer ()
"Print buffer using postscript."
(interactive)
(if ps-print-use-faces
(ps-print-buffer-with-faces ps-lpr-buffer)
(ps-print-buffer ps-lpr-buffer)
)
(ps-print-lpr-buffer ps-lpr-buffer)
)
TIA.
Jeff
- [h-e-w] print-NT.el,
Jeff Rancier <=