unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* printing from within emacs
@ 2004-07-12 22:29 Lowell Kirsh
  2004-07-13  0:13 ` Michael Slass
  0 siblings, 1 reply; 4+ messages in thread
From: Lowell Kirsh @ 2004-07-12 22:29 UTC (permalink / raw)


I'm having trouble printing to a remote printer from within emacs. The 
command I normally use from the cmd line is 'ssh host print'. How can I 
get emacs to use this command?

Lowell

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

* Re: printing from within emacs
  2004-07-12 22:29 printing from within emacs Lowell Kirsh
@ 2004-07-13  0:13 ` Michael Slass
  2004-07-13 15:58   ` Kevin Rodgers
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Slass @ 2004-07-13  0:13 UTC (permalink / raw)


Lowell Kirsh <lkirsh@cs.ubc.ca> writes:

>I'm having trouble printing to a remote printer from within emacs. The
>command I normally use from the cmd line is 'ssh host print'. How can
>I get emacs to use this command?
>
>Lowell

Check out docs for the variable lpr-command
,----[ C-h v lpr-command RET ]
| lpr-command's value is "lpr"
| 
| Documentation:
| *Name of program for printing a file.
| 
| On MS-DOS and MS-Windows systems, if the value is an empty string then
| Emacs will write directly to the printer port named by `printer-name'.
| The programs `print' and `nprint' (the standard print programs on
| Windows NT and Novell Netware respectively) are handled specially, using
| `printer-name' as the destination for output; any other program is
| treated like `lpr' except that an explicit filename is given as the last
| argument.
| 
| You can customize this variable.
| 
| Defined in `lpr'.
`----

-- 
Mike Slass

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

* Re: printing from within emacs
  2004-07-13  0:13 ` Michael Slass
@ 2004-07-13 15:58   ` Kevin Rodgers
  2004-07-14  2:06     ` Lowell Kirsh
  0 siblings, 1 reply; 4+ messages in thread
From: Kevin Rodgers @ 2004-07-13 15:58 UTC (permalink / raw)


Michael Slass wrote:
 > Lowell Kirsh <lkirsh@cs.ubc.ca> writes:
 >>I'm having trouble printing to a remote printer from within emacs. The
 >>command I normally use from the cmd line is 'ssh host print'. How can
 >>I get emacs to use this command?
 >
 > Check out docs for the variable lpr-command
 > ,----[ C-h v lpr-command RET ]
 > | lpr-command's value is "lpr"
 > |
 > | Documentation:
 > | *Name of program for printing a file.
...

Although the variable is named with a -command suffix, it's doc string
accurately describes its value as a program name.  That is, it is
invoked via call-process (actually, call-process-region) not via a
shell-command.  So I think what Lowell needs is

(setq lpr-command "ssh"
       lpr-switches '("host" "print")
       lpr-add-switches nil)

-- 
Kevin Rodgers

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

* Re: printing from within emacs
  2004-07-13 15:58   ` Kevin Rodgers
@ 2004-07-14  2:06     ` Lowell Kirsh
  0 siblings, 0 replies; 4+ messages in thread
From: Lowell Kirsh @ 2004-07-14  2:06 UTC (permalink / raw)


This works great. Thanks :)

Kevin Rodgers wrote:
> Michael Slass wrote:
>  > Lowell Kirsh <lkirsh@cs.ubc.ca> writes:
>  >>I'm having trouble printing to a remote printer from within emacs. The
>  >>command I normally use from the cmd line is 'ssh host print'. How can
>  >>I get emacs to use this command?
>  >
>  > Check out docs for the variable lpr-command
>  > ,----[ C-h v lpr-command RET ]
>  > | lpr-command's value is "lpr"
>  > |
>  > | Documentation:
>  > | *Name of program for printing a file.
> ...
> 
> Although the variable is named with a -command suffix, it's doc string
> accurately describes its value as a program name.  That is, it is
> invoked via call-process (actually, call-process-region) not via a
> shell-command.  So I think what Lowell needs is
> 
> (setq lpr-command "ssh"
>       lpr-switches '("host" "print")
>       lpr-add-switches nil)
> 

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

end of thread, other threads:[~2004-07-14  2:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-12 22:29 printing from within emacs Lowell Kirsh
2004-07-13  0:13 ` Michael Slass
2004-07-13 15:58   ` Kevin Rodgers
2004-07-14  2:06     ` Lowell Kirsh

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).