From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: James Cloos Newsgroups: gmane.emacs.help Subject: Re: postscript output? Date: Wed, 03 Jan 2007 16:35:39 -0500 Message-ID: References: <459946E7.6070807@skynet.be> <459958CC.6050401@skynet.be> <459A3729.3090400@skynet.be> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1167860201 4570 80.91.229.12 (3 Jan 2007 21:36:41 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 3 Jan 2007 21:36:41 +0000 (UTC) Cc: help-gnu-emacs@gnu.org, Tom Rauchenwald Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jan 03 22:36:39 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1H2Dmo-0005EM-KO for geh-help-gnu-emacs@m.gmane.org; Wed, 03 Jan 2007 22:36:39 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H2Dmn-0001dd-TM for geh-help-gnu-emacs@m.gmane.org; Wed, 03 Jan 2007 16:36:37 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H2DmX-0001cl-O8 for help-gnu-emacs@gnu.org; Wed, 03 Jan 2007 16:36:21 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H2DmW-0001c3-1T for help-gnu-emacs@gnu.org; Wed, 03 Jan 2007 16:36:21 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H2DmV-0001bw-Ra for help-gnu-emacs@gnu.org; Wed, 03 Jan 2007 16:36:19 -0500 Original-Received: from [64.240.156.239] (helo=ore.jhcloos.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.52) id 1H2DmU-0000Ll-UB for help-gnu-emacs@gnu.org; Wed, 03 Jan 2007 16:36:19 -0500 Original-Received: from lugabout.jhcloos.org (ppp310.tc-1.buf-ch.ny.localnet.com [69.48.14.56]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (Client CN "lugabout.jhcloos.org", Issuer "ca.jhcloos.com" (verified OK)) by ore.jhcloos.com (Postfix) with ESMTP id DE1B31C57D; Wed, 3 Jan 2007 15:36:13 -0600 (CST) Original-Received: by lugabout.jhcloos.org (Postfix, from userid 500) id 5975A140194; Wed, 3 Jan 2007 21:36:02 +0000 (GMT) Original-To: Jan Brosius In-Reply-To: <459A3729.3090400@skynet.be> (Jan Brosius's message of "Tue\, 02 Jan 2007 11\:42\:49 +0100") Copyright: Copyright 2006 James Cloos X-Hashcash: 1:23:070103:help-gnu-emacs@gnu.org::a7XJSN1lP5fVgeXX:0000000000000000000000000000000000000005ZZ5 X-Hashcash: 1:23:070103:its.sec@gmx.net::wdv+8ktU8vbhl6WK:00G/x4 X-Hashcash: 1:23:070103:jan.brosius@skynet.be::6h0cbvBkgsrtnYvs:0000000000000000000000000000000000000001Fds1 Original-Lines: 37 User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/23.0.0 (gnu/linux) 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:40128 Archived-At: >>>>> "Jan" == Jan Brosius writes: Jan> I have done this and I get a buffer called *Postscript*. Is it Jan> possible to preview this buffer in Emacs in another buffer? So you want to see what the generated PostScript code will print out when sent to a printer? You could, in that *Postscript* buffer, hit: M-< C-@ M-> M-| and then type out the command: gv - gv should then bring up a X window with the rendered PS. You may need C-Space for C-@. If you don't have gv installed, you may be able to do that with another viewer. You can also make a macro from those keystrokes, name it, and bind that to a key sequence if you will use if often. Or you can write a quick lisp function that switches to *Postscript* and calls (shell-command-on-region (point-min) (point-max) "gv -"). To get the output into an Emacs buffer, you'd have to call gs rather than gv, specifying one of the image backends Emacs can grok, and have that output to a buffer. It is doable, but I'd need to bone up on the docs to figure it out. -JimC -- James Cloos OpenPGP: 1024D/ED7DAEA6