Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
From: Leo <sdl.web@gmail.com>
To: info-gnus-english@gnu.org
Subject: Re: archive NG msgs
Date: Sun, 17 Jun 2007 10:51:05 +0100	[thread overview]
Message-ID: <m2wsy2syd2.fsf@sl392.st-edmunds.cam.ac.uk> (raw)
In-Reply-To: <x7wsy3ot4w.fsf@nagual.nl>

----- Dick Hoogendijk (2007-06-17) wrote:-----

> I read lots of news and sometimes I want to save msgs for future
> reference. I can mark them with 'u' but what I really want is copy
> them to aan archive. "M c" copies alright but never remembers the name
> of the archive(s). Is there some kind of shortway to 'archive' NG msgs
> always to the same place? Be it nnimap, nnfolder or whatever..
>
> Sure I can (mail) copy them with "C-c C-f" but I'd like it even more
> automated and easy. Any tips?

I use the following in my .gnus which I seem to copy from somewhere:

(defun my-gnus-summary-archive-article ()
  "Copy current article to a suitable nnml archive group.
 The copied article will be marked as \"ancient\", the original
 will retain its current marks."
  (interactive)
  (let* ((group-name
          (if (string-match "nnimap" gnus-newsgroup-name)
              gnus-newsgroup-name
            (car (last (split-string gnus-newsgroup-name ":")))))
         (archive-name (concat "nnml:archive." group-name))
         (orig-mark (gnus-summary-article-mark)))
    (gnus-summary-mark-article nil gnus-ancient-mark t)
    (gnus-summary-copy-article 1 archive-name)
    (gnus-summary-mark-article nil orig-mark t)))

Best,
-- 
Leo <sdl.web AT gmail.com>                         (GPG Key: 9283AA3F)

      reply	other threads:[~2007-06-17  9:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-17  8:57 Dick Hoogendijk
2007-06-17  9:51 ` Leo [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=m2wsy2syd2.fsf@sl392.st-edmunds.cam.ac.uk \
    --to=sdl.web@gmail.com \
    --cc=info-gnus-english@gnu.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).