From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/87263 Path: news.gmane.org!.POSTED!not-for-mail From: Mike Kupfer Newsgroups: gmane.emacs.gnus.general Subject: [PATCH] nnmh support for saving messages as seen Date: Thu, 22 Sep 2016 19:23:52 -0700 Message-ID: <399.1474597432@allegro.localdomain> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Trace: blaine.gmane.org 1474597523 18537 195.159.176.226 (23 Sep 2016 02:25:23 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 23 Sep 2016 02:25:23 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M35483@lists.math.uh.edu Fri Sep 23 04:25:19 2016 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from lists1.math.uh.edu ([129.7.128.208]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bnGAw-000414-0v for ding-account@gmane.org; Fri, 23 Sep 2016 04:25:18 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by lists1.math.uh.edu with smtp (Exim 4.86_2) (envelope-from ) id 1bnG9l-00005e-69; Thu, 22 Sep 2016 21:24:05 -0500 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by lists1.math.uh.edu with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.86_2) (envelope-from ) id 1bnG9h-000054-Tg for ding@lists.math.uh.edu; Thu, 22 Sep 2016 21:24:01 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtps (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.86_2) (envelope-from ) id 1bnG9g-00065Q-JZ for ding@lists.math.uh.edu; Thu, 22 Sep 2016 21:24:01 -0500 Original-Received: from shell1.rawbw.com ([198.144.192.42] ident=root) by quimby.gnus.org with esmtp (Exim 4.80) (envelope-from ) id 1bnG9e-0005Ax-Re for ding@gnus.org; Fri, 23 Sep 2016 04:23:59 +0200 Original-Received: from allegro.localdomain (m208-249.dsl.rawbw.com [198.144.208.249]) by shell1.rawbw.com (8.15.1/8.15.1) with ESMTP id u8N2Nrj9098239 for ; Thu, 22 Sep 2016 19:23:54 -0700 (PDT) (envelope-from m.kupfer@acm.org) X-Authentication-Warning: shell1.rawbw.com: Host m208-249.dsl.rawbw.com [198.144.208.249] claimed to be allegro.localdomain X-Mailer: MH-E 8.6; nmh 1.6; GNU Emacs 25.1.1 Content-ID: <398.1474597432.1@allegro.localdomain> List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:87263 Archived-At: 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)