all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Using PrintFile to substitute print commands in the menu in Windows XP
@ 2007-05-10 13:16 rajeshthomas
  2007-05-11 18:34 ` Eli Zaretskii
  0 siblings, 1 reply; 2+ messages in thread
From: rajeshthomas @ 2007-05-10 13:16 UTC (permalink / raw)
  To: help-gnu-emacs

Hi Emacs people,

how can i use the PrintFile utility to print from emacs. i am
running emacs version 22 on Windows XP. i have installed
the PrintFile program and now i want to get the print-buffer and
print-region commands to work with the PrintFile utility.

i downloaded the below lisp code that i got through google, and it
works
fine, but it doesn't substitute the print-region and print-buffer
commands.
(defun jjprintfile ()
  "Print _from disk_ the file named the same as the current buffer
using the great PrintFile freeware program.  Be sure to save the file
first to print with the latest changes."
  (interactive)
  (shell-command (format "PRFILE32.EXE %s"
                         (buffer-file-name))))

can some please, give me the lisp code? i am not  fluent in elisp.

Thanks,
mac.

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

* Re: Using PrintFile to substitute print commands in the menu in Windows XP
  2007-05-10 13:16 Using PrintFile to substitute print commands in the menu in Windows XP rajeshthomas
@ 2007-05-11 18:34 ` Eli Zaretskii
  0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2007-05-11 18:34 UTC (permalink / raw)
  To: help-gnu-emacs

> From: rajeshthomas@gmail.com
> Date: 10 May 2007 06:16:19 -0700
> 
> how can i use the PrintFile utility to print from emacs. i am
> running emacs version 22 on Windows XP. i have installed
> the PrintFile program and now i want to get the print-buffer and
> print-region commands to work with the PrintFile utility.

Do you really need PrintFile?  Usually, Emacs 22 on Windows prints to
the right printer by default.  Did you try that, and if you did, what
happened?

> i downloaded the below lisp code that i got through google, and it
> works
> fine, but it doesn't substitute the print-region and print-buffer
> commands.
> (defun jjprintfile ()
>   "Print _from disk_ the file named the same as the current buffer
> using the great PrintFile freeware program.  Be sure to save the file
> first to print with the latest changes."
>   (interactive)
>   (shell-command (format "PRFILE32.EXE %s"
>                          (buffer-file-name))))

You don't need this.  All you need is to customize the name of the
print command and tell it to use the /q switch, like this:

 (setq printer-name nil)
 (setq lpr-command "C:/Program Files/PrintFile/prfile32.exe")
 (setq lpr-switches '("/q"))
 (setq ps-lpr-command "C:/Program Files/PrintFile/prfile32.exe")
 (setq ps-lpr-switches '("/q"))

This sets up both regular and PostScript printing commands to use
PrintFile (assuming your printer supports PostScript).

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

end of thread, other threads:[~2007-05-11 18:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-10 13:16 Using PrintFile to substitute print commands in the menu in Windows XP rajeshthomas
2007-05-11 18:34 ` Eli Zaretskii

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.