From mboxrd@z Thu Jan 1 00:00:00 1970 From: Samuel Wales Subject: Re: Feature: Group and limit items in agenda Date: Sun, 24 Feb 2013 13:23:34 -0700 Message-ID: References: <87ip64z9rx.fsf@bzg.ath.cx> <87d2w6kier.fsf@bzg.ath.cx> <87ppzr2tn8.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:49082) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9i6j-0003SL-4I for emacs-orgmode@gnu.org; Sun, 24 Feb 2013 15:23:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U9i6h-0003iG-QH for emacs-orgmode@gnu.org; Sun, 24 Feb 2013 15:23:37 -0500 Received: from mail-wi0-f179.google.com ([209.85.212.179]:37569) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9i6h-0003hv-KF for emacs-orgmode@gnu.org; Sun, 24 Feb 2013 15:23:35 -0500 Received: by mail-wi0-f179.google.com with SMTP id ez12so2482070wid.6 for ; Sun, 24 Feb 2013 12:23:35 -0800 (PST) In-Reply-To: <87ppzr2tn8.fsf@bzg.ath.cx> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Bastien Cc: emacs-orgmode@gnu.org, Muchenxuan Tong One other use here is to show a small random sample of your tasks without affecting speed. In before sorting filter function, set a pseudorandom number (biased according to a distribution of your choice) on a text property. You can set some to appear always. In the mapcar function, use user-defined sorting to sort according to the numbers and limit to just the first 5. Can defadvice be relied on to keep working in future versions of Org? On 2/23/13, Bastien wrote: > Hi Muchenxuan, > > Muchenxuan Tong writes: > >> There's a 'org-agenda-before-sorting-filter-function' variable. >> However, I'm not able to use it for grouping things, because it's >> used as '(mapcar org-agenda-before-sorting-filter-function list)' >> >> Would it be useful to add another function here, not used in >> 'mapcar', but work directly on the whole list? I don't know whether >> it is worthy, and I'm OK if that's not general enough to be added, >> because I can use defadvice anyway :) > > Well, I guess you don't want the grouping to take place *before* the > sorting, as the sorting may destroy it, so a defadvice is the way to > go here I'd say. If your defadvice can be useful for others, please > consider adding it to Worg! (Just send me your public key and I'll > give you write access to Worg.) > > Thanks, > > -- > Bastien > > -- The Kafka Pandemic: http://thekafkapandemic.blogspot.com The disease DOES progress. MANY people have died from it. ANYBODY can get it. There is no hope without action.