emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Is there a way to get all agenda TODOs programmatically?
@ 2017-10-07  4:43 Marcin Borkowski
  2017-10-07 14:20 ` Matt Lundin
  0 siblings, 1 reply; 14+ messages in thread
From: Marcin Borkowski @ 2017-10-07  4:43 UTC (permalink / raw)
  To: Org-Mode mailing list

Hi there,

I'd like to get a list of all agenda TODOs, with titles and due dates.
Is there something ready in Org/contrib/blogosphere to help me?

The problem I'm trying to solve is to make some kind of a metric of how
I'm doing with my TODO list, like "how many overdue tasks do I have", or
even better, such a sum weighted by the time after the deadline, or
something similar.

Best

-- 
Marcin Borkowski

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Is there a way to get all agenda TODOs programmatically?
  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
  0 siblings, 1 reply; 14+ messages in thread
From: Matt Lundin @ 2017-10-07 14:20 UTC (permalink / raw)
  To: Marcin Borkowski; +Cc: Org-Mode mailing list

Hi Marcin,

Marcin Borkowski <mbork@mbork.pl> writes:

> I'd like to get a list of all agenda TODOs, with titles and due dates.
> Is there something ready in Org/contrib/blogosphere to help me?

This functionality is built into org-mode. The simplest way to get such
a list is to use the agenda (specifically M-x org-todo-list). To display
scheduling information you can customize the variable
org-agenda-prefix-format.

> The problem I'm trying to solve is to make some kind of a metric of how
> I'm doing with my TODO list, like "how many overdue tasks do I have", or
> even better, such a sum weighted by the time after the deadline, or
> something similar.

If you use the "DEADLINE" keyword (M-x org-deadline, bound to C-c C-d),
then the daily/weekly agenda (M-x org-agenda-list) will display any
overdue tasks.

Finally, if you want simply to gather the todo data programmatically for
further processing you can use the function org-map-entries.

Best,
Matt

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Is there a way to get all agenda TODOs programmatically?
  2017-10-07 14:20 ` Matt Lundin
@ 2017-10-07 16:43   ` Marcin Borkowski
  2017-10-07 16:54     ` Matt Lundin
  0 siblings, 1 reply; 14+ messages in thread
From: Marcin Borkowski @ 2017-10-07 16:43 UTC (permalink / raw)
  To: Matt Lundin; +Cc: Org-Mode mailing list


On 2017-10-07, at 16:20, Matt Lundin <mdl@imapmail.org> wrote:

> Hi Marcin,
>
> Marcin Borkowski <mbork@mbork.pl> writes:
>
>> I'd like to get a list of all agenda TODOs, with titles and due dates.
>> Is there something ready in Org/contrib/blogosphere to help me?
>
> This functionality is built into org-mode. The simplest way to get such
> a list is to use the agenda (specifically M-x org-todo-list). To display
> scheduling information you can customize the variable
> org-agenda-prefix-format.

I know (and use) that.  What I want is not /display/, but a /data
structure/ containing that info.

>> The problem I'm trying to solve is to make some kind of a metric of how
>> I'm doing with my TODO list, like "how many overdue tasks do I have", or
>> even better, such a sum weighted by the time after the deadline, or
>> something similar.
>
> If you use the "DEADLINE" keyword (M-x org-deadline, bound to C-c C-d),
> then the daily/weekly agenda (M-x org-agenda-list) will display any
> overdue tasks.
>
> Finally, if you want simply to gather the todo data programmatically for
> further processing you can use the function org-map-entries.

Thanks, that seems to be a good pointer.  I'll check it out.

> Best,
> Matt

Best,

-- 
Marcin Borkowski

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Is there a way to get all agenda TODOs programmatically?
  2017-10-07 16:43   ` Marcin Borkowski
@ 2017-10-07 16:54     ` Matt Lundin
  2017-12-29 19:55       ` Marcin Borkowski
  0 siblings, 1 reply; 14+ messages in thread
From: Matt Lundin @ 2017-10-07 16:54 UTC (permalink / raw)
  To: Marcin Borkowski; +Cc: Org-Mode mailing list

Marcin Borkowski <mbork@mbork.pl> writes:

> On 2017-10-07, at 16:20, Matt Lundin <mdl@imapmail.org> wrote:
>
>> Hi Marcin,
>>
>> Marcin Borkowski <mbork@mbork.pl> writes:
>>
>>> I'd like to get a list of all agenda TODOs, with titles and due dates.
>>> Is there something ready in Org/contrib/blogosphere to help me?
>>
>> This functionality is built into org-mode. The simplest way to get such
>> a list is to use the agenda (specifically M-x org-todo-list). To display
>> scheduling information you can customize the variable
>> org-agenda-prefix-format.
>
> I know (and use) that.  What I want is not /display/, but a /data
> structure/ containing that info.

Ah, I see! A lisp list, not a list on the screen.

>> Finally, if you want simply to gather the todo data programmatically for
>> further processing you can use the function org-map-entries.
>
> Thanks, that seems to be a good pointer.  I'll check it out.

I think something like this would generate a such a list:

(org-map-entries '(cons (nth 4 (org-heading-components))
                         (list (org-get-deadline-time nil)))
                  "/!TODO" 'agenda)

Each item in the list would look something like this:

("Test" (23000 24400))

You could then feed the list to whatever function you'd like.

Best,
Matt

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Is there a way to get all agenda TODOs programmatically?
  2017-10-07 16:54     ` Matt Lundin
