info-gnus-english
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Making mail unread when moved


From: Katsumi Yamaoka
Subject: Re: Making mail unread when moved
Date: Sun, 25 Apr 2010 18:25:16 -0700 (PDT)
User-agent: G2/1.0

>>>>> Sébastien Vauban wrote:
> Would there be some way to make a mail become unread when moving it to some
> nnimap folder?

Try this advice, that makes articles to be moved to the group
nnimap:INBOX.FOLLOW-UP unread:

--8<---------------cut here---------------start------------->8---
(defadvice gnus-summary-move-article (before make-articles-unread-when-
moving
                                             (&optional n to-newsgroup
                                                        select-method action)
                                             activate)
  "Make articles to be moved to certain groups unread."
  (when (memq action '(nil move))
    (let ((articles (gnus-summary-work-articles n))
          case-fold-search)
      (unless to-newsgroup
        (setq to-newsgroup (gnus-read-move-group-name
                            "Move" gnus-current-move-group
                            articles
                            (if (gnus-check-backend-function
                                 'request-move-article gnus-newsgroup-name)
                                (funcall gnus-move-group-prefix-function
                                         gnus-newsgroup-name)
                              "")))
        (when (string-match "\\`nnimap:INBOX\\.FOLLOW-UP\\'" to-newsgroup)
          (dolist (article articles)
            (gnus-summary-mark-article article gnus-unread-mark)))))))
--8<---------------cut here---------------end--------------->8---

Adjust the regexp "\\`nnimap:INBOX\\.FOLLOW-UP\\'" as you like.
If it is "", articles to be moved to any group will be made all
unread.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]