unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* printing remotely using ssh from within emacs
@ 2004-02-11  3:20 Joe Corneli
  0 siblings, 0 replies; 2+ messages in thread
From: Joe Corneli @ 2004-02-11  3:20 UTC (permalink / raw)


I would have thought that adding these lines

 '(lpr-command "cat - | ssh jcorneli@fakehost.edu lpr")
 '(printer-name "fakeprinter")

to my custom set variables might enable me to print emacs buffers on
my remote printer using ps-print-buffer. But I seem to have guessed
wrong. Does anyone know the correct way to set this up?

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: printing remotely using ssh from within emacs
       [not found] <mailman.2205.1076469681.928.help-gnu-emacs@gnu.org>
@ 2004-02-11 20:02 ` Kevin Rodgers
  0 siblings, 0 replies; 2+ messages in thread
From: Kevin Rodgers @ 2004-02-11 20:02 UTC (permalink / raw)


Joe Corneli wrote:
 > I would have thought that adding these lines
 >
 >  '(lpr-command "cat - | ssh jcorneli@fakehost.edu lpr")
 >  '(printer-name "fakeprinter")
 >
 > to my custom set variables might enable me to print emacs buffers on
 > my remote printer using ps-print-buffer. But I seem to have guessed
 > wrong. Does anyone know the correct way to set this up?

Contrary to its name, but explained in its doc string, lpr-command is
not a shell command but an executable program (run by
call-process-region).  So your best bet is to put that pipe line into a
shell script, and point lpr-command to the script.

And setting printer-name just causes (concat lpr-printer-switch
printer-name) to be appended to the arguments passed to lpr-command, so
you should just include that in the script.

Finally "cat - | ssh ..." is equivalent to "ssh ...".

-- 
Kevin Rodgers

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-02-11 20:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.2205.1076469681.928.help-gnu-emacs@gnu.org>
2004-02-11 20:02 ` printing remotely using ssh from within emacs Kevin Rodgers
2004-02-11  3:20 Joe Corneli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).