@ 2017-12-29 19:55       ` Marcin Borkowski
  2017-12-31 23:37         ` Adam Porter
  0 siblings, 1 reply; 14+ messages in thread
From: Marcin Borkowski @ 2017-12-29 19:55 UTC (permalink / raw)
  To: Matt Lundin; +Cc: Org-Mode mailing list


On 2017-10-07, at 18:54, Matt Lundin <mdl@imapmail.org> wrote:

>>> Finally, if you want simply to gather the todo data programmatically for
>>> further processing you can use the function org-map-entries.
>>
>> Thanks, that seems to be a good pointer.  I'll check it out.
>
> I think something like this would generate a such a list:
>
> (org-map-entries '(cons (nth 4 (org-heading-components))
>                          (list (org-get-deadline-time nil)))
>                   "/!TODO" 'agenda)
>
> Each item in the list would look something like this:
>
> ("Test" (23000 24400))
>
> You could then feed the list to whatever function you'd like.

Thanks again.  I played around with this for some time, but there is one
problem.  The agenda has a lot of settings, and replicating them with
org-map-entries turned out to be no fun.

Is there a way to plug into the agenda generating functions somehow to
get a Lisp list of agenda items?  I'm pretty sure that can be done -
org-super-agenda does something similar, after all - but I have no idea
why.  I could delve into agenda source myself, but is is quite hairy, so
maybe someone knows that already?

TIA,

-- 
Marcin Borkowski

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Is there a way to get all agenda TODOs programmatically?
  2017-12-29 19:55       ` Marcin Borkowski
@ 2017-12-31 23:37         ` Adam Porter
  2018-01-03  9:31           ` Marcin Borkowski
  0 siblings, 1 reply; 14+ messages in thread
From: Adam Porter @ 2017-12-31 23:37 UTC (permalink / raw)
  To: emacs-orgmode

Marcin Borkowski <mbork@mbork.pl> writes:

> Thanks again.  I played around with this for some time, but there is one
> problem.  The agenda has a lot of settings, and replicating them with
> org-map-entries turned out to be no fun.
>
> Is there a way to plug into the agenda generating functions somehow to
> get a Lisp list of agenda items?  I'm pretty sure that can be done -
> org-super-agenda does something similar, after all - but I have no idea
> why.  I could delve into agenda source myself, but is is quite hairy, so
> maybe someone knows that already?

Hi Marcin,

As you said, the agenda code is quite hairy--but it does work very well.
My meager attempt to begin reimplementing it in a more functional way
showed very poor performance by comparison; perhaps because I didn't do
it well, but I'm guessing also because of Emacs' function call overhead.
But for your project, perhaps the code would come in useful; feel free
to borrow anything that you like:

https://github.com/alphapapa/org-agenda-ng

As you mentioned, org-super-agenda simply uses the raw output of the
org-agenda commands by reading it from the agenda buffer.  This works
well because each line in the agenda buffer is an item, and the text on
each line has Emacs text-properties that include most of the relevant
metadata (anything else can be retrieved by using a macro to eval code
at the item's marker--see org-super-agenda--when-with-marker-buffer,
which I should probably rename, haha).  So getting a list of agenda
items could be as simple as running this in the agenda buffer:

(split-string (buffer-substring (point-min) (point-max))
              "\n" 'omit-nulls)

org-super-agenda does that by using advice to filter the return of
org-agenda-finalize-entries, which you could also do quite easily.

So while the agenda code is relatively opaque, it's easier to use its
output than you might think.  :) Let me know if I can help.  (I haven't
been monitoring the list lately, so you might email me directly if
necessary.)  Good luck!

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Is there a way to get all agenda TODOs programmatically?
  2017-12-31 23:37         ` Adam Porter
