Gnus development mailing list
 help / color / mirror / Atom feed
* Support for Muttprint
@ 2001-12-16 18:01 Simon Josefsson
  2001-12-16 18:05 ` Simon Josefsson
  2001-12-17 17:20 ` Nevin Kapur
  0 siblings, 2 replies; 4+ messages in thread
From: Simon Josefsson @ 2001-12-16 18:01 UTC (permalink / raw)


I've committed the below, to support Muttprint.  Install Muttprint
from http://muttprint.sourceforge.net/ and print using it with `O P'.

2001-12-16  Simon Josefsson  <jas@extundo.com>
	Inspired by code by Bernhard Walle <Bernhard.Walle@gmx.de>.

	* gnus-sum.el (gnus-summary-muttprint-program): New variable.
	(gnus-summary-save-map): Add muttprint.
	(gnus-summary-make-menu-bar): Ditto.
	(gnus-summary-muttprint): New function.

	* gnus-art.el (gnus-summary-pipe-to-muttprint): New function.

2001-12-16  Simon Josefsson  <jas@extundo.com>

	* gnus.texi (Saving Articles): Add muttprint.
	(Article Commands): Mention muttprint.

--- gnus-sum.el.~6.130.~	Wed Dec 12 17:56:38 2001
+++ gnus-sum.el	Sun Dec 16 18:43:02 2001
@@ -998,6 +998,11 @@
   :group 'gnus-summary
   :type '(choice boolean regexp))
 
