From f332833e21a32709c4c12f794384b5ef6a719735 Mon Sep 17 00:00:00 2001 From: Mike Kupfer Date: Mon, 21 Nov 2016 06:10:13 +0000 Subject: [PATCH] Add a variable to pass additional options to rcvstore * lisp/gnus/gnus-mh.el (gnus-rcvstore-options): New variable. (gnus-summary-save-in-folder): Include gnus-rcvstore-options in the arguments that are passed to rcvstore. cf. and followups, i.e., ding mailing list. --- etc/GNUS-NEWS | 3 +++ lisp/gnus/gnus-mh.el | 15 +++++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/etc/GNUS-NEWS b/etc/GNUS-NEWS index 06badc18375..c5fb0fed0ce 100644 --- a/etc/GNUS-NEWS +++ b/etc/GNUS-NEWS @@ -266,6 +266,9 @@ on your Emacs version. * Miscellaneous changes +** New user option 'gnus-rcvstore-options' provides a way to +specify additional options when saving messages to an MH folder. + ** Having edited the select-method for the foreign server in the server buffer is immediately reflected to the subscription of the groups which use the server in question. For instance, if you change diff --git a/lisp/gnus/gnus-mh.el b/lisp/gnus/gnus-mh.el index f01811b1ac6..84c90be3235 100644 --- a/lisp/gnus/gnus-mh.el +++ b/lisp/gnus/gnus-mh.el @@ -40,6 +40,13 @@ (defvar mh-lib-progs) +(defcustom gnus-rcvstore-options nil + "Options that are passed to rcvstore, or nil. +These are used when saving articles to an MH folder." + :version "26.1" + :group 'gnus-article + :type '(repeat string)) + (defun gnus-summary-save-article-folder (&optional arg) "Append the current article to an mh folder. If N is a positive number, save the N next articles. @@ -77,8 +84,12 @@ Optional argument FOLDER specifies folder name." (save-restriction (widen) (unwind-protect - (call-process-region - (point-min) (point-max) "rcvstore" nil errbuf nil folder) + (apply + 'call-process-region + (append + (list (point-min) (point-max) "rcvstore" nil errbuf nil + folder) + gnus-rcvstore-options)) (set-buffer errbuf) (if (zerop (buffer-size)) (message "Article saved in folder: %s" folder) -- 2.39.5