Gnus development mailing list
 help / color / mirror / Atom feed
From: Michael R Cook <mcook@cognex.com>
Cc: ding@gnus.org
Subject: Re: # # # A P
Date: 24 Dec 1997 14:54:31 -0500	[thread overview]
Message-ID: <r4zplq8qko.fsf@cognex.com> (raw)
In-Reply-To: 's message of "22 Dec 1997 10:42:23 +0200"

>>>>> "J" ==   <jari.aalto@poboxes.com> 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.


  reply	other threads:[~1997-12-24 19:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-12-20 20:29 Michael R Cook
1997-12-20 23:13 ` Lars Balker Rasmussen
1997-12-21 11:58   ` Lars Balker Rasmussen
1998-01-04  9:28     ` Lars Magne Ingebrigtsen
1997-12-21 21:35   ` Michael R Cook
1997-12-22  8:42     ` jari.aalto
1997-12-24 19:54       ` Michael R Cook [this message]
1997-12-22 14:49   ` Justin Sheehy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=r4zplq8qko.fsf@cognex.com \
    --to=mcook@cognex.com \
    --cc=ding@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 NNTP newsgroup(s).