unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Re: Printing from WindowXP version of emacs
@ 2006-01-04  0:34 BRUCE INGALLS
  2006-01-04 10:00 ` Peter Dyballa
  0 siblings, 1 reply; 21+ messages in thread
From: BRUCE INGALLS @ 2006-01-04  0:34 UTC (permalink / raw)



[-- Attachment #1.1: Type: text/plain, Size: 1427 bytes --]

>
> 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 <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" 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()

[-- Attachment #1.2: Type: text/html, Size: 2297 bytes --]

[-- Attachment #2: Type: text/plain, Size: 152 bytes --]

_______________________________________________
help-gnu-emacs mailing list
help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

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

end of thread, other threads:[~2006-01-13 17:09 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-04  0:34 Printing from WindowXP version of emacs BRUCE INGALLS
2006-01-04 10:00 ` Peter Dyballa
2006-01-05  1:56   ` BRUCE INGALLS
2006-01-05 13:01     ` Peter Dyballa
2006-01-05 15:41       ` Lennart Borgman
2006-01-05 21:17         ` Peter Dyballa
2006-01-06  8:39           ` Eli Zaretskii
2006-01-05 20:44       ` Eli Zaretskii
2006-01-05 21:18         ` Peter Dyballa
2006-01-06  8:36           ` Eli Zaretskii
2006-01-06 11:59             ` Peter Dyballa
2006-01-06 14:07               ` Eli Zaretskii
2006-01-10 17:37             ` PostScript printing Latin-N (with N != 1) (was: Printing from WindowXP version of emacs) Reiner Steib
2006-01-10 19:35               ` Eli Zaretskii
2006-01-11 15:55                 ` PostScript printing Latin-N (with N != 1) Reiner Steib
2006-01-11 19:59                   ` Eli Zaretskii
2006-01-12 20:35                     ` Reiner Steib
2006-01-13  8:10                       ` Eli Zaretskii
2006-01-13 17:09                         ` Reiner Steib
2006-01-11 21:55                   ` Peter Dyballa
2006-01-05 16:05     ` translation software (was: Printing from WindowXP version of emacs) Reiner Steib

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