From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/87017 Path: news.gmane.org!not-for-mail From: Julien Cubizolles Newsgroups: gmane.emacs.gnus.general Subject: Re: automatically mark own messages as dormant Date: Tue, 26 Apr 2016 18:11:56 +0200 Message-ID: <87y480ic37.fsf@free.fr> References: <87zisglqrm.fsf@free.fr> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1461687214 13521 80.91.229.3 (26 Apr 2016 16:13:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 26 Apr 2016 16:13:34 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M35238@lists.math.uh.edu Tue Apr 26 18:13:22 2016 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from lists1.math.uh.edu ([129.7.128.208]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1av5by-0006Y4-No for ding-account@gmane.org; Tue, 26 Apr 2016 18:13:18 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by lists1.math.uh.edu with smtp (Exim 4.86_2) (envelope-from ) id 1av5at-0001QL-NM; Tue, 26 Apr 2016 11:12:11 -0500 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by lists1.math.uh.edu with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.86_2) (envelope-from ) id 1av5ap-0001Pi-UC for ding@lists.math.uh.edu; Tue, 26 Apr 2016 11:12:07 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtps (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.86_2) (envelope-from ) id 1av5ao-0005PR-Ap for ding@lists.math.uh.edu; Tue, 26 Apr 2016 11:12:07 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]) by quimby.gnus.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1av5am-0002ri-Vz for ding@gnus.org; Tue, 26 Apr 2016 18:12:05 +0200 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1av5ak-00060Z-4O for ding@gnus.org; Tue, 26 Apr 2016 18:12:02 +0200 Original-Received: from gas45-3-82-244-252-119.fbx.proxad.net ([82.244.252.119]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 26 Apr 2016 18:12:02 +0200 Original-Received: from j.cubizolles by gas45-3-82-244-252-119.fbx.proxad.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 26 Apr 2016 18:12:02 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 34 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: gas45-3-82-244-252-119.fbx.proxad.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) Cancel-Lock: sha1:A+RINTtez9UYVfJkSVKDhtY4ebQ= X-Spam-Score: -1.8 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:87017 Archived-At: Julien Cubizolles 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.