From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/65349 Path: news.gmane.org!not-for-mail From: Reiner Steib Newsgroups: gmane.emacs.gnus.general Subject: Re: enter-digest-group automatically Date: Wed, 03 Oct 2007 17:34:07 +0200 Message-ID: References: <874ph9ti5w.fsf@jidanni.org> Reply-To: Reiner Steib NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1191425802 27890 80.91.229.12 (3 Oct 2007 15:36:42 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 3 Oct 2007 15:36:42 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M13860@lists.math.uh.edu Wed Oct 03 17:36:39 2007 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.50) id 1Id6H9-00058D-7r for ding-account@gmane.org; Wed, 03 Oct 2007 17:36:39 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1Id6Gr-00042k-Fy; Wed, 03 Oct 2007 10:36:21 -0500 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1Id6Gp-00042P-KM for ding@lists.math.uh.edu; Wed, 03 Oct 2007 10:36:19 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtp (Exim 4.67) (envelope-from ) id 1Id6Gg-0007Bq-Fn for ding@lists.math.uh.edu; Wed, 03 Oct 2007 10:36:19 -0500 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1Id6GY-0003Jh-00 for ; Wed, 03 Oct 2007 17:36:02 +0200 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1Id6GB-0004Ad-SS for ding@gnus.org; Wed, 03 Oct 2007 15:35:39 +0000 Original-Received: from p54a94f2c.dip.t-dialin.net ([84.169.79.44]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 03 Oct 2007 15:35:39 +0000 Original-Received: from Reiner.Steib by p54a94f2c.dip.t-dialin.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 03 Oct 2007 15:35:39 +0000 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: ding@gnus.org Original-Lines: 43 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: p54a94f2c.dip.t-dialin.net X-Face: mtjf/D:es1T0wHO:&CJ'ZXe"l;3C--rw\z!{`eFwL){|]RpI+4{u25L=5C /0>KuGeTsk<~<&NE-AKV1560e!+RJeyWmSskkrJm?[vUV#66{T_m|Ae<||Ku#Mk5`y&O`n~z2;n8eP J5#2h@2eQgV@E70IY_0WlEx!"&giy{+\%h1LJox$zv@/l%ZmU4^tZA>xQpnkUBVC5.jpg#0'(+2?Rs )NAr:>3<=WxHE$ktbLysDIM5TbmHu*3 Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:65349 Archived-At: [ Please send Gnus questions _only_ to the list. ] On Tue, Oct 02 2007, jidanni@jidanni.org wrote: > How can one invoke gnus-summary-enter-digest-group automatically if a > Subject matches "Digest", instead of having to hit ^D? > > Use gnus-select-article-hook? Yes, probably. > How? Thanks. Maybe like this (only slightly tested; and only for `rs-gnus-auto-digest-groups'): --8<---------------cut here---------------start------------->8--- (defvar rs-gnus-auto-digest-groups "de\\.alt\\.netdigest") (defvar rs-gnus-auto-digest-subjects "^[Dd]igest") (defun rs-gnus-maybe-enter-digest-mode () (when (or (and (stringp rs-gnus-auto-digest-groups) (string-match rs-gnus-auto-digest-groups gnus-newsgroup-name) (not (string-match "nndoc:.*-[0-9]+" gnus-newsgroup-name))) (and (stringp rs-gnus-auto-digest-subjects) (let ((subject (gnus-with-article-buffer (gnus-fetch-field "Subject")))) (and (stringp subject) (string-match rs-gnus-auto-digest-subjects subject))))) (gnus-message 9 "Entering digest group automatically.") ;; (sit-for 1) (gnus-summary-enter-digest-group) (gnus-summary-show-article))) (add-hook 'gnus-select-article-hook 'rs-gnus-maybe-enter-digest-mode) --8<---------------cut here---------------end--------------->8--- Bye, Reiner. -- ,,, (o o) ---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/