emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Adam Porter <adam@alphapapa.net>
To: emacs-orgmode@gnu.org
Subject: Re: ANN: org-ql agenda block support
Date: Fri, 30 Aug 2019 05:44:45 -0500	[thread overview]
Message-ID: <87o907kk4i.fsf@alphapapa.net> (raw)
In-Reply-To: CAJcAo8u-Sr9rOuqDThBga+97wT6EG2XcJmZbxSdEeGYwqXSuSw@mail.gmail.com

Samuel Wales <samologist@gmail.com> writes:

> i have been watching these developments with interest.  i want a
> faster 2-day agenda, and really like the idea of a lisp syntax for
> querying, perhaps one that can combine text search with structured.
>
> so just so it's known that there is otherwise silent interest.
> limited in computer use so cannot switch but following.

I appreciate the feedback nonetheless.

A two-day agenda could be done something like this:

    (org-ql-agenda (org-agenda-files)
      (and (or (deadline :from today :to +1)
               (scheduled :from today :to +1)
               (ts-active :from today :to +1))
           (not (done)))
      :sort (date priority todo)
      :super-groups ((:auto-planning t)))

To show deadlined entries taking org-deadline-warning-days into account,
more like the traditional Org Agenda, use (deadline auto), like:

    (org-ql-agenda (org-agenda-files)
      (and (or (deadline auto)
               (scheduled :from today :to +1)
               (ts-active :from today :to +1))
           (not (done)))
      :sort (date priority todo)
      :super-groups ((:auto-planning t)))

Grouping by date in this example is done with the org-super-agenda
:auto-planning selector, which uses the earliest planning timestamp in
an entry.  So it's not exactly like Org Agenda, but it approximates what
you're asking for, and org-ql's built-in caching may provide a speedup
for subsequent calls.

Here's an example that's similar to the Org Agenda's Log Mode:

    (org-ql-agenda
      (or (and (not (done))
               (or (habit)
                   (deadline auto)
                   (scheduled :to today)
                   (ts-active :on today)))
          (closed :on today))
      :sort (date priority todo))

  reply	other threads:[~2019-08-30 10:45 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-08 15:07 ANN: org-ql agenda block support Adam Porter
2019-08-12 15:39 ` Mikhail Skorzhinskii
2019-08-31  5:20   ` Adam Porter
2019-09-12 19:19     ` Mikhail Skorzhinskii
2019-09-17  4:36       ` Adam Porter
2019-08-25 17:38 ` Milan Zamazal
2019-08-25 18:18   ` Samuel Wales
2019-08-30 10:44     ` Adam Porter [this message]
2019-08-31  0:20       ` Samuel Wales
2019-08-31  5:01         ` Adam Porter
2019-09-07  0:43           ` Samuel Wales
2019-09-07 14:32             ` Adam Porter
2019-09-08  0:46               ` Samuel Wales
2019-08-30  9:19   ` Adam Porter

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=87o907kk4i.fsf@alphapapa.net \
    --to=adam@alphapapa.net \
    --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).