----- 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)



_______________________________________________
info-gnus-english mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/info-gnus-english

Reply via email to