@ 2018-01-03  9:31           ` Marcin Borkowski
  2018-01-03  9:50             ` Adam Porter
  0 siblings, 1 reply; 14+ messages in thread
From: Marcin Borkowski @ 2018-01-03  9:31 UTC (permalink / raw)
  To: Adam Porter; +Cc: emacs-orgmode


On 2018-01-01, at 00:37, Adam Porter <adam@alphapapa.net> wrote:

> Marcin Borkowski <mbork@mbork.pl> writes:
>
>> Thanks again.  I played around with this for some time, but there is one
>> problem.  The agenda has a lot of settings, and replicating them with
>> org-map-entries turned out to be no fun.
>>
>> Is there a way to plug into the agenda generating functions somehow to
>> get a Lisp list of agenda items?  I'm pretty sure that can be done -
>> org-super-agenda does something similar, after all - but I have no idea
>> why.  I could delve into agenda source myself, but is is quite hairy, so
>> maybe someone knows that already?
>
> Hi Marcin,
>
> As you said, the agenda code is quite hairy--but it does work very well.
> My meager attempt to begin reimplementing it in a more functional way
> showed very poor performance by comparison; perhaps because I didn't do
> it well, but I'm guessing also because of Emacs' function call overhead.
> But for your project, perhaps the code would come in useful; feel free
> to borrow anything that you like:
>
> https://github.com/alphapapa/org-agenda-ng
>
> As you mentioned, org-super-agenda simply uses the raw output of the
> org-agenda commands by reading it from the agenda buffer.  This works
> well because each line in the agenda buffer is an item, and the text on
> each line has Emacs text-properties that include most of the relevant
> metadata (anything else can be retrieved by using a macro to eval code
> at the item's marker--see org-super-agenda--when-with-marker-buffer,
> which I should probably rename, haha).  So getting a list of agenda
> items could be as simple as running this in the agenda buffer:
>
> (split-string (buffer-substring (point-min) (point-max))
>               "\n" 'omit-nulls)
>
> org-super-agenda does that by using advice to filter the return of
> org-agenda-finalize-entries, which you could also do quite easily.
>
> So while the agenda code is relatively opaque, it's easier to use its
> output than you might think.  :) Let me know if I can help.  (I haven't
> been monitoring the list lately, so you might email me directly if
> necessary.)  Good luck!

Hi Adam,

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).

Thanks and best,

--
Marcin Borkowski

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Is there a way to get all agenda TODOs programmatically?
  2018-01-03  9:31           ` Marcin Borkowski
@ 2018-01-03  9:50             ` Adam Porter
  2018-01-03 13:15               ` Adam Porter
  2018-01-03 13:49               ` Nicolas Goaziou
  0 siblings, 2 replies; 14+ messages in thread
