From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/62813 Path: news.gmane.org!not-for-mail From: Leon Newsgroups: gmane.emacs.gnus.general Subject: Re: CODE: Hide groups with few unread articles Date: Fri, 14 Apr 2006 19:13:42 +0100 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1145038355 13592 80.91.229.2 (14 Apr 2006 18:12:35 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 14 Apr 2006 18:12:35 +0000 (UTC) Original-X-From: ding-owner+m11340@lists.math.uh.edu Fri Apr 14 20:12:35 2006 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FUSmW-0002lI-7Y for ding-account@gmane.org; Fri, 14 Apr 2006 20:12:32 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu ident=lists) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1FUSmR-0007Nl-00; Fri, 14 Apr 2006 13:12:27 -0500 Original-Received: from nas02.math.uh.edu ([129.7.128.40]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1FUSlf-0007Nf-00 for ding@lists.math.uh.edu; Fri, 14 Apr 2006 13:11:39 -0500 Original-Received: from quimby.gnus.org ([80.91.224.244]) by nas02.math.uh.edu with esmtp (Exim 4.52) id 1FUSld-00028O-Dw for ding@lists.math.uh.edu; Fri, 14 Apr 2006 13:11:39 -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 1FUSlc-0007uD-00 for ; Fri, 14 Apr 2006 20:11:36 +0200 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1FUSla-0002dB-4u for ding@gnus.org; Fri, 14 Apr 2006 20:11:34 +0200 Original-Received: from rfg28.st-edmunds.cam.ac.uk ([131.111.223.227]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 14 Apr 2006 20:11:34 +0200 Original-Received: from sdl.web by rfg28.st-edmunds.cam.ac.uk with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 14 Apr 2006 20:11:34 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: ding@gnus.org Original-Lines: 38 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: rfg28.st-edmunds.cam.ac.uk Face: iVBORw0KGgoAAAANSUhEUgAAAEAAAAASCAMAAADc8SgQAAAAwFBMVEUCBQEJDAgTFRIaHBof IB4jJCIrLCotLywyNDE3OTY8Pjs/QD5FRkRJS0hRU1BWV1VbXVpiZGFnaWZrbWptb2xvcW52eHV5 enh+gH2Bg4CHiYaLjYqNj4yRk5CXmZaanJmdn5ygop+mqKWqrKmsrqutr6yxs7CztbK4ure7vbq/ wb7DxcLHycbJy8jNz8vQ0s/T1dLW2NXc3tvf4d7h5ODl5+Po6ufr7enu8O3x8/Dz9fL1+PT4+vf6 /Pn7/fr+//wGuxWtAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH1gIaAyMw1+FInQAAAXxJ REFUOMulk+tygjAQhalFWodYvIwyiNUKA95QVLwQhLPv/1ZNAKWX8Yd6ZsLAZvdL9iQo9KSUx0v3 0wV/BjDSzZY6exxw0BJgrqaPApBtQeDK6eEdAGJ4DQhAZjFmWVZf798LmTUi6QGgmQCysHtfeWa1 OXITj8pMYrh9Vz03vmQbEuArMeETSZBPpIdKvMg9B2faL2NKgl3R/zZIuFZnjDW5bKGnrVfmROLk 5LhWqVmEbEcfu8u3+XD14YrvjeEsWRrlyj3QDN/To6u96VVJmkdO40AJAVU4ZQqfInWDhcpRSABi ZQ4MQYusPJ9KRSDhtgEclROBjQhGK8+hfMgdeMICSpGaRf6iU8kuiUzwnXdQ/BJleJ38/pnQ0yUJ g8JDbOxKbnlgtZDQ7Ql/GGzUxZnR7ngBxEHdCMP1rKOD/rVQhlY18aL5BMuczmncTmJnkF4AO9/3 PN9z3e3tW3uciodzFm58LcUCwWgS4drC39Vu3XsqbMu7/Zn8DYna+irHnqnQAAAAAElFTkSuQmCC User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.0 (gnu/linux) Cancel-Lock: sha1:KJRuO/nBleDxlxFvnlXUpv+vzZY= X-Spam-Score: -2.6 (--) Precedence: bulk Original-Sender: ding-owner@lists.math.uh.edu Xref: news.gmane.org gmane.emacs.gnus.general:62813 Archived-At: Mark Plaksin writes: > Here's some code that lets you hide groups when they have just a few unread > articles. You can set the threshold on a per-topic and/or per-group basis. > > I use levels to separate my groups by priority but I am subscribed to a lot > of groups so each level contains a lot of groups. I'm easily distracted so > I wanted a way to hide groups without many unread articles. That way when > I check for new messages I don't end up reading two or three articles in > each of 25 groups. Instead I generally end up reading one or two groups > with 25 articles each. > > It requires a small patch to gnus-group.el which allows you to specify the > predicate to use in the funcall to gnus-group-prepare-function. That's the > first attachment. The second attachment does the rest of the work. > > You get a new group parameter called gnus-distraction-threshold. If a > group has fewer than gnus-distraction-threshold unread articles, it won't > be displayed. gnus-distraction-threshold defaults to 1 so nothing should > change unless you set the threshold somewhere. As with any group parameter > you can set it for a topic and have it apply to all groups in the topic. > By default groups with ticked articles are always displayed. > > Two key bindings are turned on in the Group buffer: > - C-cd toggles distraction prevention on and off > - C-ct toggles the display of groups with ticked articles > > I've only been playing with this for a few days so comments and suggestions > are very welcome! > A feature that I have been looking for! Wonderful. Does it work for topic i.e hide a topic when the total number of unread articles within a topic is below threshold? Regards, -- Leon