Gnus development mailing list
 help / color / mirror / Atom feed
* [PATCH] nnmh support for saving messages as seen
@ 2016-09-23  2:23 Mike Kupfer
  2016-09-23  6:10 ` Katsumi Yamaoka
  0 siblings, 1 reply; 10+ messages in thread
From: Mike Kupfer @ 2016-09-23  2:23 UTC (permalink / raw)
  To: ding

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)



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2016-11-21 15:40 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-23  2:23 [PATCH] nnmh support for saving messages as seen 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
2016-11-21  6:20         ` Katsumi Yamaoka
2016-11-21  6:50           ` Katsumi Yamaoka
2016-11-21 15:40             ` Mike Kupfer

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).