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

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

Re: Making mail ticked when moved


From: Sébastien Vauban
Subject: Re: Making mail ticked when moved
Date: Wed, 28 Apr 2010 12:31:34 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

Hi Katsumi,

Katsumi Yamaoka wrote:
> 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:
>
> [...]
>
> 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.

My high ELisp abilities ;-) allowed me to slightly change your code:

--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 ticked when moved to certain groups."
  (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 "INBOX\\.@" to-newsgroup) ; groups beginning with
                                                      ; the `@' symbol
          (dolist (article articles)
            (gnus-summary-mark-article article gnus-ticked-mark)))))))
--8<---------------cut here---------------end--------------->8---

In clear, here are my changes:

1. apply the below rule for all groups beginning with the `@' symbol
2. make articles ticked (instead of unread)

The latter makes more sense, as these are for mails to be followed up. I've
read them, I simply want to tag them in some way.

Thank you very, very, very much for your code. It is simply great like this...

Though, now that I've changed my mind from "unread" to "ticked", I'd be happy
to see the groups with ticked articles to be highlighted more than it
currently is (`*' mark in front of the group's name).

I tried to find faces for really highlighting the groups containing ticked
articles, but found nothing. I only see faces for groups containing unread
articles.

Is it possible to work around this somehow?

Best regards,
  Seb

-- 
Sébastien Vauban


reply via email to

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