From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: BRUCE INGALLS Newsgroups: gmane.emacs.help Subject: Re: Printing from WindowXP version of emacs Date: Tue, 3 Jan 2006 19:34:04 -0500 Message-ID: <534d19de0601031634o49dfd53dl7d701ff6512900f9@mail.gmail.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0445143025==" X-Trace: sea.gmane.org 1136335382 5144 80.91.229.2 (4 Jan 2006 00:43:02 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 4 Jan 2006 00:43:02 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jan 04 01:43:00 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Etwjy-0001vk-K7 for geh-help-gnu-emacs@m.gmane.org; Wed, 04 Jan 2006 01:42:59 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Etwlc-0001xJ-LD for geh-help-gnu-emacs@m.gmane.org; Tue, 03 Jan 2006 19:44:40 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Etwd6-0007qS-7g for help-gnu-emacs@gnu.org; Tue, 03 Jan 2006 19:35:52 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Etwd2-0007pr-UH for help-gnu-emacs@gnu.org; Tue, 03 Jan 2006 19:35:51 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Etwd2-0007po-HP for help-gnu-emacs@gnu.org; Tue, 03 Jan 2006 19:35:48 -0500 Original-Received: from [64.233.184.199] (helo=wproxy.gmail.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EtweL-0001TO-Nf for help-gnu-emacs@gnu.org; Tue, 03 Jan 2006 19:37:09 -0500 Original-Received: by wproxy.gmail.com with SMTP id i30so562117wra for ; Tue, 03 Jan 2006 16:34:05 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=Jyyd0sO09f5WYLpkFtOKLmIx3P3I6zehw9UpxE/oWaZ5pWx8rYhy3YZWijj28QacmAXnu08qHMt4TDY45BcjRNYUZIoxGeobFdnmShGShecLfnyRTQRmNf0E1piNjzG80YdxBs8a9wY9TpY0K1Wxb0Cp7L2KY81OOtweFQnk0Nc= Original-Received: by 10.54.72.9 with SMTP id u9mr1882402wra; Tue, 03 Jan 2006 16:34:04 -0800 (PST) Original-Received: by 10.54.127.3 with HTTP; Tue, 3 Jan 2006 16:34:04 -0800 (PST) Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:32404 Archived-At: --===============0445143025== Content-Type: multipart/alternative; boundary="----=_Part_20690_8453474.1136334844815" ------=_Part_20690_8453474.1136334844815 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline > > From: Peter Dyballa > Date: Tue, 3 Jan 2006 10:44:15 +0100 > Subject: Re: Printing from WindowXP version of emacs > > > That said, yet another hack is available: there already is code to > > export emacs buffers to PDF. > > Could you drop some names, please? Feel free to browse http://EMacro.sf.net/ for more of this stuff. I expect to make a new release, this month. Here is the relevant code, from e-common.el: ;;Note that ps2pdf might not be installed (defun save-current-buffer-as-pdf () "Export pretty-printed file to PDF format." (interactive) (ps-print-buffer-with-faces (concat (buffer-file-name) ".ps")) (shell-command (concat "ps2pdf " (buffer-file-name) ".ps")) (delete-file (concat (buffer-file-name) ".ps")) (message "Done")) (defvar cache-htmlize) ;shut up compiler (cache-locate-library use-cache 'cache-htmlize "htmlize" "To export as HTML, get htmlize.el from ") (when cache-htmlize (require 'htmlize)) (when (or cache-htmlize (which "ps2pdf")) (easy-menu-change file-menu "Export As" (list ["PDF" save-current-buffer-as-pdf (if (which "ps2pdf") t nil)] ;enable only if in PATH ["HTML" htmlize-buffer (if cache-htmlize t nil)]))) ;;note that cache-htmlize can be replaced by a slower call to locate-library() ------=_Part_20690_8453474.1136334844815 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
From: Peter = Dyballa
Date: Tue, 3 Jan 2006 10:44:15 +0100
Subject: Re: Printing f= rom WindowXP version of emacs

> That said, yet another hack is available: there already is cod= e to
> export emacs buffers to PDF.

Could you drop some names,= please?

Feel free to browse http://EMacro.sf.net/= for more of this stuff.
I expect to make a new release, this month.
Here is the relevant code, from e-common.el:

;;Note that ps2pdf might not be installed
(defun save-current-buffer-as-pdf ()
  "Export pretty-printed file to PDF format."
  (interactive)
  (ps-print-buffer-with-faces (concat (buffer-file-name) ".ps&quo= t;))
  (shell-command (concat "ps2pdf " (buffer-file-name) "= .ps"))
  (delete-file (concat (buffer-file-name) ".ps"))
  (message "Done"))

(defvar cache-htmlize)          &nb= sp; ;shut up compiler
(cache-locate-library
 use-cache 'cache-htmlize "htmlize"
 "To export as HTML, get htmlize.el from <url:http://fly.srk.fer.hr/~hniksic/= emacs/htmlize.el>")

(when cache-htmlize (require 'htmlize))

(when (or cache-htmlize (which "ps2pdf"))
  (easy-menu-change file-menu "Export As"
            (list
             ["PDF&q= uot; save-current-buffer-as-pdf
              (if (w= hich "ps2pdf") t nil)] ;enable only if in PATH
             ["HTML&= quot; htmlize-buffer
              (if ca= che-htmlize t nil)])))

;;note that cache-htmlize can be replaced by a slower call to locate-librar= y()

------=_Part_20690_8453474.1136334844815-- --===============0445143025== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ help-gnu-emacs mailing list help-gnu-emacs@gnu.org http://lists.gnu.org/mailman/listinfo/help-gnu-emacs --===============0445143025==--