From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/87313 Path: news.gmane.org!.POSTED!not-for-mail From: Mike Kupfer Newsgroups: gmane.emacs.gnus.general Subject: Re: [PATCH] nnmh support for saving messages as seen Date: Sat, 19 Nov 2016 12:12:04 -0800 Message-ID: <13389.1479586324@allegro.localdomain> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Trace: blaine.gmane.org 1479586404 21374 195.159.176.226 (19 Nov 2016 20:13:24 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 19 Nov 2016 20:13:24 +0000 (UTC) Cc: ding@gnus.org To: Katsumi Yamaoka Original-X-From: ding-owner+M35533@lists.math.uh.edu Sat Nov 19 21:13:20 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 1c8C0m-0004df-HI for ding-account@gmane.org; Sat, 19 Nov 2016 21:13:20 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by lists1.math.uh.edu with smtp (Exim 4.87) (envelope-from ) id 1c8Bzj-0000Md-Uu; Sat, 19 Nov 2016 14:12:16 -0600 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by lists1.math.uh.edu with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.87) (envelope-from ) id 1c8Bzh-0000Lu-2Z for ding@lists.math.uh.edu; Sat, 19 Nov 2016 14:12:13 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtps (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.87) (envelope-from ) id 1c8Bzf-0007WT-75 for ding@lists.math.uh.edu; Sat, 19 Nov 2016 14:12:12 -0600 Original-Received: from shell1.rawbw.com ([198.144.192.42] ident=root) by quimby.gnus.org with esmtp (Exim 4.80) (envelope-from ) id 1c8Bzd-0008EK-Fq for ding@gnus.org; Sat, 19 Nov 2016 21:12:09 +0100 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 uAJKC4qX011107; Sat, 19 Nov 2016 12:12:05 -0800 (PST) (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 In-Reply-To: Your message of "Mon, 26 Sep 2016 07:54:45 +0900." X-Mailer: MH-E 8.6; nmh 1.6; GNU Emacs 25.1.2 Content-ID: <13388.1479586324.1@allegro.localdomain> List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:87313 Archived-At: 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)