1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
GNUS - Integration of Muttprint in Gnus
~~~~
I've got following Code from Hans-Jürgen Ficker (thanks to him). I cannot
say whether it works or not -- I don't know anything about Gnus/(X)Emacs and
the stuff like this ;-)
Put this code in your ~/.gnus and you should be able to print with "O P"
in Gnus.
Please don't ask me any questions. If you have a better code: please
mail me: Bernhard Walle <Bernhard.Walle@gmx.de>. Thanks in advance.
BTW: Oort Gnus 0.04 has built-in support for Muttprint.
Anyway, here's the code:
---------------------- 8< -------------------------------------------------
(define-key gnus-summary-save-map "P" 'gnus-summary-muttprint-buffer)
(defvar muttprint-command "muttprint")
(defun gnus-summary-pipe-to-muttprint (&optional dummy)
"Pipe this article to muttprint."
(gnus-eval-in-buffer-window gnus-article-buffer
(save-restriction
(widen)
(shell-command-on-region (point-min) (point-max)
muttprint-command nil))))
(defun gnus-summary-muttprint-buffer (&optional arg)
(interactive "P")
(require 'gnus-art)
(let ((gnus-default-article-saver 'gnus-summary-pipe-to-muttprint))
(gnus-summary-save-article arg t)))
---------------------- >8 -------------------------------------------------
|