help-emacs-windows
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [h-e-w] print-NT.el


From: Jeff Rancier
Subject: RE: [h-e-w] print-NT.el
Date: Wed, 10 Oct 2001 13:59:22 -0400

Thanks actually, I wanted to have a function to be able to print remote
files (visited by ange-ftp).  Most of the servers that we have don't have
rshd running, and I'd prefer the post-script print anyways.  Here is what I
have so far, but it's still trying to kick off the print via rsh?

(defun jbr-print-remote-file()
  "Allow printing of remote files locally.
Use when no rshd exists or is not active on the remote system."
  (interactive)
  (save-excursion
    (let ((tmpbuffname "(remote) ") (start 0) (end 0))
      (if (and transient-mark-mode (not mark-active))
          (progn
            (setq start (point-min))
            (setq end (point-max)))
        (progn
          (concat tmpbuffname "Subset of:")
          (set 'start (point))
          (set 'end (mark))))
      (let ((currbuff (current-buffer)))
        (set-buffer (get-buffer-create (concat tmpbuffname buffer-file-name
currbuff)))
        (erase-buffer)
        (insert-buffer-substring currbuff start end)
        (nt-ps-print-buffer)
        (message "Printing %s ..." tmpbuffname)
        (goto-char (point-min))))))

Jeff

-----Original Message-----
From: address@hidden [mailto:address@hidden
Sent: Wednesday, October 10, 2001 12:48 PM
To: Jeff Rancier
Cc: Emacs Help (Windows); address@hidden
Subject: Re: [h-e-w] print-NT.el


>>>>> "jeff" == Jeff Rancier <address@hidden> writes:

jeff> Hi,
jeff> I wrote a small function as follows:

jeff> (defun jbr-copy-reqion-and-print-scratch(start end)

By any chance, have you tried using ps-print-region?  It
seems to do pretty much what you want.  I am unfamiliar
with print-NT.el, but the code you posted looks simple enough
that you could make nt-ps-print-region() if it does not
already exist.

...cj

--
----------------------------------------------------------------------------
--
 Christopher J. White
address@hidden
----------------------------------------------------------------------------
--




reply via email to

[Prev in Thread] Current Thread [Next in Thread]