From: Simon Josefsson <jas@extundo.com>
Subject: Support for Muttprint
Date: Sun, 16 Dec 2001 19:01:55 +0100 [thread overview]
Message-ID: <iluofkznjbq.fsf@dhcp128.extundo.com> (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
next reply other threads:[~2001-12-16 18:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-12-16 18:01 Simon Josefsson [this message]
2001-12-16 18:05 ` Simon Josefsson
2001-12-21 13:57 ` Dirk Meyer
2001-12-17 17:20 ` Nevin Kapur
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=iluofkznjbq.fsf@dhcp128.extundo.com \
--to=jas@extundo.com \
/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).