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

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

Re: printing remotely using ssh from within emacs


From: Kevin Rodgers
Subject: Re: printing remotely using ssh from within emacs
Date: Wed, 11 Feb 2004 13:02:16 -0700
User-agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2

Joe Corneli wrote:
> I would have thought that adding these lines
>
>  '(lpr-command "cat - | ssh address@hidden 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



reply via email to

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