From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/13354 Path: main.gmane.org!not-for-mail From: Michael R Cook Newsgroups: gmane.emacs.gnus.general Subject: Re: # # # A P Date: 24 Dec 1997 14:54:31 -0500 Sender: owner-ding@hpc.uh.edu Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no X-Trace: main.gmane.org 1035152736 8870 80.91.224.250 (20 Oct 2002 22:25:36 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 22:25:36 +0000 (UTC) Cc: ding@gnus.org Return-Path: Original-Received: from xemacs.org (xemacs.cs.uiuc.edu [128.174.252.16]) by altair.xemacs.org (8.8.8/8.8.8) with ESMTP id MAA27382 for ; Wed, 24 Dec 1997 12:08:26 -0800 Original-Received: from sina.hpc.uh.edu (root@Sina.HPC.UH.EDU [129.7.3.5]) by xemacs.org (8.8.5/8.8.5) with ESMTP id OAA28833 for ; Wed, 24 Dec 1997 14:09:46 -0600 (CST) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by sina.hpc.uh.edu (8.7.3/8.7.3) with ESMTP id NAJ26107; Wed, 24 Dec 1997 13:56:14 -0600 (CST) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Wed, 24 Dec 1997 13:55:36 -0600 (CST) Original-Received: from claymore.vcinet.com (claymore.vcinet.com [208.205.12.23]) by sina.hpc.uh.edu (8.7.3/8.7.3) with SMTP id NAA26094 for ; Wed, 24 Dec 1997 13:55:28 -0600 (CST) Original-Received: (qmail 1767 invoked by uid 504); 24 Dec 1997 19:55:13 -0000 Original-Received: (qmail 1761 invoked from network); 24 Dec 1997 19:55:10 -0000 Original-Received: from cognex-bh.cognex.com (198.232.30.66) by claymore.vcinet.com with SMTP; 24 Dec 1997 19:55:09 -0000 Original-Received: (from uucp@localhost) by cognex-bh.cognex.com (8.6.12/8.6.11) id OAA00288; Wed, 24 Dec 1997 14:55:06 -0500 Original-Received: from isys.com by cognex-bh.cognex.com via smap (3.2) id xma000281; Wed, 24 Dec 97 14:54:37 -0500 Original-Received: from erawan.cognex.com (erawan.cognex.com [10.10.1.80]) by cognex.cognex.com (8.8.7/8.8.7) with ESMTP id OAA28123; Wed, 24 Dec 1997 14:54:36 -0500 (EST) Original-Received: by erawan.cognex.com (8.6.12/8.6.12) id OAA18970; Wed, 24 Dec 1997 14:54:32 -0500 Original-To: larsi@gnus.org In-Reply-To: 's message of "22 Dec 1997 10:42:23 +0200" Original-Lines: 72 X-Mailer: Quassia Gnus v0.18/Emacs 19.34 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:13354 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:13354 >>>>> "J" == writes: J> The framework goes something like this, this is excerpt from my J> TinyGnus.el package. Okay, this patch makes `gnus-summary-print-article' #-aware. This patch includes an interface change (`gnus-summary-print-article' was a 1-option arg function, now it's a 2-optional arg function). *** gnus-sum.el.~1~ Sat Dec 6 11:45:19 1997 --- gnus-sum.el Wed Dec 24 14:36:48 1997 *************** *** 6676,6700 **** (when gnus-page-broken (gnus-narrow-to-page)))) ! (defun gnus-summary-print-article (&optional filename) ! "Generate and print a PostScript image of the article buffer. ! If the optional argument FILENAME is nil, send the image to the printer. ! If FILENAME is a string, save the PostScript image in a file with that ! name. If FILENAME is a number, prompt the user for the name of the file to save in." ! (interactive (list (ps-print-preprint current-prefix-arg))) ! (gnus-summary-select-article) ! (gnus-eval-in-buffer-window gnus-article-buffer ! (let ((buffer (generate-new-buffer " *print*"))) ! (unwind-protect ! (progn ! (copy-to-buffer buffer (point-min) (point-max)) ! (set-buffer buffer) ! (gnus-article-delete-invisible-text) ! (run-hooks 'gnus-ps-print-hook) ! (ps-print-buffer-with-faces filename)) ! (kill-buffer buffer))))) (defun gnus-summary-show-article (&optional arg) "Force re-fetching of the current article. --- 6676,6706 ---- (when gnus-page-broken (gnus-narrow-to-page)))) ! (defun gnus-summary-print-article (&optional n filename) ! "Generate and print a PostScript image of the N next (mail) articles. ! If N is negative, print the N previous articles. If N is nil and articles ! have been marked with the process mark, print these instead. ! ! If the optional second argument FILENAME is nil, send the image to the ! printer. If FILENAME is a string, save the PostScript image in a file with ! that name. If FILENAME is a number, prompt the user for the name of the file to save in." ! (interactive (list current-prefix-arg ! (ps-print-preprint current-prefix-arg))) ! (let ((articles (gnus-summary-work-articles n))) ! (dolist (nbr articles) ! (gnus-summary-select-article 'all nil 'pseudo nbr) ! (gnus-eval-in-buffer-window gnus-article-buffer ! (let ((buffer (generate-new-buffer " *print*"))) ! (unwind-protect ! (progn ! (copy-to-buffer buffer (point-min) (point-max)) ! (set-buffer buffer) ! (gnus-article-delete-invisible-text) ! (run-hooks 'gnus-ps-print-hook) ! (ps-print-buffer-with-faces filename)) ! (kill-buffer buffer))))))) (defun gnus-summary-show-article (&optional arg) "Force re-fetching of the current article. Michael.