emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Adam Porter <adam@alphapapa.net>
To: emacs-orgmode@gnu.org
Subject: Re: Is there a way to get all agenda TODOs programmatically?
Date: Wed, 03 Jan 2018 03:50:01 -0600	[thread overview]
Message-ID: <87vagjtgom.fsf@alphapapa.net> (raw)
In-Reply-To: 87vagjffuq.fsf@mbork.pl

Marcin Borkowski <mbork@mbork.pl> writes:

> and thanks for your answer.  I never thought about analyzing agenda
> /output/ - that is quite clever!  I still think it's a hack, and
> I really regret that Org does not offer a programmer a better API for
> agenda (and many other things) - there could be a lot of applications
> built on top of Org with that.  I'll definitely try this solution some
> day (maybe even within a few days).

It kind of is a hack, but at the same time, Org itself is kind of a
really big hack on top of Emacs, outline-mode, and plain text files.  :)

There are some examples of attempts at better APIs (e.g. my PoC
org-agenda-ng code, Remy Honig's
<https://github.com/remyhonig/org-query>, and some other people's
personal configs here and there), but I'm guessing they all suffer from
Emacs's function call overhead.  IIUC the agenda is as fast as it is
because of the way it's largely written in large functions.  :)

An idea I had recently was to make more use of inline functions,
defsubst, etc, to avoid that.  It might let us make the code more
functional while letting the byte-compiler optimize it.  At the same
time, I wonder why it isn't already that way--maybe better Emacs
programmers know why it wouldn't be a good idea.

I see Tom Tromey is still working on
<https://github.com/tromey/el-compilador/>.  Imagine how fast Org would
be if it could be compiled into native code!  We can dream, I guess...

  reply	other threads:[~2018-01-03  9:50 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-07  4:43 Is there a way to get all agenda TODOs programmatically? Marcin Borkowski
2017-10-07 14:20 ` Matt Lundin
2017-10-07 16:43   ` Marcin Borkowski
2017-10-07 16:54     ` Matt Lundin
2017-12-29 19:55       ` Marcin Borkowski
2017-12-31 23:37         ` Adam Porter
2018-01-03  9:31           ` Marcin Borkowski
2018-01-03  9:50             ` Adam Porter [this message]
2018-01-03 13:15               ` Adam Porter
2018-01-03 14:15                 ` Nicolas Goaziou
2018-01-03 15:48                   ` Adam Porter
2018-01-03 14:19                 ` Adam Porter
2018-01-03 13:49               ` Nicolas Goaziou
2018-01-03 14:16                 ` 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=87vagjtgom.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).