+(defcustom gnus-summary-muttprint-program "muttprint"
+  "Command (and optional arguments) used to run Muttprint."
+  :group 'gnus-summary
+  :type 'string)
+
 ;;; Internal variables
 
 (defvar gnus-summary-display-cache nil)
@@ -1801,6 +1806,7 @@
     "h" gnus-summary-save-article-folder
     "v" gnus-summary-save-article-vm
     "p" gnus-summary-pipe-output
+    "P" gnus-summary-muttprint
     "s" gnus-soup-add-article)
 
   (gnus-define-keys (gnus-summary-mime-map "K" gnus-summary-mode-map)
@@ -1929,6 +1935,7 @@
 	      ["Save body in file" gnus-summary-save-article-body-file t]
 	      ["Pipe through a filter" gnus-summary-pipe-output t]
 	      ["Add to SOUP packet" gnus-soup-add-article t]
+	      ["Print with Muttprint" gnus-summary-muttprint t]
 	      ["Print" gnus-summary-print-article t])
 	     ("Backend"
 	      ["Respool article..." gnus-summary-respool-article t]
@@ -9946,6 +9953,17 @@
   (let ((gnus-default-article-saver 'gnus-summary-save-body-in-file))
     (gnus-summary-save-article arg)))
 
+(defun gnus-summary-muttprint (&optional arg)
+  "Print the current article using Muttprint.
+If N is a positive number, save the N next articles.
+If N is a negative number, save the N previous articles.
+If N is nil and any articles have been marked with the process mark,
+save those articles instead."
+  (interactive "P")
+  (require 'gnus-art)
+  (let ((gnus-default-article-saver 'gnus-summary-pipe-to-muttprint))
+    (gnus-summary-save-article arg t)))
+
 (defun gnus-summary-pipe-message (program)
   "Pipe the current article through PROGRAM."
   (interactive "sProgram: ")
--- gnus-art.el.~6.122.~	Wed Dec 12 17:40:52 2001
+++ gnus-art.el	Sun Dec 16 18:47:09 2001
@@ -2763,6 +2763,13 @@
       (shell-command-on-region (point-min) (point-max) command nil)))
   (setq gnus-last-shell-command command))
 
+(defun gnus-summary-pipe-to-muttprint (&optional command)
+  "Pipe this article to muttprint."
+  (setq command (read-string
+		 "Print using command: " gnus-summary-muttprint-program
+		 nil gnus-summary-muttprint-program))
+  (gnus-summary-save-in-pipe command))
+
 ;;; Article file names when saving.
 
 (defun gnus-capitalize-newsgroup (newsgroup)
--- gnus.texi.~6.195.~	Sat Dec 15 18:23:12 2001
+++ gnus.texi	Sun Dec 16 18:58:55 2001
@@ -6932,6 +6932,17 @@
 @findex gnus-summary-pipe-output
 Save the current article in a pipe.  Uhm, like, what I mean is---Pipe
 the current article to a process (@code{gnus-summary-pipe-output}).
+
+@item O P
+@kindex O P (Summary)
+@findex gnus-summary-muttprint
+@vindex gnus-summary-muttprint-program
+Save the current article into muttprint. That is, print it using the
+external program Muttprint (see
+@uref{http://muttprint.sourceforge.net/}). The program name and
+options to use is controlled by the variable
+@code{gnus-summary-muttprint-program}. (@code{gnus-summary-muttprint}).
+
 @end table
 
 @vindex gnus-prompt-before-saving
@@ -8702,8 +8713,9 @@
 @vindex gnus-ps-print-hook
 @findex gnus-summary-print-article
 Generate and print a PostScript image of the article buffer
-(@code{gnus-summary-print-article}).  @code{gnus-ps-print-hook} will be
-run just before printing the buffer.
+(@code{gnus-summary-print-article}).  @code{gnus-ps-print-hook} will
+be run just before printing the buffer.  An alternative way to print
+article is to use Muttprint (@pxref{Saving Articles}).
 
 @end table
 




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

* Re: Support for Muttprint
  2001-12-16 18:01 Support for Muttprint Simon Josefsson
@ 2001-12-16 18:05 ` Simon Josefsson
  2001-12-21 13:57   ` Dirk Meyer
  2001-12-17 17:20 ` Nevin Kapur
  1 sibling, 1 reply; 4+ messages in thread
From: Simon Josefsson @ 2001-12-16 18:05 UTC (permalink / raw)


Simon Josefsson <jas@extundo.com> writes:

> 2001-12-16  Simon Josefsson  <jas@extundo.com>
> 	Inspired by code by Bernhard Walle <Bernhard.Walle@gmx.de>.

The code was inspired by Dirk Meyer, sorry about that, and thank you
Dirk. I've fixed the ChangeLog entry. Thanks to Bernhard for writing
Muttprint though. :-)




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

* Re: Support for Muttprint
  2001-12-16 18:01 Support for Muttprint Simon Josefsson
  2001-12-16 18:05 ` Simon Josefsson
@ 2001-12-17 17:20 ` Nevin Kapur
  1 sibling, 0 replies; 4+ messages in thread
From: Nevin Kapur @ 2001-12-17 17:20 UTC (permalink / raw)


Simon Josefsson <jas@extundo.com> writes:

> I've committed the below, to support Muttprint.  Install Muttprint
> from http://muttprint.sourceforge.net/ and print using it with `O
> P'.

Nice!  I had been using mp.  This looks much prettier.

-- 
Nevin



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

* Re: Support for Muttprint
  2001-12-16 18:05 ` Simon Josefsson
@ 2001-12-21 13:57   ` Dirk Meyer
  0 siblings, 0 replies; 4+ messages in thread
From: Dirk Meyer @ 2001-12-21 13:57 UTC (permalink / raw)


Simon Josefsson wrote:
> Simon Josefsson <jas@extundo.com> writes:
>
>> 2001-12-16  Simon Josefsson  <jas@extundo.com>
>> 	Inspired by code by Bernhard Walle <Bernhard.Walle@gmx.de>.
>
> The code was inspired by Dirk Meyer, sorry about that, and thank you
> Dirk. I've fixed the ChangeLog entry. Thanks to Bernhard for writing
> Muttprint though. :-)

No problem. To send the code to this list was on my todo-list for a
long time. I just forgot to send it. Thanks for finding the code and
integrating it into CVS-Gnus.

BTW, muttprint prints a penguin logo at the top of the page. Change
the PENGUIN variable in your .muttprintrc to

PENGUIN=<location of gnus>/info/ps/gnus-big-logo

and you get the gnus logo instead of the penguin.


Dischi

-- 
The sum of society's intelligence is less than the average of it's
individual parts.



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

end of thread, other threads:[~2001-12-21 13:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-16 18:01 Support for Muttprint Simon Josefsson
2001-12-16 18:05 ` Simon Josefsson
2001-12-21 13:57   ` Dirk Meyer
2001-12-17 17:20 ` Nevin Kapur

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