[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: can nnmail-split-methods do both linking and moving?
From: |
Ted Zlatanov |
Subject: |
Re: can nnmail-split-methods do both linking and moving? |
Date: |
Wed, 13 Jan 2010 15:24:39 -0600 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/23.1.90 (gnu/linux) |
On Tue, 12 Jan 2010 08:28:11 -0800 (PST) subopt <subopt@gmail.com> wrote:
>>> I'd like for my nnmail-split-methods to link certain matches to other
>>> groups, and move other matches. Is this possible, or do i need to use
>>> the fancy splitting approach?
>>> Can someone give me a short example of how to do this, or point me to
>>> one?
>> What do you mean by "link"? Do you mean articles that belong to the
>> same thread? If so, you can use the Gnus registry to split followups by
>> reference or by subject into the same group.
s> By 'link' i'm referring to Section 6.3 of (my copy of) the manual,
s> where it talks about normal (non-fancy) splitting:
Oh, I see. Sorry for the confusion.
s> nnmh and nnml makes crossposts by creating hard links to the
s> crossposted articles. However, not all file systems support hard
s> links. If that's the case for you, set nnmailcrosspost-link-function
s> to copy-file. (This variable is add-name-to-file by default.)
s> And i'm not talking about threads at all, just the splitting of
s> incoming mail. I believe these links actually default to symbolic
s> links, not hard links, on most unix/linux systems these days, but
s> some kind of link in any case.
s> So, i'm fine with many things being linked/crossposted by my
s> nnmail-split-methods, but i'd like some things to simply be moved
s> instead of linked, leaving no link behind in my nnml:misc. Is this
s> possible? If so, how do i go about it?
You may be able to set nnmailcrosspost-link-function to copy-file before
the split rule and then set it back to add-name-to-file afterwards. You
need to use fancy splitting for that, though:
... other fancy rules precede this
;; make sure this returns nil
(: (progn (setq nnmailcrosspost-link-function copy-file) nil))
... your special copy-file split rule here
;; make sure this returns nil
(: (progn (setq nnmailcrosspost-link-function add-name-to-file) nil))
... other fancy rules follow
This is 100% untested :)
Ted