emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Samuel Wales <samologist@gmail.com>
To: Bastien <bzg@altern.org>
Cc: emacs-orgmode@gnu.org, Muchenxuan Tong <demon386@gmail.com>
Subject: Re: Feature: Group and limit items in agenda
Date: Sun, 24 Feb 2013 13:23:34 -0700	[thread overview]
Message-ID: <CAJcAo8sGDeJinm-5EsKqF8JG2VbVmZ59uWUS4VCegzjp+c7CsQ@mail.gmail.com> (raw)
In-Reply-To: <87ppzr2tn8.fsf@bzg.ath.cx>

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 <bzg@altern.org> wrote:
> Hi Muchenxuan,
>
> Muchenxuan Tong <demon386@gmail.com> 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.

  reply	other threads:[~2013-02-24 20:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-23 18:13 Feature: Group and limit items in agenda Muchenxuan Tong
2013-01-23 21:35 ` AW
2013-02-07 10:41 ` Bastien
2013-02-11  5:10   ` Muchenxuan Tong
2013-02-11 13:42     ` Bastien
2013-02-17  6:29       ` Muchenxuan Tong
2013-02-23  9:58         ` Bastien
2013-02-24 20:23           ` Samuel Wales [this message]
2013-02-25  9:50             ` Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJcAo8sGDeJinm-5EsKqF8JG2VbVmZ59uWUS4VCegzjp+c7CsQ@mail.gmail.com \
    --to=samologist@gmail.com \
    --cc=bzg@altern.org \
    --cc=demon386@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).