: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)
(?u gnus-tmp-user-defined ?s)
(?P (gnus-pick-line-number) ?d)
(?B gnus-tmp-thread-tree-header-string ?s)
- (user-date (gnus-user-date
+ (user-date (gnus-user-date
,(macroexpand '(mail-header-date gnus-tmp-header))) ?s))
"An alist of format specifications that can appear in summary lines.
These are paired with what variables they correspond with, along with
while still allowing them to affect operations done in other
buffers. For example:
-(setq gnus-newsgroup-variables
+(setq gnus-newsgroup-variables
'(message-use-followup-to
- (gnus-visible-headers .
+ (gnus-visible-headers .
\"^From:\\\\|^Newsgroups:\\\\|^Subject:\\\\|^Date:\\\\|^To:\")))
")
gnus-mouse-2 gnus-mouse-pick-article
"m" gnus-summary-mail-other-window
"a" gnus-summary-post-news
+ "i" gnus-summary-news-other-window
"x" gnus-summary-limit-to-unread
"s" gnus-summary-isearch-article
"t" gnus-summary-toggle-header
"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)
["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]
(easy-menu-define
gnus-summary-post-menu gnus-summary-mode-map ""
`("Post"
- ["Post an article" gnus-summary-post-news
+ ["Send a message (mail or news)" gnus-summary-post-news
,@(if (featurep 'xemacs) '(t)
'(:help "Post an article"))]
["Followup" gnus-summary-followup
["Resend message" gnus-summary-resend-message t]
["Send bounced mail" gnus-summary-resend-bounced-mail t]
["Send a mail" gnus-summary-mail-other-window t]
+ ["Create a local message" gnus-summary-news-other-window t]
["Uuencode and post" gnus-uu-post-news
,@(if (featurep 'xemacs) '(t)
'(:help "Post a uuencoded article"))]
(1+ (match-beginning 0)) (1- (match-end 0))))
(t gnus-tmp-from))
gnus-tmp-thread-tree-header-string
- (cond
+ (cond
((not gnus-show-threads) "")
((zerop gnus-tmp-level)
- (if (cdar thread)
+ (if (cdar thread)
(or gnus-sum-thread-tree-root subject)
(or gnus-sum-thread-tree-single-indent subject)))
(t
(concat (apply 'concat
- (mapcar (lambda (item)
- (if (= item 1)
+ (mapcar (lambda (item)
+ (if (= item 1)
gnus-sum-thread-tree-vertical
gnus-sum-thread-tree-indent))
(cdr (reverse tree-stack))))
- (if (nth 1 thread)
+ (if (nth 1 thread)
gnus-sum-thread-tree-leaf-with-other
gnus-sum-thread-tree-single-leaf)))))
(when (string= gnus-tmp-name "")
(setq gnus-newsgroup-name group
gnus-newsgroup-unselected nil
gnus-newsgroup-unreads (gnus-list-of-unread-articles group))
-
+
(let ((display (gnus-group-find-parameter group 'display)))
(setq gnus-newsgroup-display
(cond
nil)
(t
nil))))
-
+
(gnus-summary-setup-default-charset)
;; Kludge to avoid having cached articles nixed out in virtual groups.
;; Adjust and set lists of article marks.
(when info
(gnus-adjust-marked-articles info))
-
+
(if (setq articles select-articles)
(setq gnus-newsgroup-unselected
(gnus-sorted-intersection
(setq list (cdr all)))))
(when (eq (cdr type) 'seen)
- (setq list
+ (setq list
(if list
(gnus-add-to-range list gnus-newsgroup-unseen)
(gnus-compress-sequence gnus-newsgroup-articles))))
(defun gnus-summary-limit-to-subject (subject &optional header not-matching)
"Limit the summary buffer to articles that have subjects that match a regexp.
If NOT-MATCHING, excluding articles that have subjects that match a regexp."
- (interactive
+ (interactive
(list (read-string (if current-prefix-arg
"Exclude subject (regexp): "
- "Limit to subject (regexp): "))
+ "Limit to subject (regexp): "))
nil current-prefix-arg))
(unless header
(setq header "subject"))
(when (not (equal "" subject))
(prog1
(let ((articles (gnus-summary-find-matching
- (or header "subject") subject 'all nil nil
+ (or header "subject") subject 'all nil nil
not-matching)))
(unless articles
(error "Found no matches for \"%s\"" subject))
(defun gnus-summary-limit-to-author (from &optional not-matching)
"Limit the summary buffer to articles that have authors that match a regexp.
If NOT-MATCHING, excluding articles that have authors that match a regexp."
- (interactive
+ (interactive
(list (read-string (if current-prefix-arg
"Exclude author (regexp): "
- "Limit to author (regexp): "))
+ "Limit to author (regexp): "))
current-prefix-arg))
(gnus-summary-limit-to-subject from "from" not-matching))
nil
t))))
(list header
- (read-string (format "%s header %s (regexp): "
+ (read-string (format "%s header %s (regexp): "
(if current-prefix-arg "Exclude" "Limit to")
header))
current-prefix-arg)))
(when (not (equal "" regexp))
(prog1
(let ((articles (gnus-summary-find-matching
- (cons 'extra header) regexp 'all nil nil
+ (cons 'extra header) regexp 'all nil nil
not-matching)))
(unless articles
(error "Found no matches for \"%s\"" regexp))
BACKWARD is non-nil. If BACKWARD is `all', do all articles.
If UNREAD is non-nil, only unread articles will
be taken into consideration. If NOT-CASE-FOLD, case won't be folded
-in the comparisons. If NOT-MATCHING, return a list of all articles that
+in the comparisons. If NOT-MATCHING, return a list of all articles that
not match REGEXP on HEADER."
(let ((case-fold-search (not not-case-fold))
articles d func)
(gnus-data-unread-p d)) ; Or just unreads.
(vectorp (gnus-data-header d)) ; It's not a pseudo.
(if not-matching
- (not (string-match
+ (not (string-match
regexp
(funcall func (gnus-data-header d))))
(string-match regexp
(defun gnus-summary-print-truncate-and-quote (string &optional len)
"Truncate to LEN and quote all \"(\"'s in STRING."
(gnus-replace-in-string (if (and len (> (length string) len))
- (substring string 0 len)
+ (substring string 0 len)
string)
"[()]" "\\\\\\&"))
(list
(concat "("
(gnus-summary-print-truncate-and-quote
- (mail-header-subject gnus-current-headers)
+ (mail-header-subject gnus-current-headers)
66) ")")
(concat "("
(gnus-summary-print-truncate-and-quote
- (mail-header-from gnus-current-headers)
+ (mail-header-from gnus-current-headers)
45) ")")))
(ps-right-header
(list
(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: ")