From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Giorgos Keramidas Newsgroups: gmane.emacs.help Subject: Re: Printing fonts Date: Fri, 19 Oct 2007 17:43:04 +0300 Organization: SunSITE.dk - Supporting Open source Message-ID: <87ejfrdv2f.fsf@kobe.laptop> References: <87y7e4uskq.fsf@W0053328.mgh.harvard.edu> <3A2B8026-D31A-4B6B-A3C8-5982593D7B71@Web.DE> <8764141ew7.fsf@W0053328.mgh.harvard.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1192812084 29447 80.91.229.12 (19 Oct 2007 16:41:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 19 Oct 2007 16:41:24 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Oct 19 18:41:25 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 1IiuuZ-0005fS-10 for geh-help-gnu-emacs@m.gmane.org; Fri, 19 Oct 2007 18:41:23 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IiuuR-00072x-JG for geh-help-gnu-emacs@m.gmane.org; Fri, 19 Oct 2007 12:41:15 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!goblin1!goblin.stu.neva.ru!uio.no!news.banetele.no!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (berkeley-unix) Cancel-Lock: sha1:acZZ50pwpkqOzHOURRfDYVekMew= Original-Lines: 32 Original-NNTP-Posting-Host: 81.186.70.9 Original-X-Trace: news.sunsite.dk DXC=J=SmJQP0ZeR@?0gJFJ]ae[YSB=nbEKnk[l:4`YVO27`_L^MjWX7f^UIZ@YZY1VP2]`IJ6iVV2k:i 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:48584 Archived-At: On Thu, 18 Oct 2007 14:00:56 -0400, jadamson@partners.org (Joel J. Adamson) wrote: > jadamson@partners.org (Joel J. Adamson) writes: > > [...] > >> I only discovered enscript after writing my initial message. > > Here's a little function to do the hard work, suggestions welcome: > > > (defun my-print-buffer (font) > (interactive "sFont: ") > (let ((cmd-string > (format "enscript -u\"Joel J. Adamson\" --ul-font=Times-Roman100 --ul-style=filled -f%s -G --style=a2ps" font))) ;include page title of current buffer > (shell-command-on-region > (point-min) (point-max) cmd-string))) > > Can I split that string across lines? I'm sure there are probably better ways to do this, but the following may help: (let ((ps-options '("-u\"Joel J. Adamson\"" "--ul-font=Times-Roman100"))) (apply 'concat (apply 'append (mapcar (lambda (s) (list s " ")) ps-options)))) => "-u\"Joel J. Adamson\" --ul-font=Times-Roman100 "