Gnus development mailing list
 help / color / mirror / Atom feed
From: dsg@linus.mitre.org (David S. Goldberg)
Cc: Ding Gnus List <ding@ifi.uio.no>
Subject: Re: [rgnus] FCC in message-mode to nnml group?
Date: 07 Jan 1997 16:23:50 -0500	[thread overview]
Message-ID: <m1bbub1uql5.fsf@mitre.org> (raw)
In-Reply-To: Mark Borges's message of 07 Jan 1997 13:08:01 -0700

[-- Attachment #1: Type: text/plain, Size: 820 bytes --]

I don't know if this will work in your situation, but it's what I use.
I got used to using Fcc with mh-e, which copies to MH folders.  My MH
folders are now my nnml groups, so I wanted an Fcc that would both
copy to the folder in MH style, but also update the overview file so I
wouldn't have to run nnml-generate-nov-databases.  I came up with the
following after poring over the nnml source.  I'm not sure how safe it
is to count on nnml-request-accept-article's calling convention but
it's the best I could find.

Note that I decided to grab the Fcc behavior from mh-e so
I'd get completion on group names.  That requires a bit of mucking
with the resulting string (have to convert from x/y/z to x.y.z) but to
me it's worth it.  If you don't use that then your
message-fcc-handler-function can be made much simpler.


[-- Attachment #2: Type: application/octet-stream, Size: 702 bytes --]

;;; from my .gnus

(require 'mh-e)
(require 'mh-comp)

(defun dsg-message-mh-fcc-to-nnml (fldr)
  "MH style Fcc with support for nnml usage."
  (let* ((fldr (substring fldr (1+ (length (getenv "HOME")))))
	 (group (if (= (string-to-char fldr) ?+)
		    (substring fldr 1)
		  fldr)))
    (if (string-match "/$" group)
	(setq group (replace-match "" nil nil group)))
    (while (string-match "/" group)
      (setq group (replace-match "." nil nil group)))
    (nnml-request-accept-article group nil t)))

(setq message-fcc-handler-function 'dsg-message-mh-fcc-to-nnml)

(add-hook 'message-mode-hook '(lambda ()
				(require 'mh-comp)
				(define-key message-mode-map
				  "\C-c\C-f\C-w" 'mh-to-fcc)))

[-- Attachment #3: Type: text/plain, Size: 131 bytes --]

--
Dave Goldberg
Post: The Mitre Corporation\MS B305\202 Burlington Rd.\Bedford, MA 01730
Phone: 617-271-3887
Email: dsg@mitre.org

      parent reply	other threads:[~1997-01-07 21:23 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-01-07 20:08 Mark Borges
1997-01-07 20:25 ` Lars Magne Ingebrigtsen
1997-01-07 20:55 ` Lars Balker Rasmussen
1997-01-07 22:58   ` Steven L Baur
1997-01-08  0:49     ` Mark Borges
1997-01-08  2:11     ` David Moore
1997-01-08  3:45       ` Sudish Joseph
1997-01-08  7:40     ` Jens Lautenbacher
1997-01-08 17:15       ` David Moore
1997-01-09  7:49         ` Jens Lautenbacher
1997-01-07 21:23 ` David S. Goldberg [this message]

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=m1bbub1uql5.fsf@mitre.org \
    --to=dsg@linus.mitre.org \
    --cc=ding@ifi.uio.no \
    --cc=dsg@mitre.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).