Gnus development mailing list
 help / color / mirror / Atom feed
From: Mike Kupfer <m.kupfer@acm.org>
To: Katsumi Yamaoka <yamaoka@jpl.org>
Cc: ding@gnus.org
Subject: Re: [PATCH] nnmh support for saving messages as seen
Date: Sat, 19 Nov 2016 12:12:04 -0800	[thread overview]
Message-ID: <13389.1479586324@allegro.localdomain> (raw)
In-Reply-To: Your message of "Mon, 26 Sep 2016 07:54:45 +0900." <b4mwphzmvyi.fsf@jpl.org>

Katsumi Yamaoka wrote:

> On Fri, 23 Sep 2016 20:05:48 -0700, Mike Kupfer wrote:
> > nmh has had those options since at least version 1.2.
> 
> > I suppose gnus-rcvstore-unseen could be ternary:
> 
> > nil (don't add an option)
> > 'seen
> > 'unseen
> 
> > How does that sound?
> 
> Otherwise, gnus-rcvstore-options, a list of additional options,
> default nil.  I don't know if there are the other useful options,
> though. :)

Yes, another possible option would be to add the message to some other
MH sequence (e.g., "fromgnus").

Anyway, I finally got around to revising my patch.  Please let me know
if you have any questions or other suggestions.

thanks,
mike

Changeset text:

Add a variable to pass additional options to rcvstore.
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.

NEWS text:

*** New user option 'gnus-rcvstore-options' provides a way to
specify additional options when saving messages to an MH folder.

diff --git a/lisp/gnus/gnus-mh.el b/lisp/gnus/gnus-mh.el
--- 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 @@
       (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)




  parent reply	other threads:[~2016-11-19 20:12 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-23  2:23 Mike Kupfer
2016-09-23  6:10 ` Katsumi Yamaoka
2016-09-24  3:05   ` Mike Kupfer
2016-09-25 22:54     ` Katsumi Yamaoka
2016-10-02 23:01       ` Mike Kupfer
2016-10-03  0:30         ` Katsumi Yamaoka
2016-11-19 20:12       ` Mike Kupfer [this message]
2016-11-21  6:20         ` Katsumi Yamaoka
2016-11-21  6:50           ` Katsumi Yamaoka
2016-11-21 15:40             ` Mike Kupfer

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=13389.1479586324@allegro.localdomain \
    --to=m.kupfer@acm.org \
    --cc=ding@gnus.org \
    --cc=yamaoka@jpl.org \
    /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).