Gnus development mailing list
 help / color / mirror / Atom feed
* automatically mark own messages as dormant
@ 2016-04-26  8:26 Julien Cubizolles
  2016-04-26 16:11 ` Julien Cubizolles
  0 siblings, 1 reply; 2+ messages in thread
From: Julien Cubizolles @ 2016-04-26  8:26 UTC (permalink / raw)
  To: ding

I'd like gnus to automatically mark my messages as dormant when it first
sees them in some groups (gmane mailing lists mostly). I'm not sure what
is the right tool for that, would a fancy-splitting rule work ?

Julien.




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: automatically mark own messages as dormant
  2016-04-26  8:26 automatically mark own messages as dormant Julien Cubizolles
@ 2016-04-26 16:11 ` Julien Cubizolles
  0 siblings, 0 replies; 2+ messages in thread
From: Julien Cubizolles @ 2016-04-26 16:11 UTC (permalink / raw)
  To: ding

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.







^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-04-26 16:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-26  8:26 automatically mark own messages as dormant Julien Cubizolles
2016-04-26 16:11 ` Julien Cubizolles

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