Gnus development mailing list
 help / color / mirror / Atom feed
From: Mike Kupfer <m.kupfer@acm.org>
To: ding@gnus.org
Subject: [PATCH] nnmh support for saving messages as seen
Date: Thu, 22 Sep 2016 19:23:52 -0700	[thread overview]
Message-ID: <399.1474597432@allegro.localdomain> (raw)

I've found it annoying that nnmh saves messages as unseen, so I've been
carrying around variants of this patch for several years.  Could it (or
some variant) be integrated into Emacs?  My copyright assignment is on
file.

thanks,
mike

changeset comments:

Save messages to MH as seen or unseen.
gnus/gnus-mh.el (gnus-rcvstore-unseen): New variable.
(gnus-summary-save-in-folder): specify "-unseen" or "-nounseen" to
rcvstore, depending on gnus-rcvstore-unseen.

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,12 @@
 
 (defvar mh-lib-progs)
 
+(defcustom gnus-rcvstore-unseen t
+  "If non-nil, messages saved to MH folders will be marked as unseen."
+  :version "25.2"
+  :group 'gnus-article
+  :type 'boolean)
+
 (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.
@@ -78,7 +84,11 @@
 	(widen)
 	(unwind-protect
 	    (call-process-region
-	     (point-min) (point-max) "rcvstore" nil errbuf nil folder)
+	     (point-min) (point-max) "rcvstore" nil errbuf nil
+	     (if gnus-rcvstore-unseen
+		 "-unseen"
+	       "-nounseen")
+	     folder)
 	  (set-buffer errbuf)
 	  (if (zerop (buffer-size))
 	      (message "Article saved in folder: %s" folder)



             reply	other threads:[~2016-09-23  2:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-23  2:23 Mike Kupfer [this message]
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
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=399.1474597432@allegro.localdomain \
    --to=m.kupfer@acm.org \
    --cc=ding@gnus.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).