From: Julien Cubizolles <j.cubizolles@free.fr>
To: ding@gnus.org
Subject: Re: automatically mark own messages as dormant
Date: Tue, 26 Apr 2016 18:11:56 +0200 [thread overview]
Message-ID: <87y480ic37.fsf@free.fr> (raw)
In-Reply-To: <87zisglqrm.fsf@free.fr>
Julien Cubizolles <j.cubizolles@free.fr> writes:
> I'd like gnus to automatically mark my messages as dormant when it first
> sees them in some groups (gmane mailing lists mostly).
I tried the following (jc-gnus-article-header-value returns the
"From" header):
--8<---------------cut here---------------start------------->8---
(defun jc-mark-my-unseen-articles ()
(interactive)
(save-excursion
(let ((articles gnus-newsgroup-unseen))
(while articles
(gnus-summary-select-article (pop articles))
(let ((sender (jc-gnus-article-header-value "From")))
(if (string-match gnus-ignored-from-addresses sender)
(gnus-summary-mark-as-dormant 1)))))))
--8<---------------cut here---------------end--------------->8---
If point is on an unseen message, all matching unseen messages are
correctly marked. If not, nothing is marked however.
Also, if I plug this function in gnus-select-group-hook, I get a:
--8<---------------cut here---------------start------------->8---
This is a pseudo-article
--8<---------------cut here---------------end--------------->8---
error message.
What am I missing ?
Julien.
prev parent reply other threads:[~2016-04-26 16:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-26 8:26 Julien Cubizolles
2016-04-26 16:11 ` Julien Cubizolles [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=87y480ic37.fsf@free.fr \
--to=j.cubizolles@free.fr \
--cc=ding@gnus.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).