From: Joe Fineman <joe_f@verizon.net>
To: help-gnu-emacs@gnu.org
Subject: Re: Printing with emacs: Not working
Date: Fri, 27 Feb 2009 20:24:21 -0500 [thread overview]
Message-ID: <uhc2f2w1m.fsf@verizon.net> (raw)
In-Reply-To: 8dcb3b6f-ddbb-412a-a051-dd1624d960b2@r15g2000prh.googlegroups.com
DaveLG526 <David.Gillooly@gmail.com> writes:
> I have been using emacs for about a month and really like it. It
> wasn't till today that I tried to print something. I see this
> message but nothig i sever printed: Spooling with options (page
> headers are not supported)...done.
I Am Not A Programmer. I have gotten so consistently frustrated
trying to make lpr-buffer, lpr-region, tex-buffer, & tex-print work
that I have resorted to the following workarounds:
(defun lprl (r/b)
"Print all or part of buffer with TeX literal mode."
(interactive "cr(egion) or b(uffer)?")
(save-window-excursion
(let ((passage (if (equal r/b ?r)
(buffer-substring (region-beginning) (region-end))
(buffer-substring (point-min) (point-max)))))
(find-file "/usr/own/f/hdwe/printer/hp/Lpr-scratch.tex")
(delete-region (point-min) (point-max))
(insert-file "~/tex/Tex-literal-hdr")
(goto-char (point-max))
(insert passage)
(goto-char (point-max))
(insert-file "~/tex/Tex-literal-ftr")
(untabify (point-min) (point-max))
(goto-char (point-min))
(replace-regexp "\e.\\|\C-r" "")
(save-buffer)
(shell-command "latex /usr/own/f/hdwe/printer/hp/Lpr-scratch.tex") ;Doesn't understand tilde
(shell-command "dvips -f /usr/own/f/hdwe/printer/hp/Lpr-scratch.dvi | gsprint - color - ")
)))
----------------------------------------------------------------------
Tex-literal-hdr:
\documentclass[12pt]{article}
\pagestyle{empty}
\setlength{\oddsidemargin}{-.25in}
\setlength{\topmargin}{-.75in}
\setlength{\textheight}{9.5in}
\setlength{\textwidth}{7in}
----------------------------------------------------------------------
Tex-literal-ftr:
\end{verbatim}
\end{document}
----------------------------------------------------------------------
\begin{document}
\setlength{\baselineskip}{.1667in}
\noindent
\begin{verbatim}
(defun lprt ()
"Print the TeX file in the current buffer."
(interactive)
(save-window-excursion
(let ((file (buffer-string)))
(find-file "~/hdwe/printer/hp/Lpr-scratch.tex")
(delete-region (point-min) (point-max))
(insert file))
(save-buffer)
(shell-command "latex /usr/own/f/hdwe/printer/hp/Lpr-scratch.tex") ;Doesn't understand tilde
(shell-command "dvips -f /usr/own/f/hdwe/printer/hp/Lpr-scratch.dvi | gsprint - color - ")
))
--
--- Joe Fineman joe_f@verizon.net
||: First you go to hell, then your body rots, and then you die. :||
prev parent reply other threads:[~2009-02-28 1:24 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-27 4:04 Printing with emacs: Not working DaveLG526
2009-02-27 5:52 ` Jean Magnan de Bornier
2009-02-27 8:40 ` Lennart Borgman
2009-02-27 10:37 ` Eli Zaretskii
2009-02-27 16:03 ` Lennart Borgman
[not found] ` <mailman.1974.1235750623.31690.help-gnu-emacs@gnu.org>
2009-02-27 17:31 ` B. T. Raven
2009-02-27 18:13 ` Lennart Borgman
2009-02-27 18:15 ` Eli Zaretskii
2009-02-27 18:20 ` Lennart Borgman
2009-02-27 21:37 ` Eli Zaretskii
2009-02-27 21:48 ` Lennart Borgman
2009-02-27 21:58 ` Eli Zaretskii
2009-02-27 22:14 ` Lennart Borgman
2009-03-01 19:26 ` DaveLG526
2009-03-01 21:01 ` Lennart Borgman
[not found] ` <mailman.2154.1235941286.31690.help-gnu-emacs@gnu.org>
2009-03-02 4:04 ` DaveLG526
[not found] ` <mailman.1940.1235731077.31690.help-gnu-emacs@gnu.org>
2009-02-27 13:51 ` rustom
2009-02-27 15:58 ` Eli Zaretskii
[not found] ` <mailman.1973.1235750331.31690.help-gnu-emacs@gnu.org>
2009-02-28 7:38 ` rustom
2009-02-27 18:44 ` DaveLG526
2009-02-27 21:36 ` Eli Zaretskii
2009-02-28 1:24 ` Joe Fineman [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=uhc2f2w1m.fsf@verizon.net \
--to=joe_f@verizon.net \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).