From: Adam Porter @ 2018-01-03  9:50 UTC (permalink / raw)
  To: emacs-orgmode

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...

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Is there a way to get all agenda TODOs programmatically?
  2018-01-03  9:50             ` Adam Porter
@ 2018-01-03 13:15               ` Adam Porter
  2018-01-03 14:15                 ` Nicolas Goaziou
  2018-01-03 14:19                 ` Adam Porter
  2018-01-03 13:49               ` Nicolas Goaziou
  1 sibling, 2 replies; 14+ messages in thread
From: Adam Porter @ 2018-01-03 13:15 UTC (permalink / raw)
  To: emacs-orgmode

Hi Marcin (and all),

I have some more code you might find useful.  I had an idea to take a
different approach with my org-agenda-ng code (not using org-element to
parse the whole buffer first), and it seems to be working well so far.
The code is here:

https://github.com/alphapapa/org-agenda-ng/tree/non-element-parsing

The code doesn't generate an identical result to the org-agenda code
(not yet, anyway), but it's very similar.  It lacks the agenda prefix
feature and full application of agenda faces (it does do a few faces
already).  Most, if not all, text properties are applied.  And of
course, more work could be done to make it look more like an official
agenda buffer.

So, for an example, you can run code like this to simulate a primitive
agenda buffer:

(org-agenda-ng--agenda
 :files org-agenda-files
 :any `((org-agenda-ng--date-p :date <= ,(org-today))
        (org-agenda-ng--date-p :deadline <= ,(+ org-deadline-warning-days (org-today)))
        (org-agenda-ng--date-p :scheduled <= ,(org-today)))
 :none `((apply org-agenda-ng--todo-p ,org-done-keywords)))

Or you could search for certain types of to-do items with a deadline
before a certain date like:

(org-agenda-ng--agenda
 :files "~/org/main.org"
 :all '((org-agenda-ng--todo-p "TODO" "WAITING")
        (org-agenda-ng--date-p :deadline < "2018-01-03")))

As you can see, the :all, :any, and :none arguments are a list of quoted
lisp forms.  You can also give your own lambda, like:

(org-agenda-ng--agenda
 :files org-agenda-files
 :pred (lambda ()
         (and (org-agenda-ng--todo-p)
              (or (org-agenda-ng--date-p :deadline '<= (org-today))
                  (org-agenda-ng--date-p :scheduled '<= (org-today)))
              (not (apply #'org-agenda-ng--todo-p org-done-keywords-for-agenda)))))

If you also give :all, :any, or :none, they are AND-ed with the :pred
lambda.

It's all highly experimental and WIP, but feel free to try it out, and
please let me know any feedback you might have.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Is there a way to get all agenda TODOs programmatically?
  2018-01-03  9:50             ` Adam Porter
  2018-01-03 13:15               ` Adam Porter
@ 2018-01-03 13:49               ` Nicolas Goaziou
  2018-01-03 14:16                 ` Adam Porter
  1 sibling, 1 reply; 14+ messages in thread
From: Nicolas Goaziou @ 2018-01-03 13:49 UTC (permalink / raw)
  To: Adam Porter; +Cc: emacs-orgmode

Hello,

Adam Porter <adam@alphapapa.net> writes:

> 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.  :)

I don't think the size of the functions matter much. Agenda is optimized
for single day view, so it is fast in this case because it only looks
for "interesting" headlines. However, this mechanism is terrible for
multi-days agendas: Agenda treats them as multiple single days agendas,
so you end up looking again and again at the same entries.

> 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.

Usually, you inline a function if you are certain funcall overhead is
responsible for the slowness.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Is there a way to get all agenda TODOs programmatically?
  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
  1 sibling, 1 reply; 14+ messages in thread
From: Nicolas Goaziou @ 2018-01-03 14:15 UTC (permalink / raw)
  To: Adam Porter; +Cc: emacs-orgmode

Hello,

Adam Porter <adam@alphapapa.net> writes:

> I have some more code you might find useful.  I had an idea to take a
> different approach with my org-agenda-ng code (not using org-element to
> parse the whole buffer first), and it seems to be working well so far.

Clearly, `org-element-parse-buffer' is not adequate for the task. When
buildings the agenda view, you're most probably interested in very
specific parts of the document, whereas Element tries to be as thorough
as possible.

I suggest even to not use any org-element-* function there.

> The code is here:
>
> https://github.com/alphapapa/org-agenda-ng/tree/non-element-parsing
>
> The code doesn't generate an identical result to the org-agenda code
> (not yet, anyway), but it's very similar.  It lacks the agenda prefix
> feature and full application of agenda faces (it does do a few faces
> already).  Most, if not all, text properties are applied.  And of
> course, more work could be done to make it look more like an official
> agenda buffer.

I don't want to sound offending, but your 400 locs library cannot
possibly be "very similar" to 10k locs org-agenda.el. Also, after
a cursory look, it is not clear how you solve the multi-days issue.
I.e., AFAIU, you still run multiple checks on the same entry.

Nevertheless, I think your approach is right. I think that, at some
point, we'll need to rewrite "org-agenda.el" from scratch, like we did
for "org-export.el" a few years back, so it becomes manageable again. In
the process, we definitely need to find a better replacement for
`org-agenda-skip', as done in your library.

So, in a nutshell, I think you're doing a step in the right direction.
I hope Org can ultimately benefit from a better "org-agenda.el".

My 2 cents,

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Is there a way to get all agenda TODOs programmatically?
  2018-01-03 13:49               ` Nicolas Goaziou
@ 2018-01-03 14:16                 ` Adam Porter
  0 siblings, 0 replies; 14+ messages in thread
From: Adam Porter @ 2018-01-03 14:16 UTC (permalink / raw)
  To: emacs-orgmode

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

Hi Nicolas,

> I don't think the size of the functions matter much. Agenda is optimized
> for single day view, so it is fast in this case because it only looks
> for "interesting" headlines. However, this mechanism is terrible for
> multi-days agendas: Agenda treats them as multiple single days agendas,
> so you end up looking again and again at the same entries.

Yes, when I discovered that, I was very surprised that multi-day agendas
are as fast as they are!

>> 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.
>
> Usually, you inline a function if you are certain funcall overhead is
> responsible for the slowness.

Thanks.  I checked my notes again, and I see that funcall overhead was
not actually the issue (at least, I hadn't gotten far enough for it to
be).  The problem was that org-element-parse-buffer was very slow in
comparison, since it parses the entire buffer rather than, as you said,
just interesting parts.  So I'm trying another approach that doesn't
parse the whole buffer, which seems to show promise...

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Is there a way to get all agenda TODOs programmatically?
  2018-01-03 13:15               ` Adam Porter
  2018-01-03 14:15                 ` Nicolas Goaziou
@ 2018-01-03 14:19                 ` Adam Porter
  1 sibling, 0 replies; 14+ messages in thread
From: Adam Porter @ 2018-01-03 14:19 UTC (permalink / raw)
  To: emacs-orgmode

Forgive the self reply, but I just made a change which makes the code
much more pleasant.  The matching functions are bound internally during
matching, so instead of:

(org-agenda-ng--agenda
 :files org-agenda-files
 :pred (lambda ()
         (and (org-agenda-ng--todo-p)
              (or (org-agenda-ng--date-p :deadline '<= (org-today))
                  (org-agenda-ng--date-p :scheduled '<= (org-today)))
              (not (apply #'org-agenda-ng--todo-p org-done-keywords-for-agenda)))))

You can write:

(org-agenda-ng--agenda
 :files org-agenda-files
 :pred (lambda ()
         (and (todo)
              (or (date :deadline '<= (org-today))
                  (date :scheduled '<= (org-today)))
              (not (apply #'todo org-done-keywords-for-agenda)))))

Or:

(org-agenda-ng--agenda
 :files org-agenda-files
 :any `((date :date <= ,(org-today))
        (date :deadline <= ,(+ org-deadline-warning-days (org-today)))
        (date :scheduled <= ,(org-today)))
 :none `((apply todo ,org-done-keywords)))

This makes the syntax much more pleasant and readable, I think.  I also
profiled the code, and its performance seems good.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Is there a way to get all agenda TODOs programmatically?
  2018-01-03 14:15                 ` Nicolas Goaziou
@ 2018-01-03 15:48                   ` Adam Porter
  0 siblings, 0 replies; 14+ messages in thread
From: Adam Porter @ 2018-01-03 15:48 UTC (permalink / raw)
  To: emacs-orgmode

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

>> I have some more code you might find useful.  I had an idea to take a
>> different approach with my org-agenda-ng code (not using org-element to
>> parse the whole buffer first), and it seems to be working well so far.
>
> Clearly, `org-element-parse-buffer' is not adequate for the task. When
> buildings the agenda view, you're most probably interested in very
> specific parts of the document, whereas Element tries to be as thorough
> as possible.

Right, so now I'm using outline-next-heading to go directly to headings.

> I suggest even to not use any org-element-* function there.

That may be the best option, however at the moment I'm using just
org-element-headline-parser, which seems to work well.  It avoids a lot
of manual gathering of data in later functions, because they can just
use the plist it creates, and it seems fast with a hacky search bound
that prevents it from going too far past the headline.

>> The code is here:
>>
>> https://github.com/alphapapa/org-agenda-ng/tree/non-element-parsing
>>
>> The code doesn't generate an identical result to the org-agenda code
>> (not yet, anyway), but it's very similar.  It lacks the agenda prefix
>> feature and full application of agenda faces (it does do a few faces
>> already).  Most, if not all, text properties are applied.  And of
>> course, more work could be done to make it look more like an official
>> agenda buffer.
>
> I don't want to sound offending, but your 400 locs library cannot
> possibly be "very similar" to 10k locs org-agenda.el. Also, after
> a cursory look, it is not clear how you solve the multi-days issue.
> I.e., AFAIU, you still run multiple checks on the same entry.

What I meant is, for my own very basic, one-day agenda view, it produces
a similar-looking result--superficially, at least.  Of course it does
not support more than probably 5% of the features and settings
org-agenda.el does, as it's barely more than a proof-of-concept.  But
maybe it would be helpful to Marcin for his idea.

> Nevertheless, I think your approach is right. I think that, at some
> point, we'll need to rewrite "org-agenda.el" from scratch, like we did
> for "org-export.el" a few years back, so it becomes manageable again. In
> the process, we definitely need to find a better replacement for
> `org-agenda-skip', as done in your library.
>
> So, in a nutshell, I think you're doing a step in the right direction.
> I hope Org can ultimately benefit from a better "org-agenda.el".

Me too.  I'm just exploring some ideas, not proposing this as a
replacement.  org-agenda.el has had hundreds, if not thousands, of hours
put into it, and a full replacement would take as long to make.

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2018-01-03 15:48